How to Pass ini Configuration to RTAB-Map Visualization Node (rtabmap_viz)?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Pass ini Configuration to RTAB-Map Visualization Node (rtabmap_viz)?

rob_slam
Hello everyone,

I am using RTAB-Map in ROS2 and passing my custom .ini configuration file to the RTAB-Map SLAM Node (rtabmap). One of the parameters I set in my ini file is:

DetectionRate=0.0

However, when I start all nodes and open RTAB-Map Visualization (rtabmap_viz), I check the parameters in the GUI and see that DetectionRate is set to 1.0 instead of 0.0. It seems that rtabmap_viz does not respect my .ini configuration.

My Questions:

How can I make sure that rtabmap_viz loads the same ini file as rtabmap?
Is there a specific argument or environment variable needed to force rtabmap_viz to use my custom settings?
Are there any known limitations where rtabmap_viz overrides settings from the ini file?
Any insights or solutions would be greatly appreciated!

Thanks in advance,
Best regards
Reply | Threaded
Open this post in threaded view
|

Re: How to Pass ini Configuration to RTAB-Map Visualization Node (rtabmap_viz)?

matlabbe
Administrator
rtabmap_viz reads the parameters from rtabmap's parameters. Look for errors when launching rtabmap_viz, maybe it is not able to read parameters from rtabmap node. Make sure to launch rtabmap_viz under same namespace than rtabmap node, or remap rtabmap node name when launching rtabmap_viz. For example, if rtabmap node is under rtabmap namepsace, the node would be /rtabmap/rtabmap, there are two ways to make rtabmap_viz correctly load parameters from rtabmap node:

ros2 run rtabmap_viz rtabmap_viz --ros-args -r __ns:=/rtabmap
or
ros2 run rtabmap_viz rtabmap_viz --ros-args -p rtabmap:=/rtabmap/rtabmap

When successful, you should see:
[INFO] [1739170224.540784821] [rtabmap_viz]: Reading parameters from the ROS server...
[INFO] [1739170224.560419869] [rtabmap_viz]: Parameters read = 386
[INFO] [1739170224.560463863] [rtabmap_viz]: Parameters successfully read.

otherwise, there would be this error:
[INFO] [1739170289.190882862] [rtabmap_viz]: Reading parameters from the ROS server...
[ERROR] [1739170294.192287629] [rtabmap_viz]: Can't call rtabmap parameters service, is the node running?
[INFO] [1739170294.192547597] [rtabmap_viz]: Parameters read = 0

cheers,
Mathieu