ROS / Gazebo rotor failure and recovery


I am interested in inducing failures in Gazebo Sim that causes a QuadCopter to crash or pushes QC outside of its normal flight envelop. Then apply some recovery techniques to bring the QC back to its normal flight envelop.

For example, if one of the rotors starts to fail and is not operating in sync with others rotors, then QC will exhibit abnormal behavior. In order to induce a failure and recover from it, I think I will need fine grained control over rotors and possibly other parameters not much different from autonomous or semi-autonomous modes.

Note: It is not my intention to write my own mode but switch QC to manual mode and apply some actions to perform recovery.

My current environment is setup to run ROS/Gazebo and I can perform takeoff and land operations in guided mode. So while the QC is in air, how do I change speed of one of the rotors to simulate a failing rotor?

I am open to suggestions on where and how to induce the failure and recover. Could this be accomplished via ROS? Do I need to write Gazebo plugin? Do I need to write an application using MAVSDK?