PX4 extends its autopilot framework to ground vehicles through a dedicated rover stack that supports three drive architectures: Ackermann steering (car-style front-wheel steering), differential drive (skid-steer or tank), and mecanum wheels (omnidirectional). Each architecture has its own PX4 module —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PX4/PX4-Autopilot/llms.txt
Use this file to discover all available pages before exploring further.
rover_ackermann, rover_differential, and rover_mecanum — with a separate control pipeline, parameter namespace, and actuator model. This guide covers selecting the right drive type, configuring geometry parameters, setting up GPS-based navigation, and running autonomous missions.
Drive types
PX4 supports three rover drive architectures, each handled by a dedicated module:| Drive type | Module | Airframe ID | Steering mechanism |
|---|---|---|---|
| Ackermann | rover_ackermann | 51000 | Front wheels turn in the direction of travel |
| Differential | rover_differential | 50000 | Independent left/right wheel speeds control direction |
| Mecanum | rover_mecanum | 52000 | Four individually driven mecanum wheels for omnidirectional movement |
- Ackermann
- Differential
- Mecanum
An Ackermann rover steers by turning its front wheels, exactly like a car or truck. The Ackermann steering geometry compensates for the fact that inside and outside wheels follow arcs of different radii during a turn. PX4 does not require true Ackermann geometry — the
Key parameters (prefix
rover_ackermann module works with any front-steering rover.Module: rover_ackermannAirframe ID: 51000 — Generic Rover AckermannNamed airframe examples:51001— Axial Trail Honcho (RC crawler)51002— NXP B3RB
rover_ackermann module contains the following control layers:| Layer | Responsibility |
|---|---|
AckermannSpeedControl | Longitudinal speed controller |
AckermannRateControl | Steering rate controller |
AckermannAttControl | Heading (attitude) controller |
AckermannPosControl | Position and waypoint controller |
AckermannDriveModes | Manual, Position, and Mission mode state machine |
AckermannActControl | Actuator output mixing |
RA_):| Parameter | Description | Note |
|---|---|---|
RA_WHEEL_BASE | Distance from front to rear axle (m) | Must be set to your vehicle’s dimension |
RA_MAX_STR_ANG | Maximum steering angle (rad) | Must be set; determines minimum turn radius |
RA_STR_RATE_LIM | Steering rate limit (deg/s) — set -1 to disable | Optional |
RA_ACC_RAD_MAX | Maximum waypoint acceptance radius (m) | Used for corner cutting in missions |
RA_ACC_RAD_GAIN | Corner cutting tuning factor | Scales acceptance radius based on path curvature |
GPS-based navigation
All three rover types support fully autonomous GPS-based navigation through the standard PX4 mission framework. When a mission is uploaded and the rover switches to Mission mode, PX4 navigates to each waypoint using a pure pursuit controller.Pure pursuit controller
The pure pursuit algorithm computes a “lookahead point” on the planned path ahead of the rover and steers toward it continuously. The lookahead distance is the primary tuning variable:- Short lookahead distance: the rover follows the planned path closely but can oscillate around the line.
- Long lookahead distance: smoother path tracking but the rover cuts corners more aggressively at waypoint transitions.
RA_ACC_RAD_GAIN and RA_ACC_RAD_MAX, enabling smooth continuous-path following without stopping at each waypoint.
Navigation prerequisites
Before running autonomous missions, confirm:- A GPS module is connected and reports a valid fix with at least 6 satellites.
- The compass is calibrated and oriented correctly relative to the rover’s forward direction.
- Wheelbase (
RA_WHEEL_BASE) or track width (RD_WHEEL_TRACK) parameters are set to accurate measurements — the position controller depends on them. - The rover has been tested in Manual mode to confirm all actuators respond correctly.
Setup workflow
Build and flash rover firmware
Rover support is not in the default PX4 firmware build. Clone the PX4-Autopilot repository and build the rover target for your flight controller board. For example, for a Pixhawk 6X:Flash the resulting
.px4 file via QGroundControl using the Custom firmware option under Vehicle Setup > Firmware.Select the rover airframe
In QGroundControl, go to Vehicle Setup > Airframe and select the Rover group. Choose the appropriate generic entry for your drive type:
- Generic Rover Ackermann (
51000) - Generic Rover Differential (
50000) - Generic Rover Mecanum (
52000)
Configure actuators
Go to Vehicle Setup > Actuators and map your drive outputs:
- Ackermann: map the steering servo and the throttle/motor output.
- Differential: map the left motor ESC and right motor ESC to separate outputs.
- Mecanum: map all four wheel motor ESCs to individual outputs.
Set drive geometry parameters
Enter your vehicle’s physical dimensions:
- Ackermann: set
RA_WHEEL_BASE(front-to-rear axle distance in meters) andRA_MAX_STR_ANG(maximum steering angle in radians). - Differential: set
RD_WHEEL_TRACK(center-to-center wheel distance in meters).
Calibrate GPS and compass
Go to Vehicle Setup > Sensors and complete the compass calibration. Place the rover away from metal structures, motors, and power wiring during calibration. After calibration, take the rover outdoors and verify a valid GPS fix before proceeding.
Test in Manual mode
Arm the rover and drive it manually. Confirm that steering direction (Ackermann) or the differential left/right response is correct. Reverse any motor or servo output in the actuator configuration if the rover drives backward or turns opposite to your stick input.
Test in Position mode
Switch to Position mode and verify the rover holds its GPS position when sticks are centered. Test gentle manual movement — the rover should resist disturbances and return to the commanded GPS position.
Simulation
PX4 provides Gazebo simulation models for all three rover types. Simulation is the recommended first step before running new configurations on real hardware:The Gazebo rover models accurately simulate the kinematic constraints of each drive type, including the Ackermann minimum turning radius and the differential spot-turn behavior. Running missions in simulation first significantly reduces debugging time on real hardware.