PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

New features for the ackermann rover module

Open chfriedrich98 opened this issue 1 year ago • 3 comments

Solved Problem

This PR adds new features to the ackerman rover module from #23024:

Solution

  1. Adds the SITL airframe for the new gz-garden ackermann rover model (https://github.com/PX4/PX4-gazebo-models/pull/46)
  2. Adds support for the return to launch (RTL) functionality
  3. 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.

  1. Adds a new ackermann rover specific message to log data for tuning: The new message is called RoverAckermannStatus.msg and 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.

  1. Improved the cornering slow down effect during mission mode: A new parameter called RA_VEL_RED_START can 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 avatar Jun 21 '24 09:06 chfriedrich98

@chfriedrich98 can you check the CI failure https://github.com/PX4/PX4-Autopilot/actions/runs/9611705793/job/26510835503?pr=23310

sfuhrer avatar Jun 24 '24 12:06 sfuhrer

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

DronecodeBot avatar Jun 24 '24 14:06 DronecodeBot

rebased on main and squashed

chfriedrich98 avatar Jun 28 '24 10:06 chfriedrich98

rebased on main and removed SITL airframe

chfriedrich98 avatar Jul 01 '24 08:07 chfriedrich98