Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used andino slam instead of nav2 slam #179

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions andino_navigation/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def generate_launch_description():
# Get the launch directory
andino_navigation_dir = get_package_share_directory('andino_navigation')
nav2_launch_dir = os.path.join(get_package_share_directory('nav2_bringup'), 'launch')
andino_slam_dir = os.path.join(get_package_share_directory('andino_slam'), 'launch')

# Create the launch configuration variables
namespace = LaunchConfiguration('namespace')
Expand All @@ -55,6 +56,7 @@ def generate_launch_description():
map_yaml_file = LaunchConfiguration('map')
use_sim_time = LaunchConfiguration('use_sim_time')
params_file = LaunchConfiguration('params_file')
slam_params_file = LaunchConfiguration('slam_params_file')
autostart = LaunchConfiguration('autostart')
use_composition = LaunchConfiguration('use_composition')
use_respawn = LaunchConfiguration('use_respawn')
Expand Down Expand Up @@ -110,6 +112,11 @@ def generate_launch_description():
default_value=os.path.join(andino_navigation_dir, 'params', 'nav2_params.yaml'),
description='Full path to the ROS 2 parameters file to use for all launched nodes')

declare_slam_params_file_cmd = DeclareLaunchArgument(
'slam_params_file',
default_value=os.path.join(andino_slam_dir, 'params', 'slam_toolbox_online_async.yaml'),
description='')

declare_autostart_cmd = DeclareLaunchArgument(
'autostart', default_value='true',
description='Automatically startup the nav2 stack')
Expand Down Expand Up @@ -143,13 +150,9 @@ def generate_launch_description():
output='screen'),
# TODO(olmerg) change to andino slam launch
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(nav2_launch_dir, 'slam_launch.py')),
PythonLaunchDescriptionSource(os.path.join(andino_slam_dir, 'slam_toolbox_online_async.launch.py')),
condition=IfCondition(slam),
launch_arguments={'namespace': namespace,
'use_sim_time': use_sim_time,
'autostart': autostart,
'use_respawn': use_respawn,
'params_file': params_file}.items()),
launch_arguments={'slam_params_file': slam_params_file}.items()),
# TODO(olmerg)create andino localization launch
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(nav2_launch_dir,
Expand Down Expand Up @@ -188,6 +191,7 @@ def generate_launch_description():
ld.add_action(declare_map_yaml_cmd)
ld.add_action(declare_use_sim_time_cmd)
ld.add_action(declare_params_file_cmd)
ld.add_action(declare_slam_params_file_cmd)
ld.add_action(declare_autostart_cmd)
ld.add_action(declare_use_composition_cmd)
ld.add_action(declare_use_respawn_cmd)
Expand Down
Loading