-
Notifications
You must be signed in to change notification settings - Fork 0
not sure if correct but turretsubsystem auto stubs filled #29
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
| public class TurretSubsystem extends SubsystemBase implements Shooter { | ||
| /** Creates a new TurretSubsystem. */ | ||
| public TurretSubsystem() {} | ||
| public static double HOOD_GEAR_RATIO = 24.230769; |
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.
typically we leave this in terms of like x / y so it's easier to see what the gears actually are
| flywheelIO.updateInputs(flywheelInputs); | ||
| Logger.processInputs("Shooter/Flywheel", flywheelInputs); |
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.
make sure to also update and process hood inputs
src/main/java/frc/robot/Robot.java
Outdated
| shooter = | ||
| new TurretSubsystem( | ||
| ROBOT_MODE == RobotMode.REAL | ||
| ? new FlywheelIO(FlywheelIO.getFlywheelConfiguration(), canivore) |
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.
make sure you're not using the same getFlywheelConfiguration and getHoodConfigurations as the alpha shooter. these will need to be new methods returning diff configs
src/main/java/frc/robot/Robot.java
Outdated
| : new FlywheelIOSim(FlywheelIO.getFlywheelConfiguration(), canivore), | ||
| ROBOT_MODE == RobotMode.REAL | ||
| ? new HoodIO(HoodIO.getHoodConfiguration(), canivore) | ||
| : new HoodIOSim(canivore)); |
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, hoodio should probably have the motor passed in to the constructor as it's not always going to be the same motor or have the same settings. this then also means hoodiosim needs to also have the motor passed in the constructor as well as the physics sim with the physical parameters specific to the mechanism. you could make like a static getAlphaHoodSim method if that makes it easier
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.
and same with flywheel
| public Command spit() { | ||
| return this.run( | ||
| () -> { | ||
| hoodIO.setHoodPosition(Rotation2d.kZero); |
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.
should this also be hood min rotation?
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.
idk what spit is actually supposed to do (did not write the command) so idk, just resets to zeroing position ig?
vivi-o
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 good to me. Make sure to run build as well before pushing so the formatter is happy
| } | ||
|
|
||
| @Override | ||
| public Command zeroHood() { |
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.
Add a method to the current zero the hood. You can steal this from the alpha code, but basically run the motors backwards until it's hitting the physical stop (using the current to tell), and then do zeroHood() so it's zeroed
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.
did you want a command like current rezeroing like on seahorse:
public Command runCurrentZeroing() {
return setPivotVoltage(() -> -5.0)
.until(
new Trigger(() -> Math.abs(pivotCurrentFilterValue) > CURRENT_THRESHOLD).debounce(0.25))
.andThen(
Commands.parallel(Commands.print("Intake Zeroed"), zeroPivot(() -> ZEROING_POSITION)));
}
the rezero command is pretty similar on that compared to whats on here:
public Command rezero() {
// return this.runOnce(() -> pivotIO.resetEncoder(Rotation2d.kCCW_90deg));
return this.runOnce(() -> pivotIO.resetEncoder(ZEROING_ANGLE));
}
| /** Creates a new TurretSubsystem. */ | ||
| public static double HOOD_GEAR_RATIO = 1; | ||
| public static double HOOD_GEAR_RATIO_C = 1; | ||
| public static double FLYWHEEL_GEAR_RATIO_C = 1; |
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.
why is there FLYWHEEL_GEAR_RATIO_C and FLYWHEEL_GEAR_RATIO? (ig we don't know actual gear ratio yet bc cads not final?)
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.
mb on naming but fwc is comp ratio and fw is alpha ratio (fixed now including gear ratios)
No description provided.