PX4 Autopilots Support from Embedded Coder

Automatically build and deploy flight control algorithms to the Pixhawk Autopilot using Simulink and Embedded Coder

Capabilities and Features

Using Embedded Coder™ Support Package for PX4® Autopilots you can generate C++ from Simulink® models specifically tailored for the Pixhawk FMU (flight management units) using the PX4 toolchain. You can customize algorithms that leverage onboard sensor data and other calculations at runtime.

Support highlights include:

  • Integration of the Pixhawk CMAKE build system with Embedded Coder
  • A sensor/peripheral block library for inertial measurements, GPS, vehicle estimation, PWM output, and ADC and serial Rx/Tx. This can be extended to support other sensors/peripherals.
  • The ability to view the value of signals and tune parameters in real time so you can interactively test the behavior of the generated code.
  • The ability to read and write uORB topics as well as enabling real-time scheduling with uORB.
  • The ability to automatically deploy flight control designs from Simulink onto Pixhawk autopilots. 
  • An example on how to log and record flight data of sensors, actuators, or any part of your Simulink control model for test and analysis.

About PX4

PX4 is a trademark of Lorenz Meier and consists of an open-hardware autopilot ecosystem and low-cost flight control units. Pixhawk (PX4) autopilots are low-cost flight control units based on open hardware. They feed on-board sensor inputs to algorithms running on ARM® Cortex®-M microprocessors to drive motors using PWM outputs. They are based on NuttX real-time operating system (RTOS) and support flight control and vehicle management of fixed- and rotary-winged aircraft.


Platform and Release Support

See the hardware support package system requirements table for current and prior version, release, and platform availability.

Explore gallery (4 images)

Supported Hardware

PX4 Autopilot FMU Version Releases Supported
Pixhawk 1 FMUv2 R2018b onward
Pixhawk Cube (Pixhawk 2.1) FMUv3 R2018b onward
Pixracer FMUv4 R2018b onward
Pixhawk 4 FMUv5 R2018b onward