Skip to main content

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.

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 — 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.
Rover support in PX4 is experimental as of PX4 v1.16. It is not included in the standard firmware image available in QGroundControl — you must build and flash a custom rover firmware. See Flashing the Rover Build for full instructions.

Drive types

PX4 supports three rover drive architectures, each handled by a dedicated module:
Drive typeModuleAirframe IDSteering mechanism
Ackermannrover_ackermann51000Front wheels turn in the direction of travel
Differentialrover_differential50000Independent left/right wheel speeds control direction
Mecanumrover_mecanum52000Four individually driven mecanum wheels for omnidirectional movement
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 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
The rover_ackermann module contains the following control layers:
LayerResponsibility
AckermannSpeedControlLongitudinal speed controller
AckermannRateControlSteering rate controller
AckermannAttControlHeading (attitude) controller
AckermannPosControlPosition and waypoint controller
AckermannDriveModesManual, Position, and Mission mode state machine
AckermannActControlActuator output mixing
Key parameters (prefix RA_):
ParameterDescriptionNote
RA_WHEEL_BASEDistance from front to rear axle (m)Must be set to your vehicle’s dimension
RA_MAX_STR_ANGMaximum steering angle (rad)Must be set; determines minimum turn radius
RA_STR_RATE_LIMSteering rate limit (deg/s) — set -1 to disableOptional
RA_ACC_RAD_MAXMaximum waypoint acceptance radius (m)Used for corner cutting in missions
RA_ACC_RAD_GAINCorner cutting tuning factorScales 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.
For Ackermann rovers, the waypoint acceptance radius scales dynamically with the curvature of the path using RA_ACC_RAD_GAIN and RA_ACC_RAD_MAX, enabling smooth continuous-path following without stopping at each waypoint. Before running autonomous missions, confirm:
  1. A GPS module is connected and reports a valid fix with at least 6 satellites.
  2. The compass is calibrated and oriented correctly relative to the rover’s forward direction.
  3. Wheelbase (RA_WHEEL_BASE) or track width (RD_WHEEL_TRACK) parameters are set to accurate measurements — the position controller depends on them.
  4. The rover has been tested in Manual mode to confirm all actuators respond correctly.
Test your rover in Position mode before running a full autonomous mission. In Position mode you control heading with the sticks but GPS stabilizes position when you release them, letting you verify GPS lock quality and position hold behavior without the complexity of waypoint following.

Setup workflow

1

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:
make px4_fmu-v6x_rover
Flash the resulting .px4 file via QGroundControl using the Custom firmware option under Vehicle Setup > Firmware.
2

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)
Click Apply and Restart.
3

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.
Move sliders and verify the correct wheel or servo responds in the correct direction.
4

Set drive geometry parameters

Enter your vehicle’s physical dimensions:
  • Ackermann: set RA_WHEEL_BASE (front-to-rear axle distance in meters) and RA_MAX_STR_ANG (maximum steering angle in radians).
  • Differential: set RD_WHEEL_TRACK (center-to-center wheel distance in meters).
These values directly affect position and speed control accuracy, so measure them carefully.
5

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.
6

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.
7

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.
8

Upload and run a mission

In QGroundControl’s Plan view, create a simple multi-waypoint mission and upload it to the rover. Switch to Mission mode and observe autonomous navigation. Verify the rover transitions between waypoints cleanly and stops at the final waypoint.

Simulation

PX4 provides Gazebo simulation models for all three rover types. Simulation is the recommended first step before running new configurations on real hardware:
# Ackermann rover simulation
make px4_sitl gz_rover_ackermann

# Differential rover simulation
make px4_sitl gz_rover_differential

# Mecanum rover simulation
make px4_sitl gz_rover_mecanum
QGroundControl auto-connects to the SITL instance. You can plan and run missions in simulation to verify waypoint following, spot-turn behavior, and mode transitions before deploying to a physical rover.
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.

Build docs developers (and LLMs) love