How to automatically export .PLY files per node from an RTAB-Map database?
Hi everyone,
I’m working with RTAB-Map and have a database .db file containing multiple nodes from a SLAM session. I want to export the 3D point cloud data as .ply files, but specifically one .ply file per node.
I know how to export the entire map as a single .ply file using the RTAB-Map GUI or rtabmap-export CLI tool, but I’m looking for a way to automate exporting individual .ply files for each node ID. Ideally, this would be done via command-line or a script to avoid manually exporting node-by-node in the GUI.
Is there a built-in way or recommended approach to do this? Any example commands or scripts would be very helpful.
Thanks in advance!
There is a way to do that, but it is only by using UI Export 3D Clouds tool. Uncheck "Assemble clouds" here:
On exporting, select a folder then you will be asked in which format to export and a prefix for the file names:
The point clouds will be exported with ID corresponding to node ID in the graph:
Note that the clouds are exported in map frame already, so you can just open all of them at the same time in MeshLab/CloudCompare and they will be already at the right place.
To export the clouds in base_link frame or camera frame, choose the appropriate frame here:
You may export the poses in same frame so that you can re-assemble the clouds on your own.