Novice : Software crash handling in PX4


I am just curious what happens if the software asserts or crashes during the mid of flight. Does the drone stops abruptly or any recovery happens inside ?


The hardfault will be logged and added to the ulg logfile after reboot. That log can help diagnose what went wrong, not always, but there is a good chance. After that PX4 will boot again. At some point we had some code to allow for such an in-flight reboot but I’m not aware of any recent testing so it’s likely not working properly at this point. It would be worth trying it (of course without propellors).

You can also configure failsafe PWM values on the IO board (usually labelled MAIN or IO), so the IO board will set failsafe values when the FMU “disappears”/stops to communicate. Again, test it without explosive parachute mechanisms beforehand!