Skip to content

Commit

Permalink
reduce leave community distance and add cube shooting auto
Browse files Browse the repository at this point in the history
  • Loading branch information
ss0g committed Mar 5, 2023
1 parent f830ac2 commit 383f1c3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/spartronics4915/frc2023/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,12 @@ public ArmMotorConstants(int MotorID, double PositionConversionFactor, boolean I
Rotation2d.fromDegrees(23),
Rotation2d.fromDegrees(-36)
);

public static final ArmPositionConstants kCubeTopShootConstants = new ArmPositionConstants(
0,
Rotation2d.fromDegrees(9.996031),
Rotation2d.fromDegrees(30.441)
);

public static final Rotation2d kTransformAmount = Rotation2d.fromDegrees(0.5);
public static final double kArmRetractedPriorWaitDuration = 1; // seconds
Expand Down
23 changes: 22 additions & 1 deletion src/main/java/com/spartronics4915/frc2023/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,29 @@ mAutos.new Strategy(
"place, leave community",
(Pose2d initialPose) -> new SequentialCommandGroup(
mArmCommands.new ReleasePiece(ArmState.FLOOR_POS),
mArmCommands.new SetArmLocalState(ArmState.TUCK_INTERMEDIATE),
new WaitCommand(1),
mSwerve.driveCommand(new ChassisSpeeds(-2, 0, 0), false, true),
new WaitCommand(3),
new WaitCommand(2.5),
mSwerve.driveCommand(new ChassisSpeeds(), false, true)
)
),
mAutos.new Strategy(
"cube high (test)",
(Pose2d initialPose) -> new SequentialCommandGroup(
mArmCommands.new ReleasePiece(ArmState.SHOOT_HIGH_CUBE)
)
),
mAutos.new Strategy(
"place, move short (test)",
(Pose2d initialPose) -> new SequentialCommandGroup(
mArmCommands.new ReleasePiece(ArmState.FLOOR_POS),
mArmCommands.new SetArmLocalState(ArmState.TUCK_INTERMEDIATE),
new WaitCommand(1),
mSwerve.driveCommand(new ChassisSpeeds(-0.5, 0, 0), false, true),
new WaitCommand(2),
mSwerve.driveCommand(new ChassisSpeeds(-1, 0, 0), false, true),
new WaitCommand(1),
mSwerve.driveCommand(new ChassisSpeeds(), false, true)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public enum ArmState {
CONE_LEVEL_1(kConeLevel1Constants),
CONE_LEVEL_2(kConeLevel2Constants),
CUBE_LEVEL_1(kCubeLevel1Constants),
CUBE_LEVEL_2(kCubeLevel2Constants);
CUBE_LEVEL_2(kCubeLevel2Constants),

SHOOT_HIGH_CUBE(kCubeTopShootConstants);

// CONE_LEVEL_3(kConeLevel3Constants);

Expand Down

0 comments on commit 383f1c3

Please sign in to comment.