introlab / rtabmap_ros

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

Reading mapGraph poses from rtabmap.db directly #1110

Closed 360wcui closed 5 months ago

360wcui commented 5 months ago

Would it be possible to read mapGraph poses from rtabmap.db? I tried to read poses from Node table in rtabmap.db and realized that they are odometry poses not mapGraph poses. Any insight would be greatly appreciated.

Screenshot from 2024-01-26 15-18-29 Screenshot from 2024-01-26 15-14-40

matlabbe commented 5 months ago

Look under Admin table, there is opt_poses field. https://github.com/introlab/rtabmap/blob/c27507bc772cfda34f6624d386ab2cd62d49e90d/corelib/src/resources/DatabaseSchema.sql.in#L123-L124

360wcui commented 5 months ago

Thank you, but the field is null sometimes. Would it be possible to enable it in real-time? It would be nice to update the field as frequently as /rtabmap/mapGraph which is published at 1 hz.

Screenshot from 2024-01-27 21-52-01

matlabbe commented 5 months ago

Currently it is saved only when the database is closed. In ROS, you would have already the same info with /rtabmap/mapGraph.