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

How to save Octomap?

asked 2014-03-24 07:18:44 -0500

sha gravatar image

updated 2022-01-14 18:08:34 -0500

lucasw gravatar image

I try to save Octomap, it just save it as a quicksave.pcd and when I try to use pcd_viewer to view it says " quicksave.pcd [pcl::PCDReader::readHeader] HEIGHT given (1) but no WIDTH!"

Also, the size is comparatively is very small (700 kb) while the other cloud map created is around 120 Mb.

Can anyone tell me how can I decrease the size of the cloud map which is created. When I try to view it on my machine, it render very slowly. I know the accuracy will decrease but how can i control the size of the cloud map ?

edit retag flag offensive close merge delete

Comments

I think the PCL octree implementation is used. Not the Octomap server? Describe your software setup please.

davinci gravatar image davinci  ( 2014-03-25 03:36:28 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2014-03-25 03:28:01 -0500

AHornung gravatar image

To expand on davinci's answer: You cannot save an OctoMap as .pcd file. In fact, there are no more point clouds to store after you integrated them into OctoMap, since the individual points are not retained by used for a probabilistic occupancy estimation in voxels. How exactly did you store the .pcd file, and from where?

You can only store octomaps into the native .ot or .bt file format, which you can then open and process using the octomap API or visualize with octovis.

edit flag offensive delete link more

Comments

Thanks for the reply. I have tried to save it from GUI (Octomap - >SAve Octomap....I have try to save a new one...this time I didnt gave any .pcd and it has saved....But how can you view it using octovis. I can use pcd_viewer to view pcd files but their is no octovis.

sha gravatar image sha  ( 2014-03-25 03:42:39 -0500 )edit

Which GUI of which package or program are you using to save? octovis is the official visualization of OctoMap. You need to download and compile it, or install the precompiled package for your ROS distribution.

AHornung gravatar image AHornung  ( 2014-03-25 04:01:21 -0500 )edit
1

I am using the GUI from the installation from this page http://wiki.ros.org/rgbdslam. I have just installed octovis also from this page http://wiki.ros.org/octovis. Now I can view the octomap. Please can you tell me how we can control the size PCD files. PCD file created are of size 180 MB which are difficult to visualize.

sha gravatar image sha  ( 2014-03-25 04:13:08 -0500 )edit

Hi Sha, when posting a question, please think about what the readers will need to know to answer it. You are using rgbdslam to create a 3d map. Do you want to save it as an octomap (ot) or a point cloud (pcd) file? Are you even using the right menu item from the GUI?

Felix Endres gravatar image Felix Endres  ( 2014-03-27 07:11:28 -0500 )edit
1

Sorry for the confusion. I will be careful in future.

sha gravatar image sha  ( 2014-03-27 13:40:32 -0500 )edit
1

answered 2016-01-31 08:59:50 -0500

shamitb gravatar image

updated 2016-01-31 10:08:17 -0500

I agree, I get a similar result. Save -> Save Octomap saves it as a .pcd and not a .bt etc. Also looks like it can be saved a .bt but the header it writes has a problem, instead of 'Octomap OcTree binary file' it writes 'Octomap OcTree file'

edit flag offensive delete link more

Comments

1

I checked the code and it is true that the suggested filename is "quicksave.pcd". What rgbdslam saves is actually an .ot (OcTree) file, regardless of the name you choose. Hence the difference in the header line. You can rename the file to fix this. I'll update the code soon.

Felix Endres gravatar image Felix Endres  ( 2016-02-04 08:43:16 -0500 )edit
1

answered 2014-03-25 01:33:20 -0500

davinci gravatar image

You are not saving it as an OctoMap but as a pointcloud (.pcd -> point cloud data).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-03-24 07:18:44 -0500

Seen: 3,921 times

Last updated: Jan 14 '22