ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are mixing two things.
You have a PointCloud
and declared the publisher for a sensor_msgs::PointCloud2
.
The best way is to use a publisher from pcl_ros (3.1) to directly publish a PointCloud
as a sensor_msgs::PointCloud2
. Alternatively you would have to convert that manually. The pcl_ros publisher will do this for you.