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

Your callback is a function, so it's always possible to call it manually.

In your case, I suspect the reason you're having trouble calling it is because it takes a const sensor_msgs::ImageConstPtr & as the argument, which is actually a const boost::shared_ptr<sensor_msgs::Image> &, and you're passing it something else.

The simplest way to solve this is to construct the appropriate shared pointer type and pass it in.

Since you're working with images, you might also be able to use cv_bridge to create the appropriate shared pointer based on an existing OpenCV image.