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

Revision history [back]

The easiest way to do what you want is having a single subscriber callback and taking the decision which processing step to perform based on the boolean from within the callback.

Like so:

imageCallback(ImageConstPtr img)
{
  //Check the bool
  if (use_default_image_processing){
   defaultProcess(img);
  }else{
   someOtherProcessingStep(img)
  }
}