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

what's the difference between point cloud and octomap. Where do we use Octomap instead of Pointcloud?

asked 2021-09-08 22:59:47 -0600

SEN TenZ gravatar image

I am unable to understand the difference between these two so cant decide which approach to go with

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-01-06 06:08:26 -0600

JunTuck gravatar image

A point cloud is a set of 3D points, where each point has a x-, y- and z- coordinate, whose units are usually meters.

An octomap is a memory-efficient 3D occupancy grid. It's built on the octree data structure. Each cell in the grid has a value which indicates if it is occupied, free or unknown. Cells do not necessarily have the same size, since they are created ad-hoc from raycasting each point of a point cloud. This is a really cool visualization of raycasting a single 2D point in a quadtree (credits to Daniel Zduniak).

A typical use case is as such:

  1. A depth camera produces depth images of resolution 640x480 at 6 frames per second.
  2. Each depth image is converted to a point cloud.
  3. Each point cloud is inserted into the octomap.
  4. Cells in the octomap are updated according to each point in the point cloud.

You could think of an octomap as a downsampling of point clouds. If you were store each point cloud in the example above, you would have 110 million points after one minute and you'd run out of memory very quickly. An octomap however keeps it limited to the size of the physical space.

edit flag offensive delete link more



Nice answer. I'll add that usually (repeat: usually) a PointCloud contains data points for a single "instant", but an OctoMap accumulates data points over some time span (perhaps obsoleting data with a time-decay function.)

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-06 12:01:46 -0600 )edit

Another difference: the data points in a PointCloud are infinitely small, conveying no information about what is in the gap between two "adjacent" points. The OctoMap fully describes the entire 3d volume that it covers.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-06 12:27:33 -0600 )edit

Question Tools

1 follower


Asked: 2021-09-08 22:59:47 -0600

Seen: 882 times

Last updated: Jan 06 '22