How to convert RTAB-Map's database files on a remote server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to convert RTAB-Map's database files on a remote server

aarif
Hi,

My team and I are using a Pioneer 3-DX to autonomously map an entire floor in 3D with the help of RTAB-Map and ROS. In addition, we plan to have a server where we can see the progress of the mapping.

However, running ROS on the server is not a viable option for us. As a result, we decided that we could routinely send a copy of the temporary .DB file that's always created by RTAB-Map to the server. We would like to convert this .DB file into a PLY file.

Our problem is that when we look into the .DB file, we can't really discern the data inside it well enough to convert it into a PLY file. How can we interpret the structure of your database files so that we can convert it into a PLY format?

Thank you,
Abdul

Reply | Threaded
Open this post in threaded view
|

Re: How to convert RTAB-Map's database files on a remote server

matlabbe
Administrator
Hi,

Did you try the rtabmap_ros/MapCloud plugin in RVIZ? Subscribing only to /rtabmap/mapData may use ~300 KB/sec of bandwidth and you will get the 3D visualization online.

The temporary DB doesn't contain the latest data, so you may miss some data if you copy the temporary DB. It would be better to stop the robot, then call /rtabmap/publish service and subscribe to any map topics you want on the server side and receive the map. For convenience, if you don't want to subscribe to /rtabmap/cloud_map topic because it is too big, the map_assembler can be used on server side to generate a point cloud topic, then use pointcloud_to_pcd to get a PCD file and use pcl_pcd2ply tool to convert a PLY.

ROS communication allows a maximum of data to transfer, if data is larger than 1 or 2 GB (I don't remember precisely), it cuts the stream. On very large maps, you would need to stop the robot, call /rtabmap/backup service to get a full copy of the database, then use "ssh/scp" to copy the file on the remote computer. When you have a database, you can open it in rtabmap standalone or rtabmap-databaseViewer to export the point cloud in PLY format.

The database format contains RGB and depth images (along with camera calibration) for each node in the map. If you want to create a cloud yourself from data in the database, you may want to use DBDriver interface to get data. See DatabaseViewer::generate3DMap() for example.

cheers