雷达点云 sensor_msgs::PointCloud2 pcl::PointCloud
数据格式转换参考代码
官方对点云格式的介绍,主要有四种,sensor_msgs::PointCloud已经弃用。参考
sensor_msgs::PointCloud — ROS message (deprecated)
sensor_msgs::PointCloud2 — ROS message
pcl::PCLPointCloud2 — PCL data structure mostly for compatibility with ROS (I think)
pcl::PointCloud<T> — standard PCL data structure
sensor_msgs::PointCloud2 to pcl::PointCloudpcl::PointXYZ如果报错可以参考解决办法
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/point_types.h>
#include <pcl/PCLPointCloud2.h>
#include <pcl/conversions.h>
#include <pcl_ros/transforms.h>
void cloud_cb(const boost::shared_ptr<const sensor_msgs::PointCloud2>& input){
pcl::PCLPointCloud2 pcl_pc2;
pcl_conversions::toPCL(

这篇博客主要探讨了雷达点云数据从sensor_msgs::PointCloud2格式转换到pcl::PointCloud的过程,涉及点云降采样和平面系数估计。还提到了不同传感器在Ubuntu下的配置,如Xsens、SBG和Nooploop,并分析了相关ROS节点的时间戳和话题。同时,介绍了SLAM领域的经典算法如GMapping和Hector SLAM的安装配置。
最低0.47元/天 解锁文章
4665





