Converting a PCL pointcloud to a ROS pcl message/ ROS pcl message to PCL point cloud

The relation between ROS and PCL point cloud is a little bit complicated, at first, it was part of ROS, then it became a separate project and whole the time you need some serializer and deserializer to send and receive point cloud ROS messages. There are some old deprecated ways to do that and they still exist in the ROS documentation which confuses the programmers, so here is the right API to use:

converting a PCL point cloud to a ROS PCL message

first, include the corresponding headers:

converting ROS PCL message to a PCL pointcloud:

more about pcl point cloud and conversion

Leave a Reply

Notify of