ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

click to hide/show revision 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: cloud_xyzi_ );

It should implizitly convert between the types.....