-
Notifications
You must be signed in to change notification settings - Fork 0
Subsystem/shooter flywheel #10
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
Conversation
spellingcat
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.
pretty close. i'm gonna have you coordinate w jason tomorrow hopefully if y'all can both make it to start writing the code that will control both the hood + rollers at the same time
| HoodIOInputsAutoLogged hoodinputs = new HoodIOInputsAutoLogged(); | ||
|
|
||
| RollerIOReal rollerIO; | ||
| RollerIOInputsAutoLogged rollerinputs = new RollerIOInputsAutoLogged(); |
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.
| RollerIOInputsAutoLogged rollerinputs = new RollerIOInputsAutoLogged(); | |
| RollerIOInputsAutoLogged rollerInputs = new RollerIOInputsAutoLogged(); |
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 would perhaps rename these variables to flywheelIO and flywheelInputs (to be clear, it's still of type RollerIOReal- flywheel would just be in the name of the variables)
…anderRobotics/Rebuilt into subsystem/shooter-flywheel
…anderRobotics/Rebuilt into subsystem/shooter-flywheel
spellingcat
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.
couple things but i'll change them. nice job
| flywheelFollower.setControl( | ||
| new Follower( | ||
| flywheelLeader.getDeviceID(), | ||
| MotorAlignmentValue.Opposed) // i didnt know what to put here |
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.
they're aligned but i'll change that for you
| flywheelVelocity = flywheelLeader.getVelocity(); | ||
| flywheelVoltage = flywheelLeader.getMotorVoltage(); | ||
| flywheelStatorCurrent = flywheelLeader.getStatorCurrent(); | ||
| flywheelSupplyCurrent = flywheelLeader.getSupplyCurrent(); | ||
| flywheelTemp = flywheelLeader.getDeviceTemp(); | ||
| flywheelPositionRotations = flywheelLeader.getPosition(); |
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.
let's also log the stuff for the follower - generally it shouldn't be different but if it is that's a problem and we'd like to know
| flywheelFollower.optimizeBusUtilization(); | ||
| } | ||
|
|
||
| // did not know how to do anything here, |
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 ok it's basically just settings for the motor
| flywheelLeader.setControl(motionMagicVelocityVoltage.withVelocity(flywheelVelocity)); | ||
| } | ||
|
|
||
| public void stop() { // thought i should add a stop command, dont think i had to though |
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 think we do because that's how the superstructure's organized
| TalonFXSimState leaderFxSimState; | ||
| DCMotorSim physicsSim = | ||
| new DCMotorSim( | ||
| LinearSystemId.createDCMotorSystem(DCMotor.getKrakenX60Foc(2), 0, 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.
these shouldn't be 0's but i'll change it
|
|
||
| // follower follows leader | ||
| flywheelFollower.setControl( | ||
| new Follower(flywheelLeader.getDeviceID(), MotorAlignmentValue.Aligned)); |
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 follower isn't aligned.
| flywheelFollowerSupplyCurrent = flywheelFollower.getSupplyCurrent(); | ||
| flywheelFollowerTemp = flywheelFollower.getDeviceTemp(); | ||
|
|
||
| BaseStatusSignal.setUpdateFrequencyForAll( |
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.
It probably works to re-access these but probably better to just pass in the variables
|
|
||
| config.MotorOutput.NeutralMode = NeutralModeValue.Coast; | ||
| config.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive; | ||
|
|
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.
No gear ratio for flywheel but fixed in superstructure/sysid i think
No description provided.