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

Revision history [back]

click to hide/show revision 1
initial version

For the publishing of data i guess you have to use cv_ptr2.image field. If you assign your dst_norm_scaled(cv::Mat i am guessing) to cv_ptr2->image.data . I guess the image_pub_.publish(cv_ptr->toImageMsg()) command should work. And there can be more than two pointers of cv_bridge, further the exception you are getting could be related to you not assigning the data properly to the pointer. For the third point i am not sure.

click to hide/show revision 2
It shoudl be cv_ptr2->image and not cv_ptr2->image.data

For the publishing of data i guess you have to use cv_ptr2.image field. If you assign your dst_norm_scaled(cv::Mat i am guessing) to cv_ptr2->image.data cv_ptr2->image . I guess the image_pub_.publish(cv_ptr->toImageMsg()) command should work. And there can be more than two pointers of cv_bridge, further the exception you are getting could be related to you not assigning the data properly to the pointer. For the third point i am not sure.