pcl::PointCloud<pcl::PointXYZ>::Ptr temp_cloud(newpcl::PointCloud<pcl::PointXYZ>); pcl::fromPCLPointCloud2(pcl_pc2,*temp_cloud);//do stuff with temp_cloud here} http://answers.ros.org/question/136916/conversion-from-sensor_msgspointcloud2-to-pclpointcloudt/...