Ask Your Question
0

Builing an Octomap from rgbdslam

asked 2013-09-08 23:23:52 -0500

onkel_keks gravatar image

updated 2014-01-28 17:17:53 -0500

ngrennan gravatar image

Hello,

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?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
-1

answered 2013-09-10 05:26:05 -0500

onkel_keks gravatar image

updated 2013-09-11 01:11:01 -0500

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" />
</node>

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!

edit flag offensive delete link more

Comments

Do you have a complete TF coming from "map" to your kinect frame ?

Jbot gravatar image Jbot  ( 2013-09-10 06:43:26 -0500 )edit
1

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)

onkel_keks gravatar image onkel_keks  ( 2013-09-10 22:52:13 -0500 )edit

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

uranor gravatar image uranor  ( 2013-09-30 04:30:31 -0500 )edit

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?

xuningy gravatar image xuningy  ( 2014-05-28 04:43:31 -0500 )edit
2

answered 2013-09-16 05:40:01 -0500

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).

edit flag offensive delete link more
1

answered 2013-11-06 02:17:32 -0500

dianita gravatar image

updated 2013-11-06 02:19:11 -0500

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

edit flag offensive delete link more
0

answered 2013-09-09 01:05:36 -0500

Jbot gravatar image

Maybe the octomap server build the map but you juste don't see it. To see the 3D map, you have to subscribe (under RVIZ) to the topic :

occupied_cells_vis_array (visualization_msgs/MarkerArray)

or, if you prefer a pointCloud :

octomap_point_cloud_centers (sensor_msgs/PointCloud2)

If you don't see anything in these topics, try to vizualise if the input pointcloud of octomap is ok.

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

3 followers

Stats

Asked: 2013-09-08 23:23:52 -0500

Seen: 2,171 times

Last updated: Nov 06 '13