Ask Your Question

How to convert point cloud data to map using octomap?

asked 2015-08-03 09:32:34 -0600

Rookie92 gravatar image

Hi people,

I am working with Kinect, I can see a point cloud with rviz from kinect, but I dont know what I have to do for convert the point cloud to a map, I dont know if I must write a node or if I can do it only with rviz, I am rookie and I was looking for an example.

Please can somebody help me?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-08-03 09:46:35 -0600

updated 2015-08-03 09:46:53 -0600

The octomap_server package takes care of this conversion. You just have to launch it telling which topic is the pointcloud topic. Usually, the default topic will be OK. Then, just load the corresponding display in RViz and you should see the voxels.

edit flag offensive delete link more


I have install that package, but I dont know what I must to launch...

Do you think the topic /camera/depth_registered/points is a good topic to create a map?

Rookie92 gravatar image Rookie92  ( 2015-08-03 10:22:03 -0600 )edit

Try this out: You will have to change the remap of the camera topic. I recommend you to go over the code of the packages you are about to use, to see examples, and their doc. Don't simply use them.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-03 10:45:25 -0600 )edit

In my case I am doing: <node name="octomap_server" pkg="octomap_server" type="octomap_server_node"> <remap from="cloud_in" to="/camera/depth/points"/>

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-03 10:45:34 -0600 )edit

Ok one more question, when I am in Rviz, what kind of display must I visualize it in? and what topic must I put in Rviz I am not sure.

Thanks thanks and thanks

Rookie92 gravatar image Rookie92  ( 2015-08-03 11:26:03 -0600 )edit

From the octomap_server page: "occupied_cells_vis_array (visualization_msgs/MarkerArray) All occupied voxels as "box" markers for visualization in RViz. Be sure to subscribe to the topic occupied_cells_vis in RViz!"

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-03 11:45:50 -0600 )edit

I execute these commands:

roslaunch octomap_server octomap_mapping
roslaunch openni_launch openni.launch
rosrun openni_camera openni_node
rosrun rviz rviz

And I add MarkerArray and MarkerArrayTopic I subscribe to occupied_cells_vis_array or occupied_cells_vis, and I see nothing

Rookie92 gravatar image Rookie92  ( 2015-08-05 06:39:40 -0600 )edit

Just in case, run first roslaunch openni_launch openni.launch (with this you do not need to run openni_node) and then roslaunch octomap_server octomap_mapping. Check the name of the topics, as octomap_mapping launch file is listening to topic /narrow_stereo/points_filtered2

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-05 06:59:59 -0600 )edit

But openni publishes different topic names. You need to change that topic remap. Copy the launch file to a package of your catkin workspace and modify it according to your needs.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-05 07:00:49 -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



Asked: 2015-08-03 09:32:34 -0600

Seen: 6,319 times

Last updated: Aug 03 '15