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.
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.
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.
what we have PD type position control that will give us error in position and velocity.
Then we normally try to compute the drone desired attitude usually Rotation matrix or quaternion.
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().
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.