ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To convert PCLPointCloud2::Ptr to PointCloud<pcl::pointxyz> , you have to use the function "fromPCLPointCloud2".

For example :

pcl::PCLPointCloud2::Ptr cloud_filtered (new pcl::PCLPointCloud2 ());
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered1 (new pcl::PointCloud<pcl::PointXYZ>()); 

pcl::fromPCLPointCloud2(*(cloud_filtered), *(cloud_filtered1));