-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Singularities in control allocation's pseudo inverse #23606
Comments
@Donecle Could you please show the params and resulting control allocation matrix directly here (copy or screenshot)? |
Sure. x CA_ROTOR0_AX [123,242] : -0.0612 EFFECTIVENESS: 0|-1.52425 1.55350 -1.54700 1.55350 MIX: 0|-4.6e+02 -5.3e+02 5.2e+02 -4.6e+01 0 -1.8e+04 |
If I understand correctly, you have 2 pairs of coaxial rotors, which is quite weird. Maybe check if it fails at the pseudo-inverse level or if it's due to the normalization. |
Apologies, copy paste issues for the parameters, here are the correct ones: x CA_ROTOR0_PX [128,247] : 0.2410 Thanks for your help! |
Nevermind, this is still not enough to reproduce, I'll give you the correct set later today. |
@Donecle Maybe you could add your case in an unit test to debug it more easily if you can reproduce it: https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverseTest.cpp |
Mmh I've never done this but I could try. Here is a set of param to change in startup script to have a failure: param set-default CA_ROTOR_COUNT 4 EFFECTIVENESS: |
Here's a flight log on this setup : https://logs.px4.io/plot_app?log=86e11219-3fcc-46c5-8068-f377ecfd2419 |
Looks like the fullRankCholesky function founds a rank of 5 instead of 4 on this param set. |
If I force 10 times higher value here : https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/matrix/matrix/PseudoInverse.hpp#L83, it founds a rank of 4 as it should. This looks like a numerical issue. |
Describe the bug
While trying some new quad frame geometry parameters today, we had a bad crash at takeoff (2 front motors full throttle and 2 back motors idle).
To Reproduce
In simulation,
Expected behavior
The geometry in the log is quite common and should result in a correct mixing matrix.
Screenshot / Media
No response
Flight Log
https://logs.px4.io/plot_app?log=4679a30d-9709-4950-b57f-9b47603b4fa3
Software Version
main, on August 23rd, 2023
Flight controller
px4_sitl
Vehicle type
Multicopter
How are the different components wired up (including port information)
Default
Additional context
No response
The text was updated successfully, but these errors were encountered: