ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Using high-density high-framrate data in octomap_server will definitely saturate your CPU. There will be an (expensive) raycast to every endpoint before inserting the ray into the map.

Ideally, you will have a spare core that can be used by just octomap_server, but even then you need to preprocess or throttle your data. Our paper (linked from http://octomap.github.io/) will give you some idea about the performance.

Some steps to take:

  • Throttle the framerate of the point clouds. There's no need to build maps with 30Hz. 5 or even 1 Hz will be just good.
  • Change the octomap resolution (parameter ~resolution, directly relates to the performance)
  • Subsample the point clouds e.g. with a PCL voxel grid so something just below your octomap resolution
  • Set the maximum range for rays to your area of interest, e.g. 5m (~sensor_model/max_range, directly relates to the performance)
  • Set the ~latch parameter of octomap_server to false, and only subscribe to topics you absolutely need.