1. 程式人生 > >PCL數據類型和ROS數據類型的轉換

PCL數據類型和ROS數據類型的轉換

SM cloud int 數據 space 數據轉換 AR type spc

參考網址 http://wiki.ros.org/pcl/Overview ,重點參看第2和第3節。

1. Data types

介紹了三種點雲數據類型:sensor_msgs::PointCloud(不常用),sensor_msgs::PointCloud2,pcl::PointCloud<T>

2. Point Cloud conversion

兩種情形下需要進行數據轉換

2.1. Converting between sensor_msgs::PointCloud2 and pcl::PointCloud<T> objects

註意:pcl::fromROSMsg and pcl::toROSMsg 函數逐漸被廢棄。

2.2. Converting between the `sensor_msgs::PointCloud` and `sensor_msgs::PointCloud2` format

3. Publishing and subscribing to point cloud messages

代碼演示,訂閱和發布不同數據類型的點雲。

PCL數據類型和ROS數據類型的轉換