Follower Changes (pure pain it's 3:20am rn) .·´¯(>▂<)´¯·. #159
Merged
Conversation
Member
|
Go to sleep my goat 😴 |
DylanBPY
reviewed
May 30, 2026
paradoxical-duck
approved these changes
May 30, 2026
Member
paradoxical-duck
left a comment
There was a problem hiding this comment.
All good except minor changes here and there, and also need to switch this over from PDFL to PDS later. It is fine for now 👍
# Conflicts: # TeamCode/src/main/java/followers/constants/BSplineFollowerConstants.java
DylanBPY
approved these changes
Jun 3, 2026
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.
PLEASE NOTE: Half of this overview stuff isn't right, just look at file changes and if you have questions message in core team
Path-Centric Control: Replaced field-centric xController and yController with a single lateralController (Cross-Track) and a driveController (Along-Track/Tangent). This eliminates the double-counting of forward error and preserves the (+/-) sign for derivative terms.
Waterfall Power Allocation: Implemented a prioritized motor power budget (1.0 max). The budget is allocated strictly in order of physical importance: Turn → Combined Lateral (Centripetal + Cross-Track) → Forward Drive.
Centripetal Force Scaling (CFS): Dynamically limits target velocity based on the radius of curvature and hardware traction limits (constants.getMaxLateralAccel()).
Combined Lateral Axis: Mathematically combined the centripetal feedforward power and the lateral corrective PID. This ensures that if the robot is trapped inside an arc, the corrective PID inherently relieves the centripetal saturation rather than fighting a 0.0 power floor.
Cascaded Deceleration: Added kA based braking. If the robot's physical velocity exceeds the safe curve velocity, it generates a negative acceleration value to actively pull power and brake into corners.
Read → Calculate → Write: Refactored the entire update() loop into a strict, state-safe pipeline to prevent mid-loop mutation bugs.
Infinite Line Fallback: The follower now gracefully handles overshooting the end of a path by projecting the robot's position onto the final tangent vector.