-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Remove mode_req_local_alt from Descend mode and handle it in FW position controller #23840
Conversation
Signed-off-by: Silvan Fuhrer <[email protected]>
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.
Sorry for the crash.
LGTM, just one minor point that you can decide whether to incorporate
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.
It looks good but I gave it a spin on multicopter and even though it does the right thing in the end the flight task produces invalid setpoints I assume because the wrong one is ran. And the only thing preventing a worse outcome is the emergency failsafe inside the controller 👀 Let me check, there must be a simple fix.
I'm on it. I think it's because I broke the order here 0770478#diff-2ece9759fa20e22b2e0af81c3f3b5892b934c8535b65d0eea103aa342fe997fdL43 🤦♂️ |
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 found the mistake I made in #21192
a) The big one is that I changed the order of the horizontal and vertical acceleration setpoint and in the case you don't have a vertical velocity estimate (like here) it broke.
b) The smaller but not negligible one was that I reduced the downwards acceleration to a too low value in hindsight. It's too risky that the hover thrust is not perfectly accurate and this results in an ascent instead.
I fixed both in the one last commit, please quickly double-check.
c32b812
to
e0b4ed5
Compare
…v_state DESCEND Signed-off-by: Silvan Fuhrer <[email protected]>
e0b4ed5
to
749876c
Compare
Also descend with more acceleration again to avoid the risk of ascending instead of descending because of a wrong hover thrust estimate.
@sfuhrer I readded my commit (only) 👍 |
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.
Thanks for looking into that before other people accidentally crash even though they don't have to 🙏
Solved Problem
I recently crashed a VTOL vehicle in FW after disabling both GPS and baro fusion in air, which made it switch from AUTO to TERMINATE mode.
Solution
Changelog Entry
For release notes:
Test coverage
Can be easily tested in SITL: Disable Baro fusion (EKF2_BARO_CTRL), then takeoff in auto mode, then disable GPS fusion --> with current main it goes to Termination mode, with this PR to Descend.