Convert PointCloud2 to Occupancy Grid
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.
Thanks
Sounds like something the spatio_temporal_voxel_layer can do.