Multi-tethered drone error "matching flight task was not able to run"

Hi all,

I’m attempting to simulate a set of three x500 drones carrying a slung load in Gazebo (see image below) with PX4 SITL.

The drones are able to take off successfully using offboard control messages from ROS2 (both position and velocity setpoints individually). However, after flying for a while (exact time differs on each simulation), I get the following warning and error:

INFO [commander] Armed by external command
INFO [tone_alarm] arming warning
INFO [commander] Takeoff detected
WARN [failsafe] Failsafe activated
INFO [tone_alarm] battery warning (fast)
ERROR [flight_mode_manager] Matching flight task was not able to run, Nav state: 2, Task: 1
INFO [commander] Landing detected
INFO [commander] Disarmed by landing
INFO [tone_alarm] notify neutral

The failsafe that kicks in results in the drones landing at their current positions.

I don’t really understand the root cause of this issue/what is causing the failsafe to trigger and therefore don’t know how to fix it. My current hypothesis (given that the error doesn’t appear when the tethers aren’t present) is that the additional tethered load (although negligible at 0.05 kg - perhaps it is more of the effect of other drones than the weight of the load) is making it difficult for the drones to reach the position/velocity setpoints and so a failsafe is triggered because “something appears wrong” to PX4. The position (and velocity) setpoints I have selected are physically feasible given the cable length constraints however…

Does this error mean anything more to someone else?

What I’ve tried:

  • Removing the cables - the issue no longer appears (drones are able to hover indefinately from ROS2 offboard control commands).
  • Setting SIM_BAT_DRAIN, SIM_BAT_MIN_PCT and BAT1_CAPACITY to max (given the error, thought that the simulated battery could be running out quickly) - this doesn’t change anything.
  • Sending offboard position commands from ROS2 and offboard velocity commands from ROS2 - the error appears in both cases.
  • Simulating the “cables” as singular rigid links and as multiple (3 links each) rigid links (thought that perhaps rigid links were preventing drones from reaching the desired setpoints). The error appears in both cases.

I am on commit: a6d2c2cf5e21ecdad8d737c31de81fab128898c5.

Logfile of takeoff in velocity mode showing the error: https://logs.px4.io/plot_app?log=c9cb9702-a3bc-456e-a08e-16ce2b5c7b82.

Thanks in advance for your help!

Update: it appears that the issue still occurs even when the tethers are not connected to the drones…

As there are many bodies in the simulation, the simulator’s real time factor occasionally drops to around 30-50%. Is it possible that this could be causing the error? Perhaps the offboard message isn’t being received frequently enough to stay in offboard mode? I’m just confused about the ‘battery warning’ however as this always appears when the error occurs.

Solved. My previous hunch was correct: the drones were dropping out of offboard mode (other warnings were coming from the fallback to position control not working). Setting COM_OF_LOSS_T = 5 (rather than 1) fixes this.

hello,
Your Multi-tethered drone is so wonderful. I want to know how to make it and take it off successfully using ROS2. What directory do you put your models in? How to connect a model to a link between models?

Hi @suezere - thanks for your interest! The problems I had building this were discussed in this thread. Hopefully that gives you the information you need! I also made a pull request into the PX4 firmware with the edits I had to make to get it to work.

As for model directories and links, the cable and load models went in parallel directories to the x500 model: Tools>simulation>gz>models>[cable or load respectively] and are just regular SDF files. The connections were created in the world file (I just edited the `default.sdf’ world file for now) with regular SDF joints after the x500 drones, cables and load are included.

1 Like

Thank you for your help @hmer101. I’ve solved the problem and created my own multi-drone model, but when running one of the drones, the drone’s position data seems to deviate from real-time with the following warning:

WARN [health_and_arming_checks] Preflight Fail: ekf2 missing data

I would like to know if you have the same problem and how to fix it to get the correct position information of the drone. Thanks again for your help!

I did encounter that problem along the way. I believe the problem is caused by incorrect model name assumptions in some plugins discussed in the chain I linked above. The pull request I linked above contains the solution in a modified GZBridge file.