Offboardmode

Dear All,
I do appreciate your help to give me some explanation and your advice.

According to the PX4 architecture as you can see in this link :

I am interested in the angular rate controller which has the angular velocity set point as an input and the torque is the output

now I am interesting in changing this PID controller to another type of controller.

I was searching how to do that and I found the offboard mode is great based on some advices.

What i wanna do to read the angular velocity input (set point ) and do my algorithm and send the torques to the mixture

now this is the offboard message:

bool position
bool velocity
bool acceleration
bool attitude
bool body_rate
bool thrust_and_torque
bool direct_actuator

so as you can see it is in order but this is what i did not understand and i need your help

  1. If I set the thrust_and_torque to be true, does that mean all the previous controller such as body and attitude rate controllers will be off in the px4 firmware, or they will continue to run and I will just inject the new torques values to the mixture

  2. if I wanna replace the angular rate controller with a new algorithm, does setting thrust_and_torque to true is the right options

  3. I prefer to not change the firmware to do the algorithm, so am i on the right path, any suggestion other than offboard mode or it fits here?

  4. I did a small test to subscribe to the Q values and the angular rates values while running the offboard mode and I sat the thrust_and_torque to true and sent some values. Do the angular rate values and the Q values came from the same cascading architecture ? here is the topic that i suscribe to :

    • topic: /fmu/out/vehicle_angular_velocity
      type: px4_msgs::msg::VehicleAngularVelocity
  • topic: /fmu/out/vehicle_attitude
    type: px4_msgs::msg::VehicleAttitude

Thank you very much

Have a look at Offboard Mode | PX4 User Guide (main). For “1” at least you’ll see that the controllers before the first non-zero value are disabled.

I don’t know the answers to the rest, but check this doc and see.