Ask Your Question
1

Generating Octomap [Solved]

asked 2014-12-10 09:23:32 -0600

Thiagopj gravatar image

updated 2014-12-15 10:54:08 -0600

Hello guys!

I'm facing some problems trying to generate an Octomap. First of all, I downloaded RGBDSLAM ( http://felixendres.github.io/rgbdslam... ) and installed as recommended. I'm able to run roslaunch rgbdslam rgbdslam.launch and see the map as i capture the frames. My problem is when i try to save this map as an octomap or pointcloud map. None of them are working.

-- As Felix said, the only think you must do to save the octomap is, from the GUI, click on 'Octomap'->'Save Octomap'. First problem: When i click on save octomap, i generate a .pcd file, not a .bt. Second problem: When i try to open this .pcd file from rosrun pcl_viewer file.pcd I got this error: No points to read. How can i properly save an Octomap after finish my rgbdslam ?

-- My second attempt was try to use these packages: http://octomap.github.io/ but i don't know and didn't find out how to run this package. In other words, i want to use this to generate my own octomap and, if it's possible, visualize it in RVIZ. I downloaded the latest version (1.6.8) and extract all the folder to my home folder. Then i run the commands to compile and (i think) everythink is ok with that. So, how can i use this package to create my own map using ROS ? Also, i tried to follow these instructions ( http://wiki.ros.org/octomap ) but nothing changed.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-12-10 13:14:15 -0600

ajain gravatar image

To build an octomap, you might wanna use octomap_server. You can change the subcribed topics using remap and them build your own map. Secondly, for saving the map you can use octomap_saver node.

edit flag offensive delete link more

Comments

I tried to use with octomap_server, but didn't understand when you say "change the subcribed topics using remap". How can i do that ? And about the usage of octomap_saver, i just need to build a map in rgbdslamv2 and then run this node to save (And then not use the GUI) ?

Thiagopj gravatar imageThiagopj ( 2014-12-11 10:21:28 -0600 )edit

you can run the octomap_server node from a launch file (this is one way), and within the <node> </node> tags you can specify another tag

<remap from="/octomap_defualt_topic" to="/actually_listen_to_this_one"/>

l0g1x gravatar imagel0g1x ( 2014-12-11 11:19:19 -0600 )edit

In my octomap_server.launch i have this line <remap from="cloud_in" to="/rgbdslam/batch_clouds" /> but how can i check if its correct ? And where do i see who's the right one ? When i run rosrun octomap_server octomap_saver file.(bt|ot) i got an error that msg.data.size() is empty.

Thiagopj gravatar imageThiagopj ( 2014-12-11 11:30:28 -0600 )edit

You can use rqt_graph to see if all topics and nodes are correctly connected, or visualize topic published by octomap_server in rviz using Marker array data type. You won't get an error in using octomap_saver if data is correctly published by the server.

ajain gravatar imageajain ( 2014-12-11 11:49:58 -0600 )edit

I did run rqt_graph, and i think everything is ok. See here. As from RVIZ, using Marker array nothing happen. See here. Any ideia of what is happening ? Thanks!

Thiagopj gravatar imageThiagopj ( 2014-12-11 12:10:36 -0600 )edit
Thiagopj gravatar imageThiagopj ( 2014-12-12 06:51:07 -0600 )edit

My steps are: roscore && roslaunch openni_launch openni.launch && roslaunch rgbdslam rgbdslam.launch && roslaunch rgbdslam octomap_server.launch. After that i capture the frames in the GUI and try to save the octomap but no data is received.

Thiagopj gravatar imageThiagopj ( 2014-12-12 06:54:49 -0600 )edit

Firstly, please post a rqt_graph with topic names please. Secondly, try adding output="screen" parameter in octomap_server.launch for the node to see the logs of octomap_server and understand what's going wrong. Also, FYI you don;t need to run roscore if you are using roslaunch

ajain gravatar imageajain ( 2014-12-12 17:20:39 -0600 )edit
0

answered 2014-12-11 18:10:37 -0600

ajain gravatar image

Can you please share a picture of rqt_graph with topics and more information about your launch file?

edit flag offensive delete link more

Comments

Thanks for you answer and help! I fixed my problem just setting the parameter store_pointclouds as false. Now octomap_server is receiving the data and saving it correctly.

Thiagopj gravatar imageThiagopj ( 2014-12-15 10:53:30 -0600 )edit

You set it to "false"?? It should actually be vice-versa...

Felix Endres gravatar imageFelix Endres ( 2015-01-14 04:13:40 -0600 )edit

I am facing this same problem.Where do you change parameter of store_pointclouds.Basically I want it to downproject it to 2d and I have no idea how would it be done.I am new to ROS .Any help would be appreciated,thanks.

uzair_azhar gravatar imageuzair_azhar ( 2016-02-13 06:04:05 -0600 )edit

Also,I am saving octomaps in .ot format.How to use them for navigation and how to visualize them in rviz.

uzair_azhar gravatar imageuzair_azhar ( 2016-02-13 06:30:15 -0600 )edit

I think you can load them with the octomap_server. There should be some parameter that you can set in the launch file.

Felix Endres gravatar imageFelix Endres ( 2016-02-15 06:13:00 -0600 )edit

Regarding the store_pointclouds parameter: In a launch-file. However, you shouldn't need to change it. Save the octomap from within rgbdslam (GUI Option or ros service call as described in the readme file).

Felix Endres gravatar imageFelix Endres ( 2016-02-15 07:14:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-12-10 09:23:32 -0600

Seen: 1,832 times

Last updated: Dec 15 '14