Rosanswers logo

Hi, I am having trouble saving the whole map as seen in the gui of rgbdslam. I need the whole map for path planning. I created a node that listens to /rgbdslam/batch_clouds topic and data were flowing in successfully, as Rviz displays.

I want to perform a planar segmentation and obtain the floor as described in this tutorial:http pointclouds.org documentation tutorials extract_indices.php #extract-indices

The relevant part of the code in this tutorial were placed in the call back function (the function for processing rostopic data as described in ros tutorials) of my program.

And then after I ran my program, where I saved the output to a pcd file and view it via pcd_viewer, only the floor of the last captured frame is displayed, but not the whole map.

The write function (which saves the point cloud into the pcd file) is carried out within the call back function of my program which should be the cause of the problem. Where should I put the write function so that it saves not the last frame but the whole map? Or am I looking at this problem wrongly?

An option would be to save the map as an octomap (.ot extension) using the options avaiable in the gui. I could view the whole map on octovis. But the documentation for octomap is rather poor and I do no know how to manipulate the data to get the floor which I need for path planning.

I am also not sure how to read .ot files and convert them to pointcloud data; not much info can be found regarding ".ot" files.

I have considered a solution in here, but my camera will be place 45 degrees towards the floor, so this solution is insufficient.

Thanks in advance!

Originally posted by VicL on ROS Answers with karma: 17 on 2013-05-18

Post score: 1


1 Answer 1


Rosanswers logo

The data on "batch_clouds" sends the clouds one by one, in the camera coordinate frame, along with a tf transformation of the camera pose. You probably only get one frame, because you (over)write the file for every received cloud.

The "save" and "save as" commands also publish the registered and merged point cloud on the topic /rgbdslam/aggregate_clouds.

By the way, the octomap documentation is pretty good, just not on ros.org. Have a look at their hompage.

Originally posted by Felix Endres with karma: 6468 on 2013-05-21

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by VicL on 2013-05-22:
nice! press the "save" button under "data" to save a .pcd file in the default dir but theres nothing published on /rgbdslam/aggregate_clouds

I could open the file and get the floor plane out of the full map, and use

rosrun pcl_ros pcd_to_pointcloud <file.pcd> [ ]

to publish for rviz

Comment by Felix Endres on 2013-05-22:
Ok, great.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.