Calling ROS subscriber callback functions from another function
Hi,
Is it OK (both technically and in terms of good programming practice) to call the callback function of a certain subscriber from within another function?
For example:
void callback(sensor_msgs::Image::ConstPtr & msg)
{
/*do stuff*/
}
void otherFunction()
{
sensor_msgs::Image::ConstPtr image_ptr;
/*do stuff*/
callback(image_ptr);
}
Thank you