mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
New Ramp autos
This commit is contained in:
@@ -195,17 +195,17 @@ public class RobotContainer {
|
||||
|
||||
NamedCommands.registerCommand("BumpOffsetForward", new InstantCommand(() -> {
|
||||
if (TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED_FRONT);
|
||||
} else {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE_FRONT);
|
||||
}
|
||||
}));
|
||||
|
||||
NamedCommands.registerCommand("BumpOffsetReverse", new InstantCommand(() -> {
|
||||
if (!TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED);
|
||||
NamedCommands.registerCommand("BumpOffsetBackward", new InstantCommand(() -> {
|
||||
if (TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED_BACK);
|
||||
} else {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE_BACK);
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -304,8 +304,8 @@ public class RobotContainer {
|
||||
FieldPositions.HUB_POSITION,
|
||||
ShooterConstants.AIM_LEAD_TIME.get()
|
||||
);
|
||||
}, m_robotSwerveDrive)
|
||||
);
|
||||
}, m_robotSwerveDrive))
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
// D-PAD fine alignment
|
||||
new Trigger(() -> getDeadbandedDriverController().getPOV() != -1)
|
||||
@@ -383,6 +383,18 @@ public class RobotContainer {
|
||||
m_robotIntake.setMode(IntakeMode.Idle);
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.START_BUTTON)
|
||||
.whileTrue(
|
||||
new PathPlannerAuto("Right_AutoClimb")
|
||||
)
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.BACK_BUTTON)
|
||||
.whileTrue(
|
||||
new PathPlannerAuto("Left_AutoClimb")
|
||||
)
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
// new JoystickButton(getDeadbandedOperatorController(), XboxController.B_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> {
|
||||
// m_robotClimber.toggleDeployed();
|
||||
@@ -395,11 +407,11 @@ public class RobotContainer {
|
||||
private void configureSINGLEBindings() {
|
||||
|
||||
//Driver controls
|
||||
// new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> m_robotSwerveDrive.resetGyro()));
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED)));
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.resetGyro()));
|
||||
|
||||
// new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED)));
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.shiftUp()));
|
||||
@@ -556,7 +568,8 @@ public class RobotContainer {
|
||||
|
||||
for (String auto : autos) {
|
||||
if (auto.endsWith(".auto"))
|
||||
autoChooser.addOption(auto.replaceAll(".auto", ""), auto.replaceAll(".auto", ""));
|
||||
if (auto.startsWith("X. "))
|
||||
autoChooser.addOption(auto.replaceAll(".auto", ""), auto.replaceAll(".auto", ""));
|
||||
// System.out.println(auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 182;
|
||||
public static final String GIT_SHA = "75cab187e2225e51259336e5569f15c41f9169d5";
|
||||
public static final String GIT_DATE = "2026-03-21 13:38:34 MDT";
|
||||
public static final String GIT_BRANCH = "MiraOrg";
|
||||
public static final String BUILD_DATE = "2026-03-21 15:45:59 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1774129559544L;
|
||||
public static final int GIT_REVISION = 186;
|
||||
public static final String GIT_SHA = "a774f156c681df6426dc5d344b84692080bb8a06";
|
||||
public static final String GIT_DATE = "2026-03-26 18:40:37 MDT";
|
||||
public static final String GIT_BRANCH = "DenverAutos";
|
||||
public static final String BUILD_DATE = "2026-03-30 19:07:09 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1774919229417L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -11,17 +11,28 @@ public final class FieldConstants {
|
||||
public static final AprilTagFieldLayout kTagLayout = AprilTagFieldLayout.loadField(AprilTagFields.k2026RebuiltAndymark);
|
||||
|
||||
public static final double BUMP_OFFSET = 0.4;
|
||||
public static final Transform2d BUMP_OFFSET_RED = new Transform2d(
|
||||
public static final Transform2d BUMP_OFFSET_RED_FRONT = new Transform2d(
|
||||
Meters.of(BUMP_OFFSET),
|
||||
Meters.of(0),
|
||||
new Rotation2d()
|
||||
);
|
||||
public static final Transform2d BUMP_OFFSET_BLUE = new Transform2d(
|
||||
public static final Transform2d BUMP_OFFSET_BLUE_FRONT = new Transform2d(
|
||||
Meters.of(-BUMP_OFFSET),
|
||||
Meters.of(0),
|
||||
new Rotation2d()
|
||||
);
|
||||
|
||||
public static final Transform2d BUMP_OFFSET_RED_BACK = new Transform2d(
|
||||
Meters.of(-BUMP_OFFSET),
|
||||
Meters.of(0),
|
||||
new Rotation2d()
|
||||
);
|
||||
public static final Transform2d BUMP_OFFSET_BLUE_BACK = new Transform2d(
|
||||
Meters.of(BUMP_OFFSET),
|
||||
Meters.of(0),
|
||||
new Rotation2d()
|
||||
);
|
||||
|
||||
// Test april tag field layout
|
||||
// public static final AprilTagFieldLayout kTagLayout = new AprilTagFieldLayout(
|
||||
// Arrays.asList(new AprilTag[] {
|
||||
|
||||
Reference in New Issue
Block a user