I would like to turn a 3D point cloud into a simple 2D occupancy grid. In my current implementation I first apply the voxel grid to a point cloud and then I manually iterate through all points in the voxelized cloud to fill in my grid. Is there a way to make it so that while I am voxelizing the grid, I am generating my 2D occupancy grid?
Asked
Active
Viewed 805 times
1 Answers
0
You could probably create a new class, derive from pcl::VoxelGrid
(see here), and implement your custom applyFilter
which would shadow the one in the base class. This would allow you to use the same utility functions and code, and introduce your new behavior.

Dexter
- 2,482
- 27
- 40
-
1Hi Dexter, thank you for your kind reply. Do you know of any existing example code snippets that do something similar? I am somewhat new to all of this. – Chris Chan Jun 19 '18 at 02:18
-
The [VoxelGridCovariance](http://docs.pointclouds.org/1.7.1/voxel__grid__covariance_8h_source.html) class seems to do something similar. – Dexter Jun 19 '18 at 14:55
-
1Thank you kind sir. – Chris Chan Jun 20 '18 at 04:05