diff --git a/src/slam3d_pkg/launch/slam.launch.py b/src/slam3d_pkg/launch/slam.launch.py index 22d870d..bea09a2 100755 --- a/src/slam3d_pkg/launch/slam.launch.py +++ b/src/slam3d_pkg/launch/slam.launch.py @@ -16,11 +16,13 @@ from nav2_common.launch import RewrittenYaml ARGUMENTS = [ DeclareLaunchArgument('sim_mode', default_value='true'), DeclareLaunchArgument('robot', default_value='fr09', choices=['mkmini', 'fr09', 'f1tenth']), + DeclareLaunchArgument('database_path', default_value='~/.ros/rtabmap.db'), ] def launch_setup(context, *args, **kwargs): sim_mode = LaunchConfiguration('sim_mode').perform(context).lower() robot = LaunchConfiguration('robot').perform(context) + database_path = LaunchConfiguration('database_path') remappings=[ ('/tf', 'tf'), @@ -59,7 +61,7 @@ def launch_setup(context, *args, **kwargs): executable='rtabmap', name='rtabmap', output='screen', - parameters=[rtabmap_params_file], + parameters=[rtabmap_params_file, {'database_path': database_path}], remappings=remappings, arguments=['-d'] ), @@ -71,4 +73,3 @@ def generate_launch_description(): ld = LaunchDescription(ARGUMENTS) ld.add_action(OpaqueFunction(function=launch_setup)) return ld -