Cockpit for Multiple Vehicles

I’m trying to use Cockpit to simultaneously control multiple vehicles (1-2 ROVs and a BlueBoat) from the same computer. We’ve been able to control one at a time by focusing on a separate cockpit window associated to each vehicle, but this prevents us from manually piloting more than one vehicle at a time.

Is there any way (using Cockpit or QGroundControl) to manually pilot multiple vehicles at the same time from the same computer, once they’re connected with unique IP addresses?

Hi @jhkeselman -
Welcome to the forums!
Unfortunately, Cockpit has no ability to control multiple vehicles simultaneously. If this is on a roadmap for development, it may be quite a ways out! You could check if an issue has been filed on the Cockpit repo, and file one if not requesting the feature…

QGround Control does allow control of multiple vehicles, however control of each vehicle is possible only individually - meaning you select it from the drop down, and can pilot it or change its mode to auto, then switch to another vehicle. The unselected vehicles show on the map, but are not controlled unless selected, which sounds like it won’t quite meet your needs?

Do you imagine the one computer would have multiple joysticks, each controlling a vehicle, with a video stream displayed for each?

3 Likes

Hello!

Our (I’m with Josh) goal is to control multiple vehicles simultaneously from a single computer. We’re doing some experiments with multi-robot systems composed of both ROV and USV agents operating in close-ish proximity, so if anything gets dicey we want to be able to immediately control each vehicle without configuring anything.

Seeing that this isn’t yet possible with QGC or Cockpit, we devised our own solution last week. I wrote a Python script (if anyone is interested: DM for code, as I can’t attach it here) that captures input from each unique joystick, converts the input into the appropriate MAVLink messages (MANUAL_CONTROL for ROV and MANUAL_CONTROL + whatever arming / disarming / mode change commands for the boat) and sends them to a local UDP MAVLink endpoint connected to a MAVLink router that forwards everything to the vehicles.

If I get some free time later this summer, I’ll raise an issue on the Cockpit repo and see how feasible it would be to integrate this feature into Cockpit. My TypeScript is quite rusty though :sweat_smile:

Hi @SamH, welcome to the forum :slight_smile:

You should be able to post it in a code (pre-formatted text) block if you want, unless you mean you aren’t allowed or don’t want to share the code publicly or something.

I raised this yesterday in our monthly Cockpit developer call :slight_smile:

While fully-fledged fleet management is not something we’re intending for Cockpit to support, displaying data from sources other than the primary vehicle is something we’ve been planning for a while now, and your idea of being able to send control commands to other vehicles seems straightforward enough that it’s worth us putting some thought into whether the existing application infrastructure poses any barriers to doing so.

As a note, Cockpit already has support for input from multiple joysticks simultaneously, but that’s also somewhat irrelevant as the important part is that any given input could conceivably be used to trigger an Action that could go to an arbitrary connection on the network. For full joystick control that will likely be made easier once Cockpit’s MANUAL_CONTROL support is converted to a configurable Action (which could then be duplicated and reconfigured to be sent to a different vehicle), although it should also be possible to use more direct MAVLink messages, and avoid MANUAL_CONTROL entirely (with some ROV limitations at the moment, that workarounds are actively being worked on for).

The other current limitations I’m aware of are:

  1. Cockpit only allows for and maintains a single websocket for MAVLink2REST communication, so this may need to be changed to a multi-source configuration, or the communication may need to go through a merging MAVLink router before it gets to Cockpit
  2. The same applies to video, for auto-discovering available video streams (and being able to record them)
  3. Mission planning is very much single-vehicle at the moment, although there are some basic tools/options that could be considered to make it more useful for multi-vehicle use-cases
    • in particular, mission uploading could provide a vehicle selector, and
    • basic sector scans could be generated with multiple side-by-side paths, to handle multiple USVs, for example
  4. The map more generally is similar to mission planning, especially with regard to the right click command options (like GoTo), which could conceivably have a source selector added