Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Cube confirm and better default arm position #43

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ResetArmPositionCommand(Arm arm) {
public ResetArmPositionCommand(Arm arm, boolean shouldZero) {
this.arm = arm;
this.shouldZero = shouldZero;
this.setpoint = ArmState.fromRotationExtension(Rotation2d.fromDegrees(-30), Constants.ArmConstants.ARM_BASE_LENGTH);
this.setpoint = ArmState.fromRotationExtension(Rotation2d.fromDegrees(-15), Constants.ArmConstants.ARM_BASE_LENGTH);
addRequirements(arm);
}

Expand Down
13 changes: 3 additions & 10 deletions src/main/java/org/team1540/robot2023/commands/auto/AutoCube.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,11 @@ public AutoCube(Drivetrain drivetrain, Arm arm, GridScoreData positions, Wheeled
new ConditionalCommand(
Commands.sequence(
new AutoGridAlign(drivetrain, positions, shouldAlign),
// new ProxiedGridDriveCommand(drivetrain, positions),
Commands.deadline(
new SetArmPosition(arm, positions.approach),
Commands.sequence(
new ProxyCommand(() -> new WaitCommand((arm.timeToState(positions.approach)-150)/1000)),

new GrabberOuttakeCommand(intake)

)
),
new SetArmPosition(arm, positions.approach),
new WaitUntilCommand(() -> controller.getLeftTriggerAxis() > 0.95).unless(() -> controller == null),
Commands.deadline(
Commands.sequence(
new WaitCommand(0.1),
new SetArmPosition(arm, AutoHybrid.catchNull(positions.retreat)).unless(() -> positions.retreat == null),
new ResetArmPositionCommand(arm, false),
new ResetArmPositionCommand(arm, true)
Expand Down
Loading