ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
It seems that you're using a pointer in one case (sensor_msgs::ImagePtr) and that your message is expecting a value (sensor_msgs/Image im). As explained at this line.
no known conversion for argument 1 from ‘sensor_msgs::ImagePtr {aka boost::shared_ptr<sensor_msgs::image_<std::allocator<void> > >}’ to ‘const sensor_msgs::Image_<std::allocator<void> >&’
this means that you are providing a sensor_msgs::ImagePtr
and the operator is expecting a const sensor_msgs::Image_ >&
So you need to change:
msg2.im = im_msg;
into msg2.im = *im_msg;
Hope this helps