【点云处理】使用pcl内置的Voxel Grid Filter对原始点云进行降采样

该博客介绍了如何利用PCL库中的VoxelGridFilter对来自Livox LiDAR的点云数据进行降采样。通过设置0.2米的叶尺寸,将原始点云数据过滤并减少了点的数量。降采样后的点云数据在保持关键信息的同时,显著降低了数据量,提高了处理效率。

        该节点会订阅"/livox/lidar"话题的点云数据,使用PCL内置的Voxel Grid Filter对点云数据进行降采样,过滤后的结果发布到"filtered_points"上。

 

#include <iostream>
#include <thread>
#include <sstream>

#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/common/common.h>
#include <pcl/common/transforms.h>
#include <pcl/PCLPointCloud2.h>
#include <pcl/people/person_cluster.h>
#include <pcl/filters/voxel_grid.h>

#include <ros/ros.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/PointCloud.h>
#include <sensor_msgs/PointCloud2.h>
#include <sensor_msgs/point_cloud_conversion.h>
#include <functional>


int main(int argc,char** argv)
{
    ros::init(argc,argv,"n_lidar_voxel_grid_filter");
    ros::NodeHandle node;
    ros::Subscriber pointcloud_sub;
    ros::Publisher pointcloud_pub = node.advertise<sensor_msgs::PointClou
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值