New features for the ackermann rover module
Solved Problem
This PR adds new features to the ackerman rover module from #23024:
Solution
- Adds the SITL airframe for the new gz-garden ackermann rover model (https://github.com/PX4/PX4-gazebo-models/pull/46)
- Adds support for the return to launch (RTL) functionality
- Adds a slew rate for the actuators which can be set with:
| Parameter | Description | Unit |
|---|---|---|
| RA_MAX_ACCEL | Maximum acceleration for the rover | $m/s^2$ |
| RA_MAX_STR_RATE | Maximum steering rate for the rover | $rad/s$ |
The slew rate for the acceleration is not based on acceleration measurements but rather on an assumed linear relation between the throttle and maximum rover speed. Therefor the maximum rover speed RA_MAX_SPEED needs to be set for this to work.
The slew rate for the steering rate is also based on a assumed linear relation between steering input and steering angle. Therefor the maximum steering angle RA_MAX_STR_ANG needs to be set for this to work.
- Adds a new ackermann rover specific message to log data for tuning:
The new message is called
RoverAckermannStatus.msgand includes the following:
| Variable | Description | Unit |
|---|---|---|
| throttle_setpoint | [-1, 1] Normalized throttle setpoint | - |
| steering_setpoint | [-1, 1] Normalized steering setpoint | - |
| actual_speed | Rover ground speed | $m/s$ |
The setpoints can be used to tune the slew rates by comparing them to the actual actuator outputs.
Note: actual_speed was moved from the already existing RoverAckermannGuidanceStatus.msg to this one s.t. it is logged both in mission and manual mode.
- Improved the cornering slow down effect during mission mode:
A new parameter called
RA_VEL_RED_STARTcan be used to tune at which distance to the waypoint the slow down effect starts. It is a multiplicative factor on the acceptance radius of the waypoints. A value higher than one means that the rover will start to slow down before it reaches the acceptance radius of the waypoint. This means the rover could already reach the reduced velocity before it enters the corner, which can help reduce the risk of the rover rolling over.
Changelog Entry
For release notes:
Feature: New features and improvements for the rover ackermann module.
Alternatives
Open to any suggestions.
Test coverage
- SITL tested
- HITL tested (Hardware: https://www.axialadventure.com/product/1-10-scx10-ii-trail-honcho-4wd-rock-crawler-brushed-rtr/AXID9059.html)
Context
Related links, screenshot before/after, video
@chfriedrich98 can you check the CI failure https://github.com/PX4/PX4-Autopilot/actions/runs/9611705793/job/26510835503?pr=23310
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/rover-ackermann-oscillates-on-a-straight-track/37797/12
rebased on main and squashed
rebased on main and removed SITL airframe