Hi all,
I’m trying to drive a PX4 rover in OFFBOARD (velocity) using ROS 2. QGC shows OFFBOARD and the vehicle arms, but the wheels don’t spin. In MANUAL the wheels work fine.
Setup
-
Platform: Rover (diff/ackermann) on PX4
-
Control: ROS 2 node publishing
OffboardControlMode+TrajectorySetpoint(+VehicleOdometryfrom my odometry) -
Offboard rate: ~20 Hz
-
OffboardControlMode:velocity=true, othersfalse -
TrajectorySetpoint.velocity = [vN, vE, vD]in NED (I sendvD = 0.0) -
Heading: when turning I send
yawspeed(andyaw = NaN); otherwise I lockyawto current NED yaw.
Example TS seen on PX4:
position: [nan, nan, nan]
velocity: [0.001, 0.300, 0.000] # NED: vN, vE, vD
yaw: 1.56
yawspeed: 0.0
# sometimes (planner requests turn-in-place)
velocity: [0.000, 0.000, 0.000]
yaw: nan
yawspeed: 0.50
What works / state checks
-
OFFBOARD is active:
nav_state = 14 -
Control flags:
flag_control_offboard_enabled = true,flag_control_velocity_enabled = true -
Local position is valid:
vehicle_local_positionfields are*_valid = true,yaw_align = true -
/trajectory_setpoint is present and updating
-
In MANUAL the wheels respond normally
What doesn’t work
-
In OFFBOARD, actuator outputs stay zero:
listener actuator_outputs→ all 0
It looks like the rover controller/control-allocation path isn’t producing actuator commands even though OFFBOARD and velocity control are enabled and valid setpoints are streaming.
Things I’ve tried
-
Ensure velocity is NED (
[vN, vE, vD]) andvD=0.0for rover -
Added a small minimum linear speed (0.15–0.30 m/s) to overcome static friction/deadband
-
Verified
OffboardControlModeand kept setpoints >10 Hz -
Provided
VehicleOdometry(vision) to EKF;vehicle_local_positionis valid
I can’t figure out what the problem is or what’s missing. What additional checklist should I go through?