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

Pure Pursuit: Handle edge case and add logging message #24084

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chfriedrich98
Copy link
Contributor

Solved Problem

Pure pursuit edge case

The pure pursuit library can now handle the following edge case:
If the acceptance radius of a waypoint is bigger than the lookahead radius of the pure pursuit controller the following edge case can happen:
rover_graphics-pure_pursuit_edge_case drawio

The linesegment is outside of the lookahead which makes the rover default to calculating the bearing towards the closest point on the extended line segment (red dot). However, in this edge case this leads the rover to take a suboptimal path (red). The rover will now instead directly target the previous waypoint if the closest point on the path is not on the actual line segment leading to the more direct path (yellow).
In the same fashion, if the closest point on the path is ahead of the line segment the rover will target the current waypoint instead.

Logging message

This PR also adds a message for the purePursuit library to log relevant values.
This makes tuning of the pure pursuit algorithm easier and also deprecates the 3 [rover_type]_guidance_status.msg messages.

To use the library and publish the pure pursuit message the function 'updatePurePursuit' has to be called.
If the logging is not required then the function calcTargetBearing (renamed from calcDesiredHeading) can also be called direclty, which will return the target bearing without publishing the pure pursuit message.

Test coverage

  • SITL tested

@chfriedrich98 chfriedrich98 added the Rover 🚙 Rovers and other UGV label Dec 9, 2024
@chfriedrich98 chfriedrich98 self-assigned this Dec 9, 2024
@chfriedrich98 chfriedrich98 force-pushed the purepursuit_message branch 3 times, most recently from f0b1493 to c90e831 Compare December 9, 2024 15:32
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: 🏗 In Progress
Development

Successfully merging this pull request may close these issues.

1 participant