introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
957 stars 557 forks source link

LeGO_LOAM integration with rtabmap #875

Open ijklmnopqr opened 1 year ago

ijklmnopqr commented 1 year ago

Hello,

Rtabmap is really an outstanding work. I really appreciated it.

Currently I am trying to integrate LeGO_LOAM with rtabmap using Velodyne VLP-16 and realsense D435 RGB-D camera. I want to compare the results generated from LeGO_LOAM, rtabmap and integrated result. To do so what change should I make in rtabmap package? Is there any working reference for LOAM and FLOAM using rtabmap. What files need to be changed to make it compatible with Velodyne VLP-16 and realsense D435, which launch file to be changed and what parameters to be given.

Your input will be of significant help.

Looking forward to your reply.

matlabbe commented 1 year ago

you may look at this example: https://github.com/introlab/rtabmap_ros/blob/master/launch/tests/test_velodyne_d435i_deskewing.launch

Note that in this example, the IMU from D435i is used to deskew the lidar. Otherwise the D435 is not used in odometry estimation, which is done using LiDAR only by rtabmap's icp odometry or FLOAM depending on the config used. If floam option is enabled, rtabmap library should be built with FLOAM. FLOAM and LOAM odometry inside rtabmap can be found here:

ijklmnopqr commented 1 year ago

Thank you for your response.

For the start I was trying to fuse D435 with Velodyne VLP 16. I have successfully checked the working of VLP16 with test_velodyne.launch. Which uses ICP as odometry am I right? I tried to integrate D435 with test_velodyne.launch but haven't had any luck. I have also referred to your paper STM section and tried to replicate it but I am doing something wrong. I can only see point clouds from Lidar and no image from camera on rtabmapviz. Also, I am not able to see/generate maps with my launch file. Below is test_velodyne.launch file in which I have tried to integrate D435 topics: <?xml version="1.0"?>

After launching the file, I also get below warning: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10). /rtabmap/rtabmap subscribed to (approx sync): /rtabmap/odom \ /rtabmap/rgbd_image \ /rtabmap/assembled_cloud

And this is rqt graph:

rosgraph1

Can you please let me know what changes need to be made to launch file? Looking forward to your help.

matlabbe commented 1 year ago

Yes, with velodyne example, icp odometry is used.

For D435 integration, rtabmap seems subscribed to right topics, but one of them is not received. Check:

rostopic hz /rtabmap/odom  /rtabmap/rgbd_image  /rtabmap/assembled_cloud 
ijklmnopqr commented 1 year ago

Hello, Thank you for your response.

I have checked the above topics they are received now:

============================================================================
/rtabmap/odom              7.438    0.06866     0.1739      0.02662   39    
/rtabmap/rgbd_image        26.25    0.004028    0.2209      0.02421   39    
/rtabmap/assembled_cloud   0.6889   1.411       1.492       0.04028   129   

         topic              rate    min_delta   max_delta   std_dev   window
============================================================================
/rtabmap/odom              7.382    0.06866     0.1739      0.02519   46    
/rtabmap/rgbd_image        26.23    0.004028    0.2209      0.02397   46    
/rtabmap/assembled_cloud   0.7285   1.215       1.492       0.1163    156   

         topic              rate    min_delta   max_delta   std_dev   window
============================================================================
/rtabmap/odom              7.322    0.06866     0.1739      0.02397   53    
/rtabmap/rgbd_image        25.75    0.004028    0.2209      0.02449   53    
/rtabmap/assembled_cloud   0.7257   1.215       1.492       0.1012    179   

I am still not able to integrate D435 and VLP-16 LiDAR. Can you please verify the above launch file for its correctness?

Below is the rqt graph:

Lidar_camera_ros_graph

matlabbe commented 1 year ago

Based on the frame rates, queue_size of 10 is too small. You should start rtabmap node with queue_size of at least 30