Skip to content

Follower Changes (pure pain it's 3:20am rn) .·´¯(>▂<)´¯·. #159

Merged
DylanBPY merged 7 commits into
ApexPathing:mainfrom
DrPixelCat:main
Jun 3, 2026
Merged

Follower Changes (pure pain it's 3:20am rn) .·´¯(>▂<)´¯·. #159
DylanBPY merged 7 commits into
ApexPathing:mainfrom
DrPixelCat:main

Conversation

@DrPixelCat
Copy link
Copy Markdown
Contributor

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.

@DrPixelCat DrPixelCat requested a review from a team May 30, 2026 08:23
@paradoxical-duck
Copy link
Copy Markdown
Member

Go to sleep my goat 😴
Gn

Comment thread TeamCode/src/main/java/followers/MovementFollower.java Outdated
Copy link
Copy Markdown
Member

@paradoxical-duck paradoxical-duck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 👍

Comment thread TeamCode/src/main/java/followers/MovementFollower.java Outdated
Comment thread TeamCode/src/main/java/followers/MovementFollower.java
Comment thread TeamCode/src/main/java/followers/MovementFollower.java
Comment thread TeamCode/src/main/java/followers/MovementFollower.java Outdated
Comment thread TeamCode/src/main/java/followers/MovementFollower.java
# Conflicts:
#	TeamCode/src/main/java/followers/constants/BSplineFollowerConstants.java
Copy link
Copy Markdown
Member

@paradoxical-duck paradoxical-duck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@DylanBPY DylanBPY merged commit 4c91a42 into ApexPathing:main Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants