-
Notifications
You must be signed in to change notification settings - Fork 1
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
allows for robot to shuttle notes #62
Conversation
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 shuttle command prevents the driver from moving. Perhaps add to swerve a method to aim at a point and use that for shooting at the speaker and doing shuttling.
@@ -514,8 +516,12 @@ private void configureBindings() { | |||
() -> shooterPivotSubsystem.setAngleOffset(Units.degreesToRadians(0))) | |||
); | |||
|
|||
shuttleNotes.onTrue(new ShooterFlywheelShuttleCommand(swerveSubsystem, | |||
shooterFlywheelSubsystem, swerveSubsystem::getRobotPosition, shooterPivotSubsystem) | |||
shuttleNotesDefaultSpeed.onTrue(new ShooterFlywheelShuttleCommand(swerveSubsystem, |
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.
one switch and just use onFalse to set it back to default? no reason for this to be on two different switches.
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.
This also runs the shuttle command. Is that intended?
@@ -70,16 +72,15 @@ public void initialize() { | |||
|
|||
/** Is robot in center line. */ | |||
public boolean isFinished() { | |||
|
|||
return (poseSupplier.getPose2d().getX() < 326.365 + 70 || poseSupplier.getPose2d().getX() > 326.36 - 70); | |||
return (poseSupplier.getPose2d().getX() < Units.inchesToMeters(326.365 + 70) || poseSupplier.getPose2d().getX() > Units.inchesToMeters(326.36 - 70)); | |||
} | |||
|
|||
/** What the command has to execute. */ | |||
public void execute() { | |||
|
|||
swerveSubsystem.setRobotRelativeDrivePowers(0, 0, -MathUtil.clamp( |
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.
Your command will work, but it prevents the driver from translating while this happens. This will require a rework so swerve is still drivable.
No description provided.