ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You don't need to! Just include the following header:
#include "pcl_ros/point_cloud.h"
advertise your pointcloud_pub_ with type sensor_msgs::PointCloud2
pointcloud_pub_ = nh_.advertise<sensor_msgs::PointCloud2> ("/cloud", 1, false);
and call publish give the point cloud with your explizit type:
pointcloud_pub_.pub( cloud_xyzi_ );
It should implizitly convert between the types.....