ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As you guessed, the type of the variable you are giving to the publisher is different; it will convert to sensor_msgs::PointCloud instead of pcl::PointCloud, so try the following
void callback(const ImageConstPtr& image, const PointCloud2ConstPtr& pt_cloud)
{
PointCloud pt_cloud1;
convertPointCloud2ToPointCloud(*pt_cloud, pt_cloud1);
ptc_pub.publish(pt_cloud1);
}