Actuator Control and Mixer Definition

Dear All, Hope you are all well.

I am working on Autonomous Drones using Mavros and PX4 both in SITL and real time.

For now, I am writing the controller which will give me the forces and torques. However, I have developed the control allocation matrix to get relationship between F/torques and motor angular velocities.

I have seen some useful discussions about control the drone using /mavros/actuator_control or /mavros/target_actuator_control. I have some confusion so please help me.

  1. It is mentioned that the “controls” in /mavros/actuator_control topics are servo raw outputs, however they are actually responsible for thrust and torques (roll-pitch-yaw). I have a question, when we command on roll-pitch-yaw and thrust in /mavros/actuator_control topic, do they pass through the Mixer File in Firmware?
    In Offboard mode, when we command to actuator topics so only [Mixer].mix file is used or MulticopterMixer.cpp is also used. I am confused here.

Could some one link me how the flow will actually work after I command on /mavros_actuator control.

Thanks

I am also dealing with the same problem. I am trying to implement a simple version of px4 controller but I am confused with the mixer stuff.

Let see, if we get some expert opinion.

I asked my question in detail in here, could you please help it can be seen by replying?

Hi, I have read your questions. You are somewhat confusing yourself

Let say you already have the Effectiveness matrix ‘G’ from geometry. Lets keep it for a while.

Now go the control structure of drone.

  1. what we have PD type position control that will give us error in position and velocity.
  2. Then we normally try to compute the drone desired attitude usually Rotation matrix or quaternion.
  3. This will help us to develop attitude control.

Basically position control gives us commulative thrust and desired attitude. The attitude control gives us desired body torques. Now you have a 4x1 vector like (F, taux, tauy, tauz).transpose().

Find B from effectivess matrix.

Get your u.

I have one question from you. If you are using this. How did you manage the default mixing strategy of PX4 because that is different.

I noted that px4 mixing matrices are constant ones for each special config and not related to momentum arms. However, I still don’t know how to define delta_T_sp using the acceleration setpoints coming from the velocity control part. I would apprecaite your help.