-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
FlightTasks: disable failsafe descend on RC loss #13125
Conversation
The problem with returning false and therefore causing a FlightTask failsafe is that it does not follow the configuration that one might set using the commander params. Specifically if the RC failsafe behaviour is set to "Disabled" (0), then the FlightTasks failsafe causes the drone to descend even though it supposedly should not react at all. With this change the behaviour is as follows with NAV_RCL_ACT = 0: - POSCLT: stays in POSCTL but with all sticks 0, so it stays still. - ALTCTL: stays in ALTCTL but with all sticks 0, so it stays horizontal and keeps altitude. - MANUAL: stays in MANUAL but with all sticks 0, so it stays horizontal but throttle will be half-way which either leads to a descent or fly away. This case is clearly not optimal.
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.
Like I wrote in #12307 (comment) I consider no reaction during manual piloted flight when having RC loss totally unsafe. At least the vehicle needs to stop relying on RC data, that might be reside in arbitrary state depending on the implementation, anymore.
We should not ignore error cases but handle them in the way we want. Let me check if I can come up with a solution that covers the original issue.
How about #13130 ? I'm just handling the failsafe differently. What do you think? |
@MaEtUgR this seems to work fine for POSCTL and ALTCTL but for MANUAL it just keeps going in the last direction while (in my case) descending. |
Well since #10805 stabilized mode is back to the attitude control module which makes sense in terms of not needing the position controller to fly manual and having a lower level independent fallback but also means it doesn't go through the same processing pipeline. As a result neither my nor your pr change anything there. I am not exactly sure yet what you would expect in the case of flying in manual mode, RC getting lost and the state machine not doing anything. There should be an emergency emergency failsafe where the controller does the best thing it can do. That was never the case before and I planned to roll over the attitude and rate controller to improve these cases, it was just not a priority. Can we do this in steps, first merge the solution for position and altitude mode and I try to find good handling in attitude control? |
Ok, I understand but the confusing part is that MANUAL seemed to work with my fix. I guess I need to try it again. Maybe it's some race condition that makes it work. |
@MaEtUgR ok, you're right. My tests were wrong. Also with my/this PR it will just keep going in MANUAL. |
While this fix alleviates the problem where a vehicle lands when it should keep hovering, it adds the scary case where flying |
The problem with returning false and therefore causing a FlightTask failsafe is that it does not follow the configuration that one might set using the commander params.
Specifically if the RC failsafe behaviour is set to "Disabled" (0), then the FlightTasks failsafe causes the drone to descend even though it supposedly should not react at all.
With this change the behaviour is as follows with NAV_RCL_ACT = 0:
Alternatives could be:
Remove the DISABLED option because it doesn't make any sense.It does make sense for non-manual modes.Tested in SITL only so far.
Fixes #12307.