PCL has replaced the "sensor_msgs::PointCloud2" type to "pcl::PCLPointCloud2".
PointCLoud2 is a ROS message type.
=> So you had to use the PCLPointCloud2 type in PCL when you want to have interactions with ROS.
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)
Solution
PCL has replaced the "sensor_msgs::PointCloud2" type to "pcl::PCLPointCloud2".
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:"