-
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
[WIP] Failure detector / Parachute triggering #10091
Conversation
…puts PX4_ERR messages if roll or pitch is exceeded.
…achute_failsafe flag in actuator_armed message, update failure detector only if armed.
…s. Rename 'result' into 'updated'
…state, deploy parachute and lockdown if FMU is lost; do not lockdown if FMU only asks for parachute triggering
On my phone so I've only skimmed so far, but my first question is how is this expected to interact with existing mixers? |
@dagar The parachute will be removed from the mixers and a manual trigger will be mapped similarly to the kill switch. |
Preventing an existing mixer from touching the same output is what I'm wondering about. I think there are several functions where it would be nice to configure directly via parameter rather than mixer (parachute, landing gear, gimbal, maybe flaps), but we need to at least block out mixer usage of those particular outputs. A simple error would also be nice. We should also parameterize it generically rather than referring to IO or FMU pins. What do you think about something like setting it as a special function per |
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.
@bresch Unfortunately it looks like there was some miscommunication on the approach. I meant literally to use the failsafe PWM values and the force_failsafe flag. I wouldn't know why introducing another failsafe flag and another set of PWM values would be necessary and I believe it makes the system unnecessarily complex.
Run pwm info
and pwm help
to check how those are set and how you can set them.
It might be best to start from scratch, only apply your commander changes and use the force_failsafe flag.
Can you please also raise a PR against the PX4 docs in parallel so we avoid any confusion in the future? The root cause of the miscommunication here is that the failsafe values were not properly documented.
@LorenzMeier I was considering the Take for example the case of fixedwing aircraft with a parachute: |
This PR enables failsafe parachute triggering capabilities for an autopilot with or without IO processor.
Any kind of failure detection can be made using the FailureDetector class, which is instantiated in Commander. At the moment, a simple attitude check is made and sets its internal flags to true if roll or pitch exceed some defined parameters (
VT_FW_QC_P/R
).Note: these parameters are used since this check are the same as for VTOL "Quadchute" and this failure detector will replace the quadchute logic as well; the parameters will then be replaced.
Commander then sets a
parachute_failsafe
flag (added to theactuator_armed
message) to the FMU driver and to the IO chip (if available).If the autopilot has an IO chip, one can set the parachute pin to an IO pin and IO will also then be able to trigger the parachute if FMU dies (through a timeout check).
The only way to reset the parachute triggering state is to unpower/repower the autopilot.
The objective is also to do different check and to have different behaviors if the vehicle is a fixed-wing, a multicopter, a VTOL or a rover. FailureDetector will then be a base class for FWFailureDetector, MCFailureDetector, etc.
Test data / coverage
Bench tests only, with a servo connected to IO and FMU pins.
Arm/disarm triggers tests
Attitude roll/pitch triggers
FMU timeout tests
Parameters update
Tested on a PixHawk4 and a Pixracer
Warning
This has never been tested in flight and could potentially kill the vehicle in air.
Known corner case: if the autopilot is armed and the reboot command is sent, IO sees that as a FMU loss and triggers the parachute.
How to use it
Mandatory:
PWM_CHUTE_OUT
to the desired output:PWM_CHUTE_OFF
to the value for which the servo doesn't trigger the parachutePWM_CHUTE_ON
to the value required to trigger the parachuteOptional:
VT_FW_QC_P
or/andVT_FW_QC_R
(0 disables the check) to some maximum roll/pitch values (in degrees)Tasks
PWM_CHUTE_OUT = 0
). The flagparachute_failsafe
is set even if the logic is disabled but doesn't trigger the parachute.FYI @bkueng @RomanBapst @dagar