feat: persist 3d slam database in workspace
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user