Switching from Mission to Offboard Control Mode during execution of a mission and back

Hello All,

I’m currently working on implementing an offboard control mode using a companion computer for a PX4-based autopilot. My workflow involves the following steps:

  1. Uploading the Plan File:
    The plan file is uploaded to the UAV.
  2. Automatic Mode Switch:
    During the execution of the plan file in mission mode, at a specified waypoint, the UAV needs to automatically switch to offboard control mode to execute tasks that only the companion computer can perform.
  3. Completion and Mode Reversion:
    Upon completing these tasks, the UAV must switch back to mission mode to complete the rest of the mission.

I am seeking information on whether there is existing functionality in PX4 that allows for the automatic switching from mission mode to offboard control mode at a designated waypoint. If one does not exist, any suggestions to implement this are appreciated.

Thank you for your assistance.

Duplicate of Switching from Mission to Offboard Control Mode.