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

Adds basic SwerveControllerCommand #45

Merged
merged 17 commits into from
Jan 20, 2024

Conversation

TheTripleV
Copy link
Member

@TheTripleV TheTripleV commented Jan 18, 2024

Simple version of #38 .

Doesn't depend on overtake and beartype.

Only has 1 definition.

The existing java one is a matrix of

  1. 3 separate pid controllers vs 1 holonomic controller
  2. Is desired rotation specified?

This leads to 4 total overloads.

  1. The sugar java provides is just pid1, pid2, pid3 -> HolonomicDriveController(pid1, pid2, pid3). I added that to the docstring instead. That's a tiny amount of sugar.
  2. I made desired rotation optional.

Tests: Like java, I only tested 4 swerve modules. No one uses 2/3/6 anyway.

@virtuald virtuald merged commit 27a3071 into robotpy:main Jan 20, 2024
19 checks passed
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