Posted by
derektan1995 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Tips-needed-to-improve-on-RTAB-Mapping-for-legged-Robots-tp7417p7682.html
Hi Mathieu,
Thank you very much for your reply. I think I now have a good understand on how localization is performed via ICP. I have also incorporated the odom_sensor_sync parameter into my rtabmap config file. Regarding your question about the rtabmap version, I was using the one installed a month ago. I have recently pulled the newest changes but have yet to attempt to reproduce this problem yet.
Interestingly as I proceed on with finetuning my parameters
for localization mode, I realized that I have been encountering a persistent issue. Even though my RTABMap update_frequency was set at 1Hz, my localized pose is published at 1Hz at the beginning when the RTABMap node is being run, as seen from the terminal outputs every second. After awhile,
it will hang and no more terminal outputs are produced, and I would stop receiving localization pose from RTABMap. Here is an image to show that (Even though it claims that the iteration is performed within 0.9 to 1-ish seconds, rtabmap output still freezes for more than 10 seconds).

I would like to share 2 further observations:
1) RTABMap overloading my CPU. As you can see from this snapshot from my 'top' command line tool,
RTABMap is loading more than 100% of one of my CPU. When I opened Ubuntu's system monitor, I noticed that one of the CPU cores is consistently loaded to 100% (usually CPU 2 or 3), while the other CPU cores are relatively free below 50% loading. I wonder if RTABMap's core mapping and localization operations are supposed to utilize more than 1 CPU core, if some operations are multi-threaded in nature? By extension, what aspects of RTABMap utilizes the GPU?

2) There are also times when my realsense driver shoots up to around 110% CPU loading as well on the 'top' command line tool. I investigated further and found that while the realsense driver uses minimal amount of CPU,
the addition of a RGBD_Sync node within the same nodlet (to avoid topic serialization) causes CPU loading of that nodlet to shoot up to more than 100%. I referenced
this guide, with approx_sync set to true.
I hope these observations could provide you with some insight to this issue. I am not entirely sure if these 2 issues are related either. I am rather stuck on what I could do about this, as it makes realtime operations impossible.
For you information, my current set-up is
Ubuntu 18.04, ROS Melodic, on a Nvidia NX Xavier, with a VLP16 Velodyne Lidar and an Intel Realsense d435. I am currently launching the robot's nodes via SSH, via gnome terminals. Here is my parameter file if that helps:
rtabmap.yamlLooking forward to hearing from you, as always.
Much Thanks,
Derek