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

Move things to library #148

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open

Move things to library #148

wants to merge 63 commits into from

Conversation

rmheuer
Copy link
Contributor

@rmheuer rmheuer commented Mar 29, 2023

So far, moves gyroscopes, swerve, and subsystem switches to library. Currently broken, turning does not work properly for swerve

@rmheuer
Copy link
Contributor Author

rmheuer commented Mar 29, 2023

Turning fixed, turns out vision was interfering due to latency from multithreading undoing the last periodic's simulated gyro rotation. This is not a problem on the real robot since vision cannot physically rotate the robot, so the vision pose will catch up to reality after the latency period ends.

@rmheuer rmheuer requested a review from mvog2501 March 29, 2023 01:48
@rmheuer rmheuer marked this pull request as draft March 29, 2023 03:42
@rmheuer
Copy link
Contributor Author

rmheuer commented Apr 10, 2023

Why we want this branch because Mason asked this morning:

  • Allows the team to reuse drive base code between seasons and have a full drive base with PathPlanner working in about 10 minutes
  • Allows using the same subsystem code for different motor types (such as if we want to put NEO swerve on Nessie)
  • Makes it more clear what direction motors, gyroscopes, and encoders operate in since it uses the Angle library
  • Every motor, encoder, etc. has the same API and has reasonable units (unlike CTRE) regardless of device type or manufacturer
    • This makes programming training easier since people don't have to learn how each vendor library works individually
  • It is possible to swap out the hardware implementations for simulated equivalents, allowing for simulation to be fully decoupled from the robot code
    • We can use this for more physically accurate simulation (such as simulating the motors and PID in subsystems)
    • We could also use this to create a 3D simulation of the full robot, that can run the actual robot code

@rmheuer rmheuer marked this pull request as ready for review April 10, 2023 17:48
@mvog2501
Copy link
Contributor

There's so much to review here, gimme a bit.

@lorenzogood
Copy link
Contributor

There's so much to review here, gimme a bit.

Part of it was the formatting bot, if you exclude those commits then you loose 17k lines.

@rmheuer
Copy link
Contributor Author

rmheuer commented Apr 12, 2023

Don’t merge this yet, I need to fix the formatting

@rmheuer
Copy link
Contributor Author

rmheuer commented Apr 15, 2023

Still need to verify CANCoder angle direction is correct using robot, then this can be merged

@rmheuer
Copy link
Contributor Author

rmheuer commented Jun 10, 2023

Need to double-check encoder and motor directions are being used properly in robot code, then this should be mergeable

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