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

allows for robot to shuttle notes #62

Merged
merged 6 commits into from
Apr 2, 2024
Merged

allows for robot to shuttle notes #62

merged 6 commits into from
Apr 2, 2024

Conversation

siyoyoCode
Copy link
Contributor

No description provided.

@siyoyoCode siyoyoCode requested a review from penguin212 March 27, 2024 22:09
Copy link
Contributor

@penguin212 penguin212 left a 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,
Copy link
Contributor

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.

Copy link
Contributor

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(
Copy link
Contributor

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.

@penguin212 penguin212 merged commit 3b43676 into main Apr 2, 2024
1 check passed
@penguin212 penguin212 deleted the shuttle branch April 2, 2024 23:53
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.

2 participants