* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2.7 KiB
Multi-Vehicle Simulation with FlightGear
:::warning This simulator is community supported and maintained. It may or may not work with current versions of PX4.
See Toolchain Installation for information about the environments and tools supported by the core development team. :::
This topic explains how to simulate multiple vehicles using FlightGear in SITL. All vehicle instances have parameters defined by their startup scripts.
:::info This is the most environmentally realistic way to simulate multiple vehicles running PX4, and allows easy testing of multiple different types of vehicles. It is suitable for testing multi-vehicle support in QGroundControl, MAVSDK, etc.
Multi-Vehicle Simulation with Gazebo Classic should be used instead for: swarm simulations with many vehicles, and testing features like computer vision that are only supported by Gazebo Classic. :::
How to Start Multiple Instances
To start multiple instances (on separate ports and IDs):
-
Checkout the PX4 branch that supports multiple vehicles (at ThunderFly-aerospace):
git clone https://github.com/ThunderFly-aerospace/PX4Firmware.git cd PX4Firmware git checkout flightgear-multi -
Build the PX4 Firmware using the standard toolchain (with FlightGear installed).
-
Start the first instance using the predefined scripts:
cd ./Tools/flightgear_bridge/scripts ./vehicle1.sh -
Start subsequent instances using another script:
./vehicle2.sh
Each instance should have its own startup script, which can represent a completely different vehicle type. For prepared scripts you should get the following view.
Ground stations such as QGroundControl connect to all instances using the normal UDP port 14550 (all traffic goes to the same port).
The number of simultaneously running instances is limited mainly by computer resources. FlightGear is a single-thread application, but aerodynamics solvers consume a lot of memory. Therefore splitting to multiple computers and using a multiplayer server is probably required to run many vehicle instances.
Additional Resources
- See Simulation for more information about the port configuration.
