Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

differential: speed setpoint feasibility and slow down effect in mission mode #24035

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

chfriedrich98
Copy link
Contributor

Solved Problem

This PR adds these 2 updates to the differential rover module:

  1. The controller prioritizes yaw rate over forward speed. A high yaw rate setpoint can therefor make the forward speed setpoint infeasible due to actuator limitations. This leads the integrator of the speed controller to build up. This problem is fixed in this PR by adjusting the speed setpoint based on the amount of control effort that is “occupied” by the yaw rate setpoint.

  2. Adds a tunable slow down effect in mission mode. As the rover approaches a waypoint it will slow down with the following logic: If the angle between the prev-curr-wp and curr-next-wp lines is bigger than RD_TRANS_DRV_TRN the rover will come to a full stop at the waypoint and then turn on the spot (this is not new). If this angle is lower then it will slow down s.t. it arrives at the waypoint with the following speed (this is new):
    $v_{transition} = v_{max} \cdot (1 - \theta_{normalized} \cdot k) $

    with

    • $v_{transition}:$ Transition speed
    • $v_{max}:$ Maximum speed 'RD_MAX_SPEED`
    • $\theta_{normalized}:$ Angle between the linesegment of prev-curr and curr-next waypoints normalized from $[0\degree, 180\degree]$ to $[1, 0]$
    • $k:$ Tuning parameter RD_MISS_VEL_GAIN
      This adds the new parameter RD_MISS_VEL_GAIN and also deprecates RD_MISS_SPD_DEF

Test coverage

  • Tested in SITL
  • Tested on hardware

@chfriedrich98 chfriedrich98 added the Rover 🚙 Rovers and other UGV label Nov 25, 2024
@chfriedrich98 chfriedrich98 self-assigned this Nov 25, 2024
@chfriedrich98 chfriedrich98 force-pushed the differential_speed_update branch from 62afec1 to f570004 Compare November 26, 2024 15:33
@chfriedrich98 chfriedrich98 marked this pull request as ready for review November 26, 2024 16:01
@chfriedrich98 chfriedrich98 force-pushed the differential_speed_update branch from f570004 to e8527e7 Compare December 2, 2024 07:56
@chfriedrich98 chfriedrich98 requested a review from sfuhrer December 2, 2024 08:02
@chfriedrich98 chfriedrich98 merged commit 7e705bb into PX4:main Dec 2, 2024
54 of 59 checks passed
@chfriedrich98 chfriedrich98 deleted the differential_speed_update branch December 2, 2024 09:44
@hamishwillee
Copy link
Contributor

hamishwillee commented Dec 11, 2024

@chfriedrich98
Removal of RD_MISS_SPD_DEF is causing an error in docs

  • /en/config_rover/differential.md
  • /en/config_rover/mecanum.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rover 🚙 Rovers and other UGV
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants