-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement more performant swerve kinematics and odometry #46
Conversation
Is this based on WPILib swerve kinematics, or is it entirely new? |
It's essentially a clone (see theirs), with some performance optimizations and better method names. Additionally, I combined the Odometry and PoseEstimator into one class, since they're typically used together anyway. |
} | ||
minCosine *= minCosine * minCosine; // minCosine to the 3rd power | ||
for (int i = 0; i < modules.length; i++) { | ||
states[i].speedMetersPerSecond *= minCosine; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we originally added a correction like this to limit the speed of wheels that are facing the wrong way, until the motors align them a bit more with the direction of travel (though I don't recall the cubing). We'll need to do some testing as soon as we have a swerve chassis and shake all the issues out of this implementation before the build season.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my plan for the new swerve chassis we just got
No description provided.