Question

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)

Was it helpful?

Solution

  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.

OTHER TIPS

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:"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top