Skip to content

Commit

Permalink
Slam is working now
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusSilvaUtrera committed Sep 5, 2024
1 parent 5975d3b commit 4e23e4a
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions andino_gz/launch/slam_toolbox_online_async.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
import os

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
from launch.launch_description_sources import PythonLaunchDescriptionSource


def generate_launch_description():
Expand All @@ -46,21 +47,19 @@ def generate_launch_description():
'config', 'slam_toolbox_online_async.yaml'),
description='Full path to the ROS 2 parameters file to use for the slam_toolbox node')

start_async_slam_toolbox_node = Node(
parameters=[
slam_params_file,
{
'use_sim_time': True
}
],
package='slam_toolbox',
executable='async_slam_toolbox_node',
name='slam_toolbox',
output='screen')
async_slam_toolbox_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(get_package_share_directory("slam_toolbox"),
'launch', 'online_async_launch.py')
),
launch_arguments={
'slam_params_file': slam_params_file
}.items(),
)

ld = LaunchDescription()

ld.add_action(declare_slam_params_file_cmd)
ld.add_action(start_async_slam_toolbox_node)
ld.add_action(async_slam_toolbox_launch)

return ld

0 comments on commit 4e23e4a

Please sign in to comment.