Skip to content

Companion Computers

Companion computers ("mission computers"), are separate on-vehicle computers that are connected to the flight controller, and which enable computationally expensive features like object avoidance and collision prevention.

The diagram below shows a possible architecture for an unmanned vehicle architecture that includes a flight controller and companion computer.

PX4 architecture - FC + Companion Computer

The flight controller runs PX4 on NuttX, and provides core flight and safety code. The companion computer usually runs Linux, as this is a much better platform for "general" software development. They are connected using a fast serial or Ethernet link, and typically communicate using the MAVLink protocol or uXRCE-DDS.

Communications with the ground stations and the cloud are usually routed via the companion computer (e.g. using the MAVLink Router).

Pixhawk Autopilot Bus Carrier Boards with Companion Computers

The following carrier boards make it easy to integrate Pixhawk flight controllers with a companion computer, significantly easing boh hardware and software setup. The boards support the Pixhawk Autopilot Bus (PAB) open standard so you can plug in any compliant controller:

Managed Integrated Systems

The following integrated companion computer/flight controller systems use managed/custom versions of flight controller and companion computer software by default. They are listed here as they can be updated with "vanilla" PX4 firmware for testing/rapid development.

Companion Computer Options

PX4 can be used with computers that can be configured to communicate via MAVLink or microROS/uXRCE-DDS over over a serial port (or Ethernet port, if present). A small subset of possible alternatives are listed below.

Larger high power examples:

Small/lower power examples:

INFO

The choice of computer will depend on the usual tradeoffs: cost, weight, power consumption, ease of setup, and computational resources required.

Companion Computer Software

The companion computer needs to run software that communicates with the flight controller, and which routes traffic to ground stations and the cloud.

Drone Apps

Drone APIs and SDKs allow you to write software that can control PX4. Popular alternatives include:

  • MAVSDK - libraries in various programming languages to interface with MAVLink systems such as drones, cameras or ground systems.
  • ROS 2 to communicate to ROS 2 nodes (may also be used).
  • ROS 1 and MAVROS

MAVSDK is generally easier to learn and use, while ROS provides more pre-written software for advanced cases like computer vision. Drone APIs and SDKs > What API Should I Use? explains the different options in detail.

You can also write your own custom MAVLink libraries from scratch:

Routers

You will need a router if you need to bridge MAVLink from the vehicle to a ground station or IP network, or if you need multiple connections:

Ethernet Setup

Ethernet is the recommended connection, if supported by your flight controller. See Ethernet Setup for instructions.

Flight Controller Specific Setup

The following topics explain how to set up companion computers for specific flight controllers, in particular when you are not using an Ethernet connection.

Additional Information