ROS&OpenCV to stop/resume the mission?

Hi!

Sorry if this is not the right category to ask this but I’m confused about the general design of this forum. Sorry…

My project uses ROS. The mission is quite simple. I wanna interrupt the mission (already drawn on GCS) if possible. When OpenCV detects an object on the camera frame… Stop the mission and descend the drone. When descended resume the mission.

How could I achieve that?

Yes it is possible to pause the mission. Just change the mode to guided or someting like that.

Guided mode? I think that can’t help my project. What I meant:

  1. Draw mission on GCS
  2. Run ROS in background
    2.1. a ROS node tries to detect an object
    2.2 when it does stop the mission (drawen on GCS) and descend
    2.3 Rise up
  3. Continue to mission

Thanks…

  1. Draw mission on GCS
  2. Run ROS in background
    2.1. a ROS node tries to detect an object
    2.2 when it does:
    2.2.1 Change mode to GUIDED
    2.2.2 descend
    2.2.3 do other stuff under ROS control
    2.2.4 Rise up
    2.3.5 Resume mission by changing mode to auto

That is the way we do it in our company

Can I do it another way?

I’ve faced with couple of parameters (I suppose they were something like MAV_CMD_OVERRIDE_GOTO, MAV_GOTO_DO_HOLD, MAV_GOTO_DO_CONTINUE) for Mission resuming and pausing. Can I send arguments/parameters to these to pause the mission, do these stuff then continue to mission.

Thanks by the way for the reply. :slight_smile: