PX4 Autopilot

repository·main·Indexed 11 days ago

https://github.com/px4/px4-autopilot

An open-source autopilot stack for drones and unmanned vehicles, including multirotors, fixed-wing, and rovers. It features a modular architecture using uORB middleware, supports NuttX, Linux, and macOS, and provides integration with MAVLink and ROS 2. The system supports SITL simulation and a wide range of autopilot boards, including the Pixhawk ecosystem.

Tokens
290.2K
Snippets
725
Records
1.5K
Agent score
90%

What's inside PX4

  1. Overview of the Septentrio GNSS Driver

    main
    The Septentrio GNSS driver in PX4 provides support for Septentrio GNSS receivers. It utilizes the SBF (Septentrio Binary Format) protocol for communication. The driver logic is encapsulated within the sbf/ directory, which manages message definitions, block IDs, and a parser specifically designed for the messages required by PX4.
  2. Overview of PX4 Flight Log Analysis Tools

    main

    Depending on your needs, several tools are available for analyzing PX4 flight logs:

    ToolTypeBest For
    Data CometsInteractive Web/LocalEncoding flight data onto flight paths and brushing/filtering by time.
    FlightPlotDesktop (Java)Cross-platform GUI for .ulg, .px4log, and .bin formats.
    Flight ReviewWeb-basedEasy sharing and interactive plots via a browser.
    FoxgloveDesktopNative ULog support with 3D, Map, and Plot panels.
    MAVGCLDesktop (Java)Real-time in-flight analysis or offline ULog analysis with XY analysis.
    PlotJugglerDesktopDeep analysis of all uORB topics and time-series data.
    PX4ToolsPython/JupyterAdvanced plotting and sharing via iPython/Jupyter notebooks.
    pyulogPython CLIParsing, extracting info, and converting ULog to CSV/KML.
    RobotoCloud PlatformAutomated detection of issues (vibration, GPS, etc.) and AI-assisted debugging.
  3. Overview of community-supported simulators

    main

    PX4 supports several community-maintained simulators that offer varying levels of physical and visual realism.

    Warning: These simulators are not maintained, tested, or supported by the core PX4 development team. They may not be compatible with all current PX4 versions. For officially supported environments, refer to the Toolchain Installation guide.

    Simulator Comparison

    SimulatorDescriptionSupported Vehicles
    AirSimCross-platform, physically and visually realistic. Resource intensive.Iris (MultiRotor and QuadRotor X)
    FlightGearPhysically and visually realistic; simulates weather (thunderstorms, snow, rain, etc.) and atmospheric flows. Supports multi-vehicle simulation.Plane, Autogyro, Rover
    JMAVSimSimple multirotor/quad simulator. (Note: Replaced by Gazebo in the core toolchain).Quad
    JSBSimAdvanced flight dynamics models based on wind tunnel data.Plane, Quad, Hex
    PteroSimProprietary high-fidelity simulation (Unreal Engine 5 + JSBSim). Uses Simulator MAVLink API with lockstep synchronization.Multicopter (Free), Fixed-wing/VTOL/Helicopter (Paid)
    RotorPyPython-based multirotor environment with aerodynamic forces, sensor noise, and a Gymnasium interface for research.Quad
    X-PlaneCommercial simulator using blade element theory. Uses the px4xplane bridge plugin.Plane, Multicopter, VTOL

    Note: Gazebo and SIH are the officially supported simulators.

  4. What is the PX4 ROS 2 Control Interface?

    main

    The PX4 ROS 2 Control Interface is a C++ library (with Python bindings) designed to simplify controlling PX4 from ROS 2. It allows developers to create and dynamically register ROS 2-based modes that appear as native PX4 modes in Ground Control Stations (GCS).

    Key capabilities include:

    • Dynamic Registration: Modes are registered with PX4 and can replace default internal modes (e.g., replacing a standard Return mode with a custom ROS 2 version).
    • Setpoint Abstraction: Provides classes for sending various setpoints (from high-level navigation to direct actuator control) that abstract internal PX4 topics, ensuring a consistent interface across PX4 and ROS 2 releases.
    • Mode Management: Enables multiple nodes to coexist, but ensures only one node controls the vehicle at a time through a well-defined mode system.
    • Failsafe Integration: Modes are integrated with the PX4 failsafe state machine and arming checks.

    Note: This interface is currently Experimental (as of PX4 v1.15). While the core architecture for defining modes is stable, some setpoint types are still under development and the API is not fully documented.

  5. Overview of the Holybro Pixhawk Jetson Baseboard

    main

    The Holybro Pixhawk Jetson Baseboard is an integrated hardware solution that combines a Pixhawk flight controller and an NVIDIA Orin-series computer (Orin NX or Orin Nano) into a single package. It is designed to simplify the setup of a companion computer for PX4.

    Key features include:

    • Compatibility: Works with any Pixhawk Autopilot Bus (PAB) specification-compliant flight controller (e.g., Pixhawk 6, Pixhawk 6X).
    • Connectivity: Integrated Ethernet switch connecting both the Jetson and the Autopilot, facilitating MAVLink and ROS 2/XRCE-DDS communication over Ethernet.
    • Included Peripherals: Typically comes with a WiFi module, camera, power module, separate UBEC, and power distribution board (PDB).
  6. Overview of Amovlab Flycore Flight Controller

    main

    The Amovlab Flycore is an STM32H743-based flight controller designed for PX4-powered vehicles. It features dual onboard IMUs (Bosch BMI088 and InvenSense ICM-42688P), an onboard MS5611 barometer, and an integrated UM982 GNSS module on the internal GPS1 interface.

    Key Specifications:

    • Processor: STM32H743 (480 MHz, 2 MB flash, 1 MB RAM).
    • PWM Outputs: 10 FMU outputs (Outputs 1-7 support DShot; 8-10 do not).
    • Serial Ports: 7 total, including 3 telemetry ports (TELEM1, TELEM2, TELEM3).
    • GPS Ports: 2 (GPS1 is internal to the UM982 module; GPS2 is an external connector).
    • I2C Ports: 2 external buses (I2C1, I2C4).
    • CAN Buses: 2.
    • Power Input: XT30 connector, 15-28 V.
    • Battery Sensing: 3S-6S LiPo voltage; 1-60 A current.

    Note: This board does not have a PX4IO coprocessor and has no onboard magnetometer. If a magnetometer is required, it must be connected via an external I2C interface.

  7. Overview of Sky-Drones AIRLink

    main

    Sky-Drones AIRLink (Artificial Intelligence & Remote Link) is an integrated avionics system designed for drone manufacturers. It combines a flight control computer (autopilot), an AI mission computer, and an LTE/5G connectivity module into a single unit to support advanced features like computer vision, obstacle avoidance, and remote broadband workflows.

    Core Components:

    • Flight Control Computer (Autopilot): Features a triple-redundant, vibration-dampened, and temperature-stabilized IMU.
    • AI Mission Computer: Enables high-level software tasks such as digital HD video streaming, payload data streaming, and obstacle avoidance.
    • LTE/5G/WiFi Module: Provides broadband internet connectivity for remote operations.
  8. Overview of Cameras Connected to Flight Controller Outputs

    main

    PX4 can trigger cameras connected directly to flight controller outputs (PWM, GPIO, or Seagull MAP2 via PWM) using MAVLink commands during missions or via a Ground Control Station (GCS).

    Key features include:

    • Triggering: Uses a subset of MAVLink Camera Protocol v1 commands.
    • Synchronization: Whenever a camera is triggered, PX4 publishes a CAMERA_TRIGGER MAVLink message containing the image sequence number and a timestamp. This is critical for aerial surveying, multi-camera synchronization, or visual-inertial navigation (VIO).
    • Capture Feedback: Optionally, a camera can signal PX4 at the exact moment a frame is taken using a camera capture pin (connected to the camera's hot shoe). This allows for precise geotagging and IMU sample synchronization.

    Recommendation: For best results, use MAVLink cameras that support the MAVLink Camera Protocol v2.

  9. Overview of CORVON 743v2 Flight Controller

    main

    The CORVON 743v2 is a high-performance flight controller based on the STM32H743VIH6 (Cortex-M7, 480 MHz). It features dual high-grade IMUs (ICM-42688P and BMI088), a high-precision BMP581 barometer, and an iSentek IST8310 magnetometer.

    Key connectivity features include:

    • 8x UARTs (including dedicated DJI O4 and Bluetooth ports)
    • 1x CAN (DroneCAN / UAVCAN)
    • 1x external I²C (isolated 5V supply)
    • 1x dedicated RC Input (SBUS / CRSF / ELRS)
    • 12x PWM outputs (M1–M10 DShot-capable, M11/M12 standard PWM)
    • SDMMC1 4-bit Micro-SD slot for high-speed logging
    • Onboard Bluetooth module (UART8) pre-configured for MAVLink.
  10. Overview of PX4 Development workflows

    main

    PX4 development is intended for software developers and hardware integrators. The development workflow covers several key areas:

    • Environment Setup: Getting a minimum developer setup, building from source, and deploying to supported autopilots.
    • Core Modification: Modifying flight algorithms, adding new flight modes, and supporting new airframes.
    • Hardware Integration: Supporting new sensors (cameras, rangefinders, etc.), actuators, and porting PX4 to new autopilot hardware.
    • Validation: Using simulation, testing suites, and debugging/logging tools.
    • External Integration: Communicating with PX4 via external robotics APIs.

    If you are simply building an existing airframe or flying a standard PX4 vehicle, these development guides are not required.