introlab / rtabmap_ros

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

ROS2 Humble runs rtabmap slam, there is data in /mapData but no 3D map appears in rviz2 #1150

Closed miku54 closed 2 weeks ago

miku54 commented 6 months ago

Hi everyone, I'm using ros2-humble to test rtabmap slam and navigation, using [sudo apt install ros-humble-rtabmap-*] to install the algorithm with version number 0.21.4-2 jammy.20240416. My steps are as follows:

  1. Start lidar
  2. Start the binocular camera
  3. Start rtabmap slam During the test, it was found that everything ran normally, with 0 errors and 0 warnings. I cannot view the 3D map in rviz2. Is there any problem with the operation? 7efc7b754f4780e42798ead50e1ee66b
matlabbe commented 6 months ago

You have "Cloud from scan" checked in MapCloud plugin, to see the camera cloud, uncheck that.

miku54 commented 6 months ago

You have "Cloud from scan" checked in MapCloud plugin, to see the camera cloud, uncheck that.

I want to prove in this way that there is no problem with rtabmap navigation. When I try to open an rviz2 again and cancel Cloud from scan, I still cannot display the 3D map? Is it a problem with the Raspberry Pi?

matlabbe commented 6 months ago

I am not aware of your full config, but there could be a possibility that rtabmap node is not subscribed to image data. You can also use rtabmap-databaseViewer, to verify that you have image and scan data in the database.

miku54 commented 6 months ago

I am not aware of your full config, but there could be a possibility that rtabmap node is not subscribed to image data. You can also use rtabmap-databaseViewer, to verify that you have image and scan data in the database.

When I perform the above steps, running in another terminal: ros2 topic info /Mapdata shows that a node is subscribed to it. In this case, can we rule out the reason that the rtabmap node may not be subscribed to image data? I haven't tried rtabmap-databaseViewer yet. Based on the output of ros2 topic echo /Mapdata, it should be possible to determine that there is image data in the database. If you need more information, please let me add it. (;_;)

matlabbe commented 5 months ago

With MapData msg, if nodes has image field left set in their SensorData, then yes images are there: http://docs.ros.org/en/noetic/api/rtabmap_msgs/html/msg/SensorData.html

miku54 commented 2 weeks ago

Solved, reference:https://github.com/introlab/rtabmap_ros/issues/1223