All you have to do is to launch the octomap server, properly remapping the pointcloud topic, and set your global frame to whatever you are using, odom_combined should be OK. An example is given here:
https://github.com/OctoMap/octomap_mapping/blob/master/octomap_server/launch/octomap_mapping.launch
Your remap pointocloud topic would be most probably: <remap from="cloud_in" to="/camera/depth/points"/>
Additionally, you have to launch rviz: rosrun rviz rivz
, add a new display of type MarkerArray and subscribe to the topic occupied_cells_vis_array
.
Obviously, you have to launch also the openni2 camera: roslaunch openni2_launch openni2.launch
(note you have to install openni2_camera and openni2_launch packages for this).
To put all that together in one launch file is straighforward and thus I let that to you :)
Originally posted by Javier V. Gómez with karma: 1305 on 2015-07-09
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Saracerno on 2015-07-10:
Ok, I made a launch file and seems to work, but now i can't see the map in rviz . How should i configure it ??
Comment by Javier V. Gómez on 2015-07-10:
Run rostopic echo /occupied_cells_vis_array
to ensure that the map is being published. The instructions to visualize it on Rviz are in the third paragraph of my answer.
Comment by Saracerno on 2015-07-10:
I tried the command but nothing seems to be published. I show you the image of node graph to better understading the problem. link text.
Comment by Javier V. Gómez on 2015-07-10:
Can you please share the launch file you created? I guess there is a problem with the frames, but cannot figure out which one.
Comment by Saracerno on 2015-07-10:
link text Here is it !
Comment by Saracerno on 2015-07-10:
It's possible that is missing somewhere a tf ??
Comment by Javier V. Gómez on 2015-07-10:
That is what I want to test. I was never sure how that works hehe.
Comment by Saracerno on 2015-07-10:
Some news ???
Comment by Javier V. Gómez on 2015-07-10:
Sorry I haven't had time for this, and I will busy during the weekend.