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

OK...this code fixed the issue (there maybe other issues) but I do not know why....if someone can explain it would be helpful.

  pcl::PointCloud<pcl::PointXYZRGBA> cloudxx;
  pcl::fromROSMsg(*msg,cloudxx);  // Convert ros msg cloud to pcl cloud
  pcl::PointCloud<pcl::PointXYZRGBA>::Ptr point_cloud_ptr (new pcl::PointCloud<pcl::PointXYZRGBA>(cloudxx));
  CloudConstPtr cloud(point_cloud_ptr);