-
Notifications
You must be signed in to change notification settings - Fork 20.2k
Plane: Quadplane: add thrust loss detection #31764
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
Conversation
|
Very interesting @IamPete1 - this might work with 4 motors. Since 4.6 QuadPlane can deal with lost motors much better than it used do and specifically the Griffin Pro (in SITL anyway) will not crash if I simulate losing a motor. |
b9a004d to
59facc0
Compare
|
Marked for call to discuss:
Still to do:
|
ArduPlane/quadplane.cpp
Outdated
| } | ||
|
|
||
| // Run thrust loss check | ||
| thrust_loss_check(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe not run when in fwd transitions? or turn off if any motor tilted beyond 45 degrees?
and add option to disable it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a option param, it can be turned off completely, or turned off in everything except transitions.
59facc0 to
09daf8d
Compare
09daf8d to
4abeede
Compare
| uint16_t counter; | ||
|
|
||
| // Options parameter and helper | ||
| AP_Int32 options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32 seems extreme
| // No failed motor | ||
| if (!motors->get_thrust_boost()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // No failed motor | |
| if (!motors->get_thrust_boost()) { | |
| if (!motors->get_thrust_boost()) { | |
| // No failed motor |
Or
| // No failed motor | |
| if (!motors->get_thrust_boost()) { | |
| // Check for failed motor | |
| if (!motors->get_thrust_boost()) { |
similarly for other things in here
This adds thrust loss detection to quadplane. The thresholds are copied from copter. For thrust loss to be detected the following must be true for one second:
When thrust boost is detected it will stops the mixer constraining the other motor outputs based on the failed motor. This will only really help if you have more than 4 motors since if you have 4 or less you will have already crashed.
Copter has a flight option to disable this check, we will likely want the same.
Currently this is active all the time, we may want to ignore transitions (especially for tiltrotors) or change the thresholds.
Draft PR for now to get some testing.
Another option would be to expose the
motors->set_thrust_boostto scripting so the check could be done with a script and tailored to a specific vehicle, or by using ESC telem for example.