-
Notifications
You must be signed in to change notification settings - Fork 0
Subsystem/comp turret #33
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
base: main
Are you sure you want to change the base?
Conversation
SCool62
left a comment
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.
Looks very good, but you still need to write a TurretIOSim.
| public static double HOOD_GEAR_RATIO = 24.230769; | ||
| public static Rotation2d HOOD_MAX_ROTATION = Rotation2d.fromDegrees(40); | ||
| public static Rotation2d HOOD_MIN_ROTATION = Rotation2d.fromDegrees(2); | ||
| public static double TURRET_GEAR_RATIO = (12.0 / 42.0) * (16.0 / 32.0) * (10.0 / 85.0); |
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.
I assume you've checked this with cad?
| /** Add your docs here. */ | ||
| public class TurretIO { | ||
| @AutoLog | ||
| public static class TurretIOInputs { |
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.
Also log velocity here
| public double turretSupplyCurrentAmps = 0.0; | ||
| public double turretVoltage = 0.0; | ||
| public double turretTempC = 0.0; | ||
| // _TODO: Input reall values |
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.
Wdym?
| private VelocityVoltage velocityVoltage = new VelocityVoltage(0.0).withEnableFOC(true); | ||
|
|
||
| public TurretIO(TalonFXConfiguration talonFXConfiguration, CANBus canbus) { | ||
| turretMotor = new TalonFX(11, canbus); |
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.
The shooter hood is already ID 11. Comp CAN ids haven't been decided yet so for now give it a large random number (like 40 or smth) for now
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.
Btw this is so that the ids don't clash during sim
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.
Ig its not on this branch so maybe it doesn't matter but better avoid the problem now then fix it later
No description provided.