Mission Coordinates topic for custom waypoint follower

Good day all

I am trying to make my own custom waypoint follower in the flight task and the hope is to plan a mission in QGC and have the drone fly that mission, but using my own flight task. I tried using the position_setpoint_triplet topic, however, it gets set to nan when switching over to position flight mode (as far as the resources are concerned, custom flight tasks are activated in position mode). My current thinking is therefore to write my own module which can publish these waypoints from QGC, but I cannot find the topic that holds the mission waypoints.

Any help is appreciated

So I have done some further digging and this is my current thinking.

It seems that position_setpoint_triplet is only published by navigator, and is also only published when in mission mode. Therefore, I must find a way to integrate my controller into the mission mode architecture. If my understanding is correct, the current controller which does this for MC drones is in the Auto module. So I have 2 options:

  1. Change the code in Auto to my personal controller
  2. Write my own “Auto” module and change the code in Flight Mode manager to point to my module instead:
// Navigator interface for autonomous modes
        if (_vehicle_control_mode_sub.get().flag_control_auto_enabled 
        && !nav_state_descend) {

     found_some_task = true;
     if (switchTask(FlightTaskIndex::Auto) != FlightTaskError::NoError) {
          matching_task_running = false;
          task_failure = true;
      }
}

If possible, I will try to do option 2, but this will probably require me to do all the other admin, such as takeoff and safety, which is not necessarily a good idea. Will post again to this topic if I have any success