wpilibsuite / frc-docs

Official FRC Documentation powered by Read the Docs
https://docs.wpilib.org
Other
145 stars 256 forks source link

Describe cosine compensation in swerve drive kinematics #2661

Closed Alextopher closed 3 weeks ago

Alextopher commented 1 month ago

So called "cosine compensation" is a common swerve drive optimization that I believe could benefit from easier discoverability and explanation.

I apologize I'm not familiar with wpilibc or robotpy, I would appreciate if someone could verify those code examples look right.

sciencewhiz commented 1 month ago

Is there a reason that C++ uses a different variable name from Java and Python?

Alextopher commented 1 month ago

Is there a reason that C++ uses a different variable name from Java and Python?

I used the same variable names as the previous code example.