Closed TunVunDerBunn closed 2 years ago
Hi Tun, thank you for your contribution. So if I see correctly, this voxelizes the pointcloud used for the ground plane removal, correct? But you can already do that (yaml file, line 41). Or am I missing someting here?
Or is this voxelized pointcloud then passed to the tree detection further on? In case you also want to voxelize the cloud used for tree detection, I would do that outside of the ground plane remover. This should be done in the class/function that owns an instance the ground plane remover.
Hi Edo, beforehand only the some voxelization was done during the generation of the grid map, but this did not influence the point cloud, which was passed to the tree detection. This made the tree detection extremely slow.
Should I implement it as some sort of preprocessing of the point cloud, before it is passed into the ground remover?
Hi Tun,
thanks for the clarification. I think adding a cloud preprocessor is a cleaner solution since it nicely separates responsibilities between the ground removal and pointcloud pre-processing. So I would preprocess the pointcloud inside the tree_detection_node.cpp. Then once this is cropped or downsampled or both, you can pass it to the ground plane remover and tree detection.
Does that make sense?
Hi Edo,
Yes, that makes sense. I will make the necessary changes in the coming days.
as discussed, we implement the changes required in another PR.
If the point cloud expansion is too large, the pcl voxelgrid filter outputs a warning in the terminal. An integer overflow seems to happen.
Although, there is already a voxelgrid filter in the computation of the elevation map, a considerable speed up can be obtained by applying a voxelgrid filter before adding the elevationLayer to the grid map (if the point cloud contains a lot of very close points).
Quick Note: the voxelgrid filter used in the pipeline of the grid_map seems to be more performant than the one provided by pcl, as no warning is rising when applying the same leaf size. (It might be that the warning is suppressed by the package)