ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

how to save/process WHOLE map of rgbdslam

asked 2013-05-18 16:58:04 -0600

VicL gravatar image

updated 2014-01-28 17:16:34 -0600

ngrennan gravatar image

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-05-21 22:20:44 -0600

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.

edit flag offensive delete link more

Comments

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> [ <interval> ]

to publish for rviz

VicL gravatar image VicL  ( 2013-05-22 10:48:43 -0600 )edit

Ok, great.

Felix Endres gravatar image Felix Endres  ( 2013-05-22 22:32:43 -0600 )edit

Question Tools

Stats

Asked: 2013-05-18 16:58:04 -0600

Seen: 1,932 times

Last updated: May 21 '13