Repository navigation
Conversation
added 2 commits
November 20, 2026 17:32
The course setpoint of Guided Course went straight to the position controller, which mixed path following with course and speed control. A separate course controller between the position controller and the attitude and speed controllers lets any source command a course, also without a speed setpoint: with a NaN speed the speed controller is deactivated and the heading is turned so that the thrust commanded elsewhere drives along the course (mecanum aligns its x/y thrust direction with it). The last valid course is held until NaNs are received, and the controllers are reset on every mode change. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
…ted direction The drift angle estimator only measured the ground velocity against the heading, so an omnidirectional vehicle pushing sideways read its intended motion as drift and mecanum had no drift compensation. Taking an optional expected direction of travel in body frame lets mecanum estimate the drift relative to its thrust direction and compensate it in thrust-only course hold. As a library of its own it is no longer tied to rover_control. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
Frigiii
force-pushed
the
frigi/feat/refractor_rover_module
branch
from
November 20, 2026 16:33
4512b93 to
071afab
Compare
added 5 commits
November 20, 2026 18:32
The rover tuning diagrams were 2 to 3 MB PNGs each. The SVG exports of the same draw.io diagrams total about 1 MB and stay sharp at any zoom. They keep the content of the PNGs: all boxes blue, and the differential slow down diagram with its conditions and arrival speed formulas. ackermann_cornering_comparison.png stays, it is a screenshot. The translated pages keep linking the PNGs until they are regenerated. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
The throttle setpoint was renamed to the thrust setpoint, the east axis of the pure pursuit diagram was labelled S, the cornering diagram read "Idea Path", and the differential state machine switches on the heading error, not a bearing error. The maximum steer angle is an angle, not a length. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
The position controller now publishes a course setpoint and speed, and the course controller turns them into speed and attitude setpoints. The control structure diagrams, the tuning pages, Guided Course and the setpoint hierarchy for offboard and external modes did not show this step yet, and the SurfaceVehicleCourseSetpoint page still described the old consumers and NaN handling. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
The speed reduction uses the error between the heading setpoint of the course controller and the heading, but the parameter and the tuning page described it as the error between course and bearing setpoint. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
The slow down diagram shows the arrival speed formula, but the text did not say which parameters v_max and v_gain are, or how the change of direction at the waypoint is normalized. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
Contributor
|
No broken links found in changed files. |
Frigiii
marked this pull request as ready for review
November 23, 2026 07:52
With a NaN speed the course controller deactivates the speed controller, and the actuator controllers keep the last thrust they received. A publisher that sends no thrust of its own leaves the rover driving at the speed controller's last thrust without speed control. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Michael Fritsche <frimi999@gmail.com>
The course controllers each converted the course setpoint to a heading setpoint on their own, and ackermann and differential rovers ignored the drift angle in reverse because it was only estimated driving forwards. calcHeadingSetpoint() is the inverse of the drift angle estimate, with the expected direction of travel as an optional parameter, so one tested function serves forwards, reverse and the mecanum thrust direction. Ackermann and differential rovers now pass pi in reverse to both the estimator and the helper, so the drift angle is estimated and compensated in either direction of travel. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Michael Fritsche <frimi999@gmail.com>
Contributor
Author
|
@hamishwillee : I took the opportunity and changed all rover related png's to svg's. This causes CI to fail. I remember you mentioning that this is allright and will require some cleanup from your side? |
… angle The drift angle was filtered as an angle relative to the direction of travel, so after a course change the vehicle kept the correction measured on the previous course, although the current that causes it is fixed in NED. Estimate the current as a vector in NED instead, from the ground velocity minus the commanded speed along the expected direction of travel, and solve the wind and current triangle for each course setpoint. Without a speed setpoint (thrust-only course hold, rover_mecanum) the measured speed along the expected direction stands in for the commanded one, so only the current across the direction of travel is estimated. Ported from 87aacfc9c8, which did not cherry-pick onto the course control split. Assisted-by: Claude:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solved Problem
In rover_ackermann, rover_differential and rover_mecanum, Guided Course sent its course setpoint straight to the position controller, which mixed path following with course and speed control. A course could only be held together with a speed setpoint, and mecanum had no drift compensation because the drift angle estimator read any sideways motion as drift.
Solution
RO_SPEED_REDis described by the heading error it actually uses. The rover tuning diagrams are SVGs instead of 2 to 3 MB PNGs, with wrong labels fixed.Changelog Entry
For release notes:
Alternatives
Test coverage
SIH SITL on ackermann and differential: mission with stop at the end, Guided Course from rest, with speed and course changes, position mode course hold, steering release and recapture, and reverse. All checks passed except one mission upload acknowledgement on differential that the script missed. Mecanum and the NaN speed path were not tested in SITL.