Greetings. I apologize for the long question. I am trying to learn how create mixer files that work with px4. So as a first step I wanted to create a mixer for a simple quadrotor.
I calculated the mapping, M, transforming the motor thrusts,fi, into collective thrust, f, and torque, u, (using the east,north,up frame) as:
[f; u]=M*[f1;f2;f3;f4], M=[1,1,1,1;
lx,-lx,lx,-lx;
-lx,lx,lx,-lx;
-ct,-ct,ct,ct]
I tried to use this together with https://dev.px4.io/v1.9.0/en/concept/mixing.html to design the mixer however I could not achieve stable flight. Not even close.
I also tried to use M^{-1}, calculate f_i i=1,…,4 and then send the commands directly to each actuator by creating a mixer that feeds each actuator with a specific signal only. This showed some promise however the results were not good enough. So through this process I saw that there is a number of things that I could not understand how they work in px4:
- The body fixed frame in px4 is the east,north,up (ENU) or the north,west,down (NWD)? In the modules I see that a roll-pitch-yaw sequence is used thus implying that the NWD frame is used. Is this true or are there some instances that the ENU frame is used also?
- Since the propeller spinning direction is predetermined in px4, what do I do with the last row of the mapping M above.
- Also I am a bit confused on how the mixer takes into account the fact that the motors spin only towards a specific direction and also the distance of the motor from the CM. How do I pass this information using the building blocks of a mixer file:
M: 1
S: 0 3 10000 10000 0 0 10000
for example above I assumed that the the value of the 7th column should be zero since the motor doesn’t spin backwards. However I was not successful to build a mixer using summing blocks.
The same holds if I tried to interpret the yaw command using the summing block. I do not know how to include the ct information:
S: 0 2 10000 10000 0 -10000 10000
- Do I need to find an idle spinning velocity and use that in the
option in order for the negative commands to work?
5. Also I have seen the multirotor mixer definitions
R:
and observed that there is a mixer library that generates automatically the mixer files however I could not find any documentation on how to do this. I also noticed that the arm lenght of each vehicle is included in the definition however I could not find the generated mixer files that would allow me to study and learn how to create my own.
6. Finally are there any tutorials or documentation on mixer creation or automatic definition (other than https://dev.px4.io/v1.9.0/en/concept/mixing.html)?
I would like to start slow and create a mixer for a simple quad however the end goal is using vast px4 capabilities for a more complicated vehicle. #general #random (edited)