-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Commander: offboard failsafe cleanup #12709
Conversation
- move to px4::params - use enum
Thanks @jlecoeur, I'll review this soon. |
Thanks @julianoes for the review. There is no doubt Commander would need a much deeper cleanup. I think this is already a good step towards understandable offboard failsafe handling logic. The added failsafe options may not have the cleanest implementation, but at least they are consistent with the existing link loss actions. |
@jlecoeur have you done some SITL testing to make sure there is nothing stupid with the changes? |
Not for all cases. It would be cool to be able to test all that in CI. For example fly a mission with MAVSDK, then artificially cut the up-link and monitor the behaviour for the various values failsafe parameters. |
Ok you have done some sanity checking then, good. |
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.
Reviewed, looks certainly better than before.
I am installing MAVSDK to perform a few more. |
Test results with jMAVSim and the MAVSDK example
|
@julianoes I have tested the main cases without RC ( It is OK except for the TERMINATE and LOCKDOWN options, which did not behave the way I expected. This is annoying because they are implemented the same way as the data link loss feature. The question is: is this also broken? Also, I have not tested the subcases, for example if LAND is selected as failsafe action, but the gps position is lost, then it should try to descend, or terminate if that is not possible. At the moment, I am leaning towards removing the LOCKDOWN and TERMINATE options, however this should be addressed because TERMINATE is used as a fallback if the desired failsafe is not possible (ex: global position not available). |
Let me try to test the RC cases, I should find a joystick! |
@jlecoeur btw. you can use the integration tests for this sort of thing:
|
It looks like lockdown and terminate need to be checked in general. |
I did not see that. It just dropped from the sky, then detected landed and disarmed. |
Indeed, I tried again (with the example and the test runner) and it did just what you said. |
Without RC, the behaviour for terminate looks fine to me. The lockdown behaviour is bad, it behaves like altitude-control, here is a log https://review.px4.io/plot_app?log=d9e09744-f11c-4634-b699-c7d95a7ce22b |
I wonder about two things:
|
No, CBRK_FLIGHTTERM does not apply. |
|
Ok, it looks like lockdown is not supposed to work with HITL/SITL: To me it seems like lockdown should not actually be a "failsafe" feature but only a simulation option. |
Maybe you are right. But then how can we lock actuators to disarmed position (!= failsafe position) in the non-simulated case, cf #12713 I am starting to think that the intent of Terminate, Failsafe and Lockdown has probably evolved over time. It really should be clarified and not used interchangeably as it seems to be the case now. |
I agree. However, lockdown was always supposed to be a HITL "feature". Overall it's a big mess that we should clean up. For now, I'd say, let's merge this cleanup. |
Ok |
Cleanup the handling of offboard loss in Commander:
Other changes in this PR: