introlab / rtabmap_ros

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

mapping object detection data #1146

Closed FlorianMehnert closed 2 months ago

FlorianMehnert commented 2 months ago

Hi there,

is it possible to use rtabmap with object detection data or are there better alternatives for storing detected objects? I found a similar project that does basically what I want using rtabmap where they drive around detecting objects and storing them in rtabmap for later use: https://github.com/ROBOTIS-JAPAN-GIT/turtlebot3_slam_3d. 2d-map-with-obstacles turtlebot3_slam_3d_mapping Since I ran into issues getting the turtlebot3_slam_3d to run (not maintained anymore) I was wondering whether this is supported out of the box/there are any attempts to add a similar feature to rtabmap?

matlabbe commented 2 months ago

It seems they collected the objects in another file, with name and pose in the current map frame. As they are not saving against the graph, I am not sure if the pose of the objects is corrected on a loop closure. We have an example here (Robot mapping with Find-Object) where objects were added to the graph, then shown back in rviz (follow save_objects argument). The main code is in this example. There are two callbacks: one from some object detection topic that encodes detection in UserData msg to be recorded in rtabmap node, and one that subscribes to published MapData from rtabmap node and decode the UserData to create markers to be shown in rviz. If the map's graph changes, the markers are updated.

See also http://official-rtab-map-forum.206.s1.nabble.com/Detected-Object-Location-Mark-on-RTABMAP-td4571.html#a4598

FlorianMehnert commented 2 months ago

for the find object example I ran into a similar issue as #509 but the same fix with a small python script works

matlabbe commented 2 months ago

Thanks to point out, I'll reupload a fixed rosbag for that demo.

matlabbe commented 2 months ago

Bag has been updated.