Multicopter control equation doubts

Hi guys,
for a work that I’m doing, I need to write the equations of the multicopter controllers considering most of the implemented code.
I have some doubts about some parts:

  1. In “mc_pos_control/PositionControl/PositionControl.cpp”, the function “_accelerationControl()”
    should transform the acceleration setpoint into a thrust setpoint. Is there any documentation/paper about that?

  2. In “mc_pos_control/PositionContro/ControlMath.cpp”, the function “bodyzToAttitude()” you define y_C, as a vector of the desired yaw direction in XY plane rotated by PI/2. Why do you rotate that vector?

Note, @MaEtUgR will share the dev summit video & documentation explaining reasoning behind this

1 Like

@salmarc Sorry for any delay. It’s not (yet) mentioned in the user guide documentation. Here are the slides of where I tried to explain the concept at the PX4 dev summit July 2020, see slide 11:
2022 DevSummit presentation - Overview of multicopter control.pdf (2.1 MB)
and here is the recording at the right time mark:

I’m happy to explain in more detail and also to take feedback on what could be improved. Note that we already discussed that this part of the code should not be part of position control but a separate allocation such that it’s easy to test other strategies and e.g. also correctly adapt to the omnicopter allocation. We also discussed to spearately command a tilt vector and “level yaw” setpoint separately and assemble the final quaternion only in the attitude controller to have a more flexible interface and in total less back and forth calculations.

@MaEtUgR Thank you a lot for the answer.
I will watch the video and I will try to understand better. I will let you know.

Thanks