I am getting a point cloud from a lidar on an autonomous driving robot, but it's too much data to process.
I already implemented a passthrough filter.
I did get a very good result and I was asking myself if there were others filters or methods I could dig into.
Of course I'm not looking for anything specific but rather a direction or advice, because I'm pretty new to the pcl library and it seems pretty huge.
Here is my filter now:
pcl::PointCloud<PointXYZIR>::Ptr cloudInput;
cloudInput.reset(new pcl::PointCloud<PointXYZIR> (cloud_in));
pcl::PointCloud<PointXYZIR>::Ptr cloudFiltered;
cloudFiltered.reset(new pcl::PointCloud<PointXYZIR>);
// Create the filtering object: downsample the dataset using a leaf size
pcl::VoxelGrid<PointXYZIR> avg;
avg.setInputCloud(cloudInput);
avg.setLeafSize(0.25f, 0.25f, 0.25f);
avg.filter(*cloudFiltered);
//Filter object
pcl::PassThrough<PointXYZIR> filter;
filter.setInputCloud(cloudFiltered);
filter.setFilterFieldName("x");
filter.setFilterLimits(-100, 100);
filter.filter(*cloudFiltered);
filter.setFilterFieldName("y");
filter.setFilterLimits(-100, 100);
filter.filter(*cloudFiltered);
cloud_out = *cloudFiltered;