mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 22:50:49 +08:00
The jMAVSim pages become redirects to SIH, examples and HITL options move to SIH, Gazebo or Gazebo Classic, and SIH on hardware gets Hawkeye as its 3D display-only view through a MAVLink bridge to its UDP port. The release notes flag the removal in the upgrade guide. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2.3 KiB
2.3 KiB
Hardware Simulation
PX4 can run simulation directly on a real flight controller, replacing real sensors with simulated data, while otherwise executing the full flight stack on actual autopilot hardware.
::: info Simulating PX4 on flight controller hardware exercises more flight stack code than SITL, and tests more of your hardware integration. It can surface issues with running PX4 that might hidden when running on a desktop OS and hardware, or even a different flight controller board. :::
Two simulation approaches are available, controlled by the SYS_HITL parameter:
- HITL Simulation (
SYS_HITL=1): An external simulator (Gazebo Classic) runs physics on a companion computer and sends sensor data to the flight controller via MAVLink HIL messages. Requires a USB/UART connection and simulator setup. - SIH on Hardware (
SYS_HITL=2): A C++ physics model runs directly on the flight controller itself. No external simulator, no companion computer, no MAVLink sensor data. Just set the parameter and reboot.
HITL vs SIH
HITL (SYS_HITL=1) |
SIH (SYS_HITL=2) |
|
|---|---|---|
| Physics model | External simulator (Gazebo Classic) | Internal C++ module |
| Communication | MAVLink HIL messages | uORB (internal) |
| External process | Required | Not required |
| Setup complexity | Higher | Lower |
| Sensor simulation | Camera, lidar, etc. (via simulator) | IMU, GPS, baro, mag, airspeed only |
| Vehicle types | Quadcopter, Standard VTOL | Quad, Hex, FW, VTOL Tailsitter, Standard VTOL, Rover |
When to Use Which
- Use SIH if you want the simplest possible setup. No external dependencies.
- Use HITL if you need an external physics engine, 3D visualization from Gazebo Classic, or camera/lidar sensor simulation that SIH does not provide.