Rosanswers logo


I'm trying to build an Octomap from Kinect data using rgbdslam, but I'm experiencing some difficulties and hope someone here might be able to help me with that. My setup:

  • ROS Groovy on Ubuntu 12.04
  • rgbdslam downloaded and compiled as detailed in hxxp://wiki.ros.org/rgbdslam (can't post proper link due to lack of karma)
  • octomap(_server) from the Ubuntu-apt-packages (ros-groovy-octomap*)

I'm launching rgbdslam using the provided rgbdslam_octomap.launch file, which remaps /rgbdslam/batch_clouds to cloud_in (I've checked). rgbdslam seems to work fine in its own window. I want to visualize the generated Octomap in rviz using the appropriate plugins for OccupancyGrid/Map, however, rviz doesn't display anything - so I must assume that the Octomap isn't built (properly or at all).

I listened to /rgbdslam/batch_clouds using rostopic echo and found out that I have to select "Send map" in the rgbdslam in order to cause activity on this topic - I see a batch of numbers being transmitted as soon as I select "Send map". However, Octomap still doesn't seem to do anything, judging by rviz. I also tried octovis, but to no avail.

Does anybody here have a clue for me as to what I'm doing wrong? Why does it seem like no octomap is being built when /rgbdslam/batch_clouds transmits data?

Originally posted by onkel_keks on ROS Answers with karma: 28 on 2013-09-08

Post score: 0


3 Answers 3


Rosanswers logo

EDIT: I simply tried launching rgbdslam and octomap_server separately, and it worked. Octomap_server also didn't need my entire RAM this time. So it must be a problem with that launchfile. Thanks for the help!

EDIT 2: I'd like to mark this as the correct answer, but the system tells me I don't have enough "karma" to do that. So I have to leave it open. Unless somebody can tell me another way to close it.

Thanks for the answer,

I tried your suggestions with the following results:

  • Neither occupied_cells_vis_array nor octomap_point_cloud_centers display anything in rviz.
  • When visualizing /rgbdslam/batch_clouds (which is remapped to /cloud_in, see below), I see a colored pointcloud of the Kinect data.

I'm launching octomap via the pre-packaged launchfile rgbdslam_octomap.launch (included in the rgbdslam sources):

<!-- Launch octomap_server for mappingL: Listens to incoming PointCloud2 data 
    and incrementally build an octomap. The data is sent out in different representations. -->
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server" output="screen">
      <param name="resolution" value="0.005" />
      <!-- fixed map frame (set to 'map' if SLAM or localization running!) -->
      <param name="frame_id" type="string" value="map" />
      <!-- maximum range to integrate (speedup, accuracy) -->
      <param name="max_sensor_range" value="6.0" />
      <!-- Save octomap here on destruction of the server -->
      <param name="save_directory" value="$(optenv OCTOMAP_SAVE_DIR ./)" />
      <!-- data source to integrate (PointCloud2) -->
      <remap from="cloud_in" to="/rgbdslam/batch_clouds" />

As you can see, /rgbdslam/batch_clouds is remapped to cloud_in in the last line.

What am I supposed to see when visualizing cloud_in? Was that colored point cloud the thing that is to be expected and if so, is there any other explanation as to why octomap doesn't produce any output?

Thanks again!

Originally posted by onkel_keks with karma: 28 on 2013-09-10

This answer was ACCEPTED on the original site

Post score: -1

Original comments

Comment by Jbot on 2013-09-10:
Do you have a complete TF coming from "map" to your kinect frame ?

Comment by onkel_keks on 2013-09-10:
I did a "rostopic echo /tf" and saw following TFs being broadcasted:

  • camera_link -> camera_rgb_frame
  • camera_link -> camera_depth_frame
  • camera_depth_frame -> camera_depth_optical_frame
  • camera_rgb_frame -> camera_rgb_optical_frame

I suppose that hints towards a problem with rgbdslam providing no "map" TF? Also, my laptop gets really sluggish when I "Send Model", and I noticed octomap_server eats 2.6 GB of my RAM. (sorry for the terrible formatting, I don't know how to make it better)

Comment by uranor on 2013-09-30:
I am having the same issues, but I don't quite understand your edits in this answer. Did you get rgbdslam and octomap_server to work together? If yes, could you please explain how, i.e. using which launch files? Thanks

Comment by xuningy on 2014-05-28:
This is also the issue I have, and I have checked both the /octomap.. topics and /rgbdslam/... topics give no results. Has anyone found a solution to the transform?


Rosanswers logo

You can also create and save an octomap directly from rgbdslam, as the current version includes the octomap library. The GUI has the item Data->Save Octomap and there is a ROS service call (rosservice call /rgbdslam/ros_ui_s save_octomap filename.ot).

Originally posted by Felix Endres with karma: 6468 on 2013-09-16

This answer was NOT ACCEPTED on the original site

Post score: 2


Rosanswers logo

I found the answer, you need make the same process but you only need public the topic for send the poindcloud to octomap, you need cal the service. rosservice call /rgbdslam/ros_ui send_all and you see in rviz and octomap_server

Originally posted by dianita with karma: 11 on 2013-11-06

This answer was NOT ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.