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:
- A depth camera produces depth images of resolution 640x480 at 6 frames per second.
- Each depth image is converted to a point cloud.
- Each point cloud is inserted into the octomap.
- 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.