PX4 not reacting to high latency trigger MAV_CMD_CONTROL_HIGH_LATENCY

Hey all!

I am wondering if I am doing something wrong here or if PX4 simply does not support MAV_CMD_CONTROL_HIGH_LATENCY at all.

I have a virtual test setup running which consists of:

  • px4_sitl running jMavSim
  • virtual companion PC
  • one transparent satellite link emulator (mostly high latency like 10sec roundtrip times)
  • one transparent cellular (for example LTE) link emulator (low latency like 150ms roundtrip times)
  • one ground server which gets the traffic from the emulators
  • one GCS running QGroundControl

Both the virtual compation PC and ground server run mavlink-routerd.

I successfully configured mavlink-routerd and connected both links (cellular and sat) in QGroundControl, enabling the high latency option on the sat link.

Connection is established first via the cellular link, then I add the sat link and I can control the jMavSim drone just fine (via cellular). Also during that time packets are already getting pushed and received by QGroundControl via the sat link as well (all pakets at the moment, not just minimal high latency mode or something).

I now block traffic via the cellular link emulator, QGroundControl notices that, tells me that it switched to the high latency sat link and I can see that it transmits MAV_CMD_CONTROL_HIGH_LATENCY to px4. I also verified that this control command is received by px4 via wireshark dumps.

Though it seems like px4 is not doing anything with that command and just ignores it. After about 2min (the high latency timeout) QGroundControl says that it did not get a response to the MAV_CMD_CONTROL_HIGH_LATENCY.

Obviously in the mean time the jMavSim drone has landed because it says it lost connection to the ground station.

I then checked the code of the mavlink part of PX4 and it seems like this command is not implemented.

From testing around with mavlink streams in PX4 console I got the impression that PX4 is not able to switch an existing stream (for example UDP on port 14580) from “normal” transmission mode to “minimal” mode, which would be high latency.

If I stop the mavlink stream in the PX4 console and enable the stream manually in “minimal” mode with the cellular link still blocked I can control the drone just fine. So I am pretty sure everything else in terms of packet routing works fine.

Is this a correct observation or am I missing something in the PX4 code related to MAV_CMD_CONTROL_HIGH_LATENCY?

I used the latest stable version of PX4 from Git and I also checked the code of the latest master version on Git.

Thanks for any input!