Hello PX4 community,
I would like to introduce FastSwarmSim, an open-source, lightweight multi-UAV ROS2 simulator for PX4-compatible vehicles:
- GitHub: GitHub - shupx/FastSwarmSim: lightweight multi-drone simulator · GitHub
- Documentation: FastSwarmSim Documentation
NO need for Gazebo
FastSwarmSim is intended for PX4 and ROS 2 multi-vehicle algorithm development, repeatable simulation-time experiments, and accelerated testing. It combines a trimmed PX4 runtime, MAVROS-compatible ROS interfaces, RViz visualization, local LiDAR point-cloud rendering, and a lock-step simulation clock.
The simulator achieves operation up to approximately 100x real time for a single vehicle and 50x for five vehicles with LiDAR simulation disabled on a desktop-class computer, with lower but still accelerated rates as the vehicle count increases. Actual performance depends on the host system and workload.
Lock-step simulation with ROS 2 /clock
A central feature is the lock-step time model. FastSwarmSim publishes simulation time through ROS 2 /clock and advances the simulation in lock-step, so simulation progress is explicit, reproducible, and coordinated across PX4, ROS 2 nodes, sensors, and controllers.
A ROS node can participate after a relatively small adaptation: use ROS time, respond to /clock, and advance its computation or publish outputs according to the simulation-time cycle. This makes it possible to bring existing ROS nodes into lock-step experiments without redesigning the whole node. Nodes that are not adapted can still run normally, but they will not have the same deterministic lock-step semantics.
When the workload allows it, the simulation can run faster than real time while preserving a consistent simulation-time reference. This is useful for:
- high-volume PX4/ROS algorithm testing;
- repeatable multi-UAV experiments;
- accelerated parameter sweeps and regression runs;
- timing-sensitive coordination and control studies.
Current capabilities
- PX4-compatible multi-rotor simulation;
- single- and multi-vehicle launch workflows;
- ROS 2 and MAVROS-compatible interfaces;
- namespace-based multi-vehicle operation;
- RViz visualization;
- local LiDAR point-cloud simulation;
- ROS 2 command-line tools, including map generation;
- keyboard control for interactive vehicle operation;
- documentation hosted with GitHub Pages.
The project is still evolving. Feedback, use cases, and contributions from the PX4 and ROS communities are welcome.
Best regards,
Peixuan Shu, Beihang university, China
Email: shupeixuan@qq.com

