felixendres / rgbdslam_v2

RGB-D SLAM for ROS
GNU General Public License v3.0
940 stars 400 forks source link

How to visualize octomap in rviz? #5

Open yincanben opened 9 years ago

yincanben commented 9 years ago

Hello, I have experienced this package,It is very cool.But when I have tried to run octomap from Kinect data using rgbdslam, I can't visualize anything in rviz. My setup: ROS hydro on Ubuntu LTS12.04. rgbdslam_v2 downloaded ,compiled and installed. octomap and octomap_mapping installed

The terminal is:

roscore roslaunch openni_launch openni.launch roslaunch rgbdslam rgbdslam.launch roslaunch rgbdslam octomap_server.launch Some things I've done: I select that the value of "Fixed frame" is "/map" ,At the same time ,I added MarkerArray /occupied_cells_vis_array. I also tried to run: rostopic echo /batch/clouds ,The terminal display is: WARNING: topic [/batch/clouds] does not appear to be published yet

Then I modified src/parameter_sever.cpp from "addOption("batch_processing", static_cast (false), " to addOption("batch_processing", static_cast (true); But there is nothing in rviz. Also,When I added "pointcloud",I have no anything .

I want to visualize the octomap in rviz when it is connect kinect,Can you help me solve this problem ?In advance thank you!

felixendres commented 9 years ago

Hi, I would assume that you haven't send the model (i.e. the registered clouds) to the octomap server yet. Press ctrl+m or select "send model" from the gui's i/o menu. If you are running headless, there is a ROS service call mentioned in the README. However, the transmission of the clouds between rgbdslam and octomap_server was often brittle. Rgbdslamv2 can use the octomap library internally now, see the Octomap menu in the GUI. It will not visualize to rviz and not act as a map server, but you can view the octomap in rgbdslam's gui and save it.