ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

pmarinplaza,

if your sensor_msgs::image has been properly built, then sensor_msgs::imageConstPtr& will be automatically generated. Have a look in your sensor_msgs/image.h, ConstPtr should be there as an element in the Image_ structure. So there should be no conversion (by you) required.

It should be a matter of simply

left_image_pub_.publish(left_image_.ConstPtr, ci);

pmarinplaza, enter code here`pmarinplaza,

if your sensor_msgs::image has been properly built, then sensor_msgs::imageConstPtr& will be automatically generated. Have a look in your sensor_msgs/image.h, ConstPtr should be there as an element in the Image_ structure. So there should be no conversion (by you) required.

It should be a matter of simply

left_image_pub_.publish(left_image_.ConstPtr, ci);

ci);