rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

How to automatically export .PLY files per node from an RTAB-Map database?

Open mondiriariana opened this issue 6 months ago • 1 comments

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!

mondiriariana avatar Jun 16 '25 17:06 mondiriariana

There is a way to do that, but it is only by using UI Export 3D Clouds tool. Uncheck "Assemble clouds" here: Image

On exporting, select a folder then you will be asked in which format to export and a prefix for the file names: Image

The point clouds will be exported with ID corresponding to node ID in the graph: Image

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: Image

You may export the poses in same frame so that you can re-assemble the clouds on your own.

matlabbe avatar Jun 17 '25 03:06 matlabbe