System Failure Injection next steps

Dear development team!

I have a question about the System Failure injection page. My understanding is that only some failures are implemented (e.g. gps/motors off), as defined in test_multicopter_failsafe.cpp.

I would like to add support for rc_signal off and mavlink_signal off - do you have any suggestions how to go around that? SimulatorMavlink.cpp implements the failures for the sensors, but the RC failures would have to be implemented in the rc_update.h module (subscribe to the failure messages, and stop updating the RC values if needed).

For the mavlink_signal, would mavlink_receiver be appropriate? It is also not clear to me how to do you keep communicating the drone status in simulation once you disable mavlink communication - any suggestions?

Thank you in advance for your recommendations!

I think youโ€™re assessment is right. This would need implementing in these places.

What to do without MAVLink? Good question. Iโ€™m not too sure. :smile:

1 Like

Thanks @JulianOes for your reply! I looked more info the Mavlink failure injection, and the best seems to be to disable receiving Mavlink message on the drone (so the telemetry is still being sent to the GCS).

I also noticed (as mentioned in this post) that failures in gyro and accel result in jMavSim freeze. Since these are not tested in the CI, I canโ€™t really say when this error was introduced.

The code in PX4-Autopilot/src/modules/simulation/simulator_mavlink/SimulatorMavlink.cpp at 710286da722beae72a488af52b6c1e603f68eea7 ยท PX4/PX4-Autopilot ยท GitHub seems to be pretty straightforward, so it is not clear to me what causes this freeze. Any suggestions as to where to look? Or is the failure injection generally deprecated / rarely used?