문제

I want to know the difference(s) between pcl::PCLPointCloud2 and pcl::PointCloud in PointCloud Library (PCL). There is a function to convert from one to another, but the documentation is very poor. I would like to know, which one is newer?

p.s. (I am not talking about ROS)

도움이 되었습니까?

해결책

  1. PCL has replaced the "sensor_msgs::PointCloud2" type to "pcl::PCLPointCloud2".

  2. PointCLoud2 is a ROS message type.

=> So you had to use the PCLPointCloud2 type in PCL when you want to have interactions with ROS.

다른 팁

When you subscribe or publish, you don't need to convert them. #include "pcl_ros/point_cloud.h" will do that for you (called serialization). For more detail, take a look here: http://wiki.ros.org/pcl/Overview#Subscribing_to_different_point_cloud_message_types. Look for the paragraph starting at "If you have a pcl::PointCloud object, you don't have to convert it to a message:"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top