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

[wpimath] SwerveDrivePoseEstimator: Fix stationary module emitting error when calculating angle in ToSwerveModuleStates #7175

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

bryceroethel
Copy link
Contributor

Introduced in #6767, ToSwerveModuleStates will emit an error when calculating a module's angle if its velocity is 0. This PR adds a preemptive check for a non-zero velocity, otherwise substituting the module's last heading.

@bryceroethel bryceroethel requested a review from a team as a code owner October 10, 2024 00:46
@PeterJohnson PeterJohnson merged commit d97a749 into wpilibsuite:main Oct 11, 2024
33 checks passed
spacey-sooty pushed a commit to spacey-sooty/allwpilib that referenced this pull request Oct 26, 2024
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