This is a fork of PX4/PX4-Autopilot.
The layout of this repository is based on the Distributed Unified Architecture.
This repository has a plethora of submodules, so it can be cloned using the following command:
git clone URL --recursive
If you forget to clone it recursively, you can always initialize submodules later using the following command:
git submodule update --init --recursive
from the repo's root directory (note the --recursive
flag).
The main
branch is meant to track the upstream repository. Do not push or merge to the main
branch.
In case you want to update the fork, you can use the following commands:
# Add the "upstream" remote, if it doesn't exist in your local copy
git remote add upstream git@github.com:PX4/PX4-Autopilot.git
# Fetch the latest changes from the upstream repository
git fetch upstream
# Merge the changes into your local copy
git pull --rebase upstream main
Other branches, like v1.12.3-dev
or v1.13.3-dev
, are meant to be working environments based on stable releases. When upstream
has been fetched, a new branch can be created from a tag doing, e.g.,
git checkout -b v1.13.3-dev v1.13.3
Additional hints can be found here.
During all of this, submodules may give problems. Try to clean them completely by running
git clean -fdx
or similar commands, inspecting the output of git status
and git submodule status
to see what is going on. If you are not sure about what you are doing, you can always delete the repository and clone it again.
This project has not been developed with DUA originally, so it is not fully compatible with it.
The directory structure of the PX4 repository is also not fully compatible with DUA, hence the following changes have been made with respect to the structure of dua-template
:
bin
has been renamed todua-bin
to avoid conflicts with thebin
directory of PX4.orig
contains folders and files of the upstream repository which conflicted with DUA's structure.
The following files have been modified to address the differences in the directory structure, hence they are not kept updated automatically by the GitHub workflow:
This sections is going to give just some hints, for a full reference please refer to the PX4 User Guide.
The build system is based on CMake, which is what the general Makefile
calls. Refer to the cmake
directory for more information and some hints on how to configure the build to add new modules, drivers, etc.
All build targets are found in the boards
directory. The .px4board
files there specify which modules, driver, and firwmare components each target must include, the toolchain to use, and other similar settings. Add or modify those files to configure a specific build target.
Currently supported build targets, both with and without the RTPS module, are:
fmuv5
: FMU v5 (Pixhawk 4) target.fmuv6c
: FMU v6C (Pixhawk 6C) target.sitl
: SITL (Software In The Loop) simulation target.
Build can be invoked by running the relevant custom commands from the root directory of this repository, or by invoking make
directly with the appropriate arguments.
Generated executables and flashable binaries will be found in the build
directory, which is created automatically when building.
To clean after a build, run make clean
or git clean -fdx
, but be careful as this will also remove all untracked files and directories.
To reduce the size of the flashable binaries for the FMU targets, some modules and components have been disabled by default, i.e., specifically marked as such in the board configurations. The following modules have been disabled:
CAMERA
modules.HEATER
HYGROMETERS
OSD
ROBOCLAW
- Eventual
EXAMPLES
modules. - All
AUTOTUNE
modules, since we intend to tune our controllers manually depending on the specific airframes. MICRODDS_CLIENT
, since this version is still based on RTPS and Micro-XRCE-DDS support is still highly experimental.
The following commands have been added to the shell's configuration of all development targets to bypass the ones provided by the default Makefile
:
builddefaut
: builds the default targets, i.e., non-RTPS versions of FMU v5, FMU v6C, SITL.buildfmuv5
: builds the FMU v5 RTPS target.buildfmuv6c
: builds the FMU v6C RTPS target.buildsitl
: builds the SITL (Software In The Loop) simulation RTPS target, including Gazebo plugins.px4
: runs the PX4 firmware SITL RTPS target, i.e., thepx4
executable alone, without any simulator, loading the defaultiris
vehicle and predefined (but modifiable) init scripts.px4kill
: if all goes wrong, kills all active PX4 and Gazebo processes.
This repository holds the PX4 flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
- Official Website: http://px4.io (License: BSD 3-clause, LICENSE)
- Supported airframes (portfolio):
- Multicopters
- Fixed wing
- VTOL
- Autogyro
- Rover
- many more experimental types (Blimps, Boats, Submarines, High altitude balloons, etc)
- Releases: Downloads
The PX4 User Guide explains how to assemble supported vehicles and fly drones with PX4. See the forum and chat if you need help!
This repository contains code supporting Pixhawk standard boards (best supported, best tested, recommended choice) and proprietary boards.
- FMUv6X and FMUv6U (STM32H7, 2021)
- Various vendors will provide FMUv6X and FMUv6U based designs Q3/2021
- FMUv5 and FMUv5X (STM32F7, 2019/20)
- FMUv4 (STM32F4, 2015)
- FMUv3 (STM32F4, 2014)
- FMUv2 (STM32F4, 2013)
- Holybro Durandal
- Hex Cube Orange
- Hex Cube Yellow
- Airmind MindPX V2.8
- Airmind MindRacer V1.2
- Bitcraze Crazyflie 2.0
- Omnibus F4 SD
- Holybro Kakute F7
- Raspberry PI with Navio 2
Additional information about supported hardware can be found in PX4 user Guide > Autopilot Hardware.
This work is licensed under the BSD 3-Clause License. See the LICENSE
file for details.
Copyright (c) 2012 - 2022, PX4 Development Team
Copyright (c) 2024 dotX Automation s.r.l.