| 85 | } |
| 86 | |
| 87 | Pointcloud::Ptr PointcloudProcessor::downsampleInputCloud(Pointcloud::ConstPtr inputCloud) const { |
| 88 | pcl::VoxelGrid<pcl::PointXYZ> voxelGrid; |
| 89 | voxelGrid.setInputCloud(inputCloud); |
| 90 | const auto& voxelSize = params_->get().downsampling_.voxelSize_; |
| 91 | voxelGrid.setLeafSize(voxelSize.x(), voxelSize.y(), voxelSize.z()); |
| 92 | Pointcloud::Ptr downsampledCloud(new Pointcloud()); |
| 93 | voxelGrid.filter(*downsampledCloud); |
| 94 | return downsampledCloud; |
| 95 | } |
| 96 | |
| 97 | void PointcloudProcessor::savePointCloudAsPcdFile(const std::string& filename, const Pointcloud& cloud) { |
| 98 | pcl::PCDWriter writer; |
no test coverage detected