Repository navigation
Pinpoint tuner always reports FORWARD: read direction before Stop - #115
Merged
BaronClaps merged 1 commit intoOct 8, 2026
Merged
Conversation
Both Pinpoint direction steps read their answer after the OpMode is stopped. By then the Pinpoint has reset its pose to zero, so 'x < 0' and 'y < 0' are always false and every pod is reported FORWARD, no matter which way the robot was pushed. Robots whose pods need REVERSED get a wrong config and an inverted axis. Keep the last reading taken before Stop instead.
KanishkaGarg0215
approved these changes
Oct 4, 2026
Member
|
Thank you. |
Author
|
No problem thanks for merging |
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.
Problem
The Pinpoint tuner reports every odometry pod as
FORWARD, regardless of which way the robot is pushed. Robots whose pods actually needREVERSEDget a wrong config, and with it an inverted axis.Both direction steps (
PinpointForwardDirection,PinpointStrafeDirection) read their result after the OpMode is stopped:By the time that line runs, the Pinpoint has reset its pose to zero, so
y < 0isfalseand the step returns "not reversed".Evidence
I added logging to the strafe step on a goBILDA 4-bar Pinpoint (strafe pod physically reversed) and pushed the robot 15" left:
During the push the localizer correctly reads y ≈ −15" with the heading steady, which should produce
REVERSED. After Stop it readsy = 0.0(and a garbage raw count), and the step returnsFORWARD.The forward step has the same flaw (
x < 0). It is only hidden on robots whose forward pod happens to beFORWARD.Fix
Keep the last reading taken before Stop, and return based on that:
Same change for
xin the forward step.Tested
On the same robot, the unmodified tuner returned
yPodDirection FORWARD / yPodOffset -6.58on every run. That config inverted the strafe axis: the Tests hold test drifted when pushed instead of resisting, and the pod test failed. With this fix, the tuner returnsREVERSED / +6.62on its own. That matches a hand-verified config, and Tests pass.https://claude.ai/code/session_01XpssWQZ6aU4sZnFsKwFz4x