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

Revision history [back]

Hi! Here I create "by hand" a sensor_msgs::PointCloud2 with 3 points. Reversing the process you should be able to extract the points coordinates from your pointcloud.

Btw, pcl::PointCloud<pcl::pointxyzrgb> is a PCL class, but I'm using sensor_msgs::PointCloud2 messages (that is what you get from a topic). They are different classes, but pcl_ros gives you functions to convert from one to the other.

Hope this helps. Tell us if you cannot reuse the code for your purposes.