Convert PointCloud2 to Occupancy Grid

asked 2021-01-31 16:29:38 -0500

zlg9 gravatar image

updated 2021-01-31 17:16:05 -0500

Hi. Is there a tool/example available for converting sensor_msgs::PointCloud2 to occupancy map with cell indices "occupied, unoccupied and unknown" ? I will need to use such a tool for two purposes:

  • Subscribe to 3D Point Cloud topic and publish its 2D occupancy grid for rviz visualization. This is frame-wise operation and requires no other message other than point cloud.
  • I am using PCL octree and wish to create a 2D occupancy grid of the same dimension and resolution ignoring z axis in real-time. So a grid cell indexing will be convenient if I can access to its equivalent voxels if needed.


edit retag flag offensive close merge delete


Sounds like something the spatio_temporal_voxel_layer can do.

gvdhoorn gravatar image gvdhoorn  ( 2021-02-01 03:15:42 -0500 )edit