Ask Your Question

octomap in rviz and occupancy grids in 3D maps

asked 2012-06-13 08:29:35 -0500

shubh991 gravatar image

updated 2012-06-15 05:46:17 -0500

AHornung gravatar image

I have saved a .bt file which I can properly visualize with octovis. However, for some reason I need to visualize octomap image, or to make it clear, 3D maps with voxels on rviz. I can't simply view it by launching octomap_mapping and adding occupied_cells_vis_array. Does it require some kind of editing in the launch file?

I want to know (1)how can I visualize a 3D map generated by octomap directly, i.e., while running Kinect(which I am using as sensing device), with rviz? and (2) how can I visualize an already saved .bt file with rviz?

Moreover, the bottom line of all the effort is to run a localiation algorithm for which I require information like free and occupied cells in the map. If you have any suggestion regarding how I can get occupancy grids for 3D maps, kindly provide that as well....thank you in advance

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-06-15 05:45:34 -0500

AHornung gravatar image

You can visualize both the incrementally built maps and the static ones loaded from a .bt file in octomap_server in the same way (see the documentation of octomap_server/Published Topics):

Add a MarkerArray display in RViz on the topic "occupied_cells_vis" (without the trailing _array, that's an RViz problem). Be sure to set the tf frame to "/map" or whatever your mapping frame is.

For querying occupancy for localization in the octomap stored in octomap_server, see (in particular castRay()).

edit flag offensive delete link more


Thanks a lot. I was able to visualize the map by loading .bt file and making some changes in the launch-file code for realtime mapping. Thanks for the suggestion on latter problem. I think castRay() could be useful.

shubh991 gravatar image shubh991  ( 2012-06-15 06:40:39 -0500 )edit

In case of not using octomap_server to generate the octomap (generated directly from rgbdslam), how can i load this .bt file to rviz (for navigation purposes) ?

Phelipe gravatar image Phelipe  ( 2015-02-16 06:21:44 -0500 )edit

answered 2020-04-30 00:53:36 -0500

Yesika Rodriguez gravatar image

You try the next command

roslaunch octomap_server octomap_server_node

You replace for the name file (.bt)

Next... Open in other terminal rviz

rosrun rviz rviz

edit flag offensive delete link more

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: 2012-06-13 08:29:35 -0500

Seen: 5,208 times

Last updated: Apr 30 '20