From bfef9eed544ef5605cf22ce727584d4563a2e630 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 24 Mar 2024 16:41:44 -0700 Subject: [PATCH] vlp example: moved rtabmap's parameters from arguments to parameters to avoid string parameter conversion errors like #1134 --- rtabmap_examples/launch/vlp16.launch.py | 76 ++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/rtabmap_examples/launch/vlp16.launch.py b/rtabmap_examples/launch/vlp16.launch.py index 17365f49..dfc6927d 100644 --- a/rtabmap_examples/launch/vlp16.launch.py +++ b/rtabmap_examples/launch/vlp16.launch.py @@ -37,26 +37,25 @@ def generate_launch_description(): 'expected_update_rate':15.0, 'deskewing':deskewing, 'use_sim_time':use_sim_time, + # RTAB-Map's internal parameters are strings: + 'Icp/PointToPlane': 'true', + 'Icp/Iterations': '10', + 'Icp/VoxelSize': '0.1', + 'Icp/Epsilon': '0.001', + 'Icp/PointToPlaneK': '20', + 'Icp/PointToPlaneRadius': '0', + 'Icp/MaxTranslation': '2', + 'Icp/MaxCorrespondenceDistance': '1', + 'Icp/Strategy': '1', + 'Icp/OutlierRatio': '0.7', + 'Icp/CorrespondenceRatio': '0.01', + 'Odom/ScanKeyFrameThr': '0.4', + 'OdomF2M/ScanSubtractRadius': '0.1', + 'OdomF2M/ScanMaxSize': '15000', + 'OdomF2M/BundleAdjustment': 'false' }], remappings=[ ('scan_cloud', '/velodyne_points') - ], - arguments=[ - 'Icp/PointToPlane', 'true', - 'Icp/Iterations', '10', - 'Icp/VoxelSize', '0.1', - 'Icp/Epsilon', '0.001', - 'Icp/PointToPlaneK', '20', - 'Icp/PointToPlaneRadius', '0', - 'Icp/MaxTranslation', '2', - 'Icp/MaxCorrespondenceDistance', '1', - 'Icp/Strategy', '1', - 'Icp/OutlierRatio', '0.7', - 'Icp/CorrespondenceRatio', '0.01', - 'Odom/ScanKeyFrameThr', '0.4', - 'OdomF2M/ScanSubtractRadius', '0.1', - 'OdomF2M/ScanMaxSize', '15000', - 'OdomF2M/BundleAdjustment', 'false', ]), Node( @@ -80,32 +79,33 @@ def generate_launch_description(): 'approx_sync':False, 'wait_for_transform':0.2, 'use_sim_time':use_sim_time, + # RTAB-Map's internal parameters are strings: + 'RGBD/ProximityMaxGraphDepth': '0', + 'RGBD/ProximityPathMaxNeighbors': '1', + 'RGBD/AngularUpdate': '0.05', + 'RGBD/LinearUpdate': '0.05', + 'RGBD/CreateOccupancyGrid': 'false', + 'Mem/NotLinkedNodesKept': 'false', + 'Mem/STMSize': '30', + 'Mem/LaserScanNormalK': '20', + 'Reg/Strategy': '1', + 'Icp/VoxelSize': '0.1', + 'Icp/PointToPlaneK': '20', + 'Icp/PointToPlaneRadius': '0', + 'Icp/PointToPlane': 'true', + 'Icp/Iterations': '10', + 'Icp/Epsilon': '0.001', + 'Icp/MaxTranslation': '3', + 'Icp/MaxCorrespondenceDistance': '1', + 'Icp/Strategy': '1', + 'Icp/OutlierRatio': '0.7', + 'Icp/CorrespondenceRatio': '0.2' }], remappings=[ ('scan_cloud', 'assembled_cloud') ], arguments=[ - '-d', # This will delete the previous database (~/.ros/rtabmap.db) - 'RGBD/ProximityMaxGraphDepth', '0', - 'RGBD/ProximityPathMaxNeighbors', '1', - 'RGBD/AngularUpdate', '0.05', - 'RGBD/LinearUpdate', '0.05', - 'RGBD/CreateOccupancyGrid', 'false', - 'Mem/NotLinkedNodesKept', 'false', - 'Mem/STMSize', '30', - 'Mem/LaserScanNormalK', '20', - 'Reg/Strategy', '1', - 'Icp/VoxelSize', '0.1', - 'Icp/PointToPlaneK', '20', - 'Icp/PointToPlaneRadius', '0', - 'Icp/PointToPlane', 'true', - 'Icp/Iterations', '10', - 'Icp/Epsilon', '0.001', - 'Icp/MaxTranslation', '3', - 'Icp/MaxCorrespondenceDistance', '1', - 'Icp/Strategy', '1', - 'Icp/OutlierRatio', '0.7', - 'Icp/CorrespondenceRatio', '0.2', + '-d' # This will delete the previous database (~/.ros/rtabmap.db) ]), Node(