Sierra Auto

This commit is contained in:
Shikhar
2026-04-10 15:29:55 -06:00
parent 4d732970da
commit 1bb098eb04
7 changed files with 380 additions and 7 deletions
@@ -4,6 +4,12 @@
"type": "sequential", "type": "sequential",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "Zero Encoder"
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@@ -4,6 +4,12 @@
"type": "sequential", "type": "sequential",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "Zero Encoder"
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@@ -0,0 +1,99 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Zero Encoder"
}
},
{
"type": "named",
"data": {
"name": "Intake Extended"
}
},
{
"type": "named",
"data": {
"name": "Intake Reference"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "SierraOne"
}
},
{
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 1.5
}
},
{
"type": "named",
"data": {
"name": "Labubu Growl"
}
}
]
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Intake Extended"
}
},
{
"type": "path",
"data": {
"pathName": "SierraTwo"
}
},
{
"type": "wait",
"data": {
"waitTime": 1.5
}
},
{
"type": "named",
"data": {
"name": "Robot Rev Up"
}
},
{
"type": "path",
"data": {
"pathName": "PlayerStation-Shoot"
}
},
{
"type": "named",
"data": {
"name": "Robot Shoot"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
@@ -0,0 +1,163 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 3.6070897435897447,
"y": 0.6046794871794885
},
"prevControl": null,
"nextControl": {
"x": 4.115752584653353,
"y": 0.5635297641960387
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.470976190476191,
"y": 0.9884102564102579
},
"prevControl": {
"x": 7.2683607377306005,
"y": 0.7987129676949314
},
"nextControl": {
"x": 7.845328732990856,
"y": 1.3388951842695742
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.595564102564104,
"y": 3.3979404761904766
},
"prevControl": {
"x": 7.578725039048031,
"y": 3.6473727233837807
},
"nextControl": {
"x": 7.645039325071269,
"y": 2.665078110146699
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.3306071428571435,
"y": 0.9884102564102579
},
"prevControl": {
"x": 7.602572796768329,
"y": 1.2858726903756175
},
"nextControl": {
"x": 6.958504578754579,
"y": 0.5814230769230777
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 3.712,
"y": 0.6046794871794885
},
"prevControl": {
"x": 3.997989714851531,
"y": 0.6083696770485412
},
"nextControl": {
"x": 3.4545183150183143,
"y": 0.6013571428571436
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.472,
"y": 0.6046794871794885
},
"prevControl": {
"x": 2.721109806922687,
"y": 0.6257580093037158
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [
{
"name": "Constraints Zone",
"minWaypointRelativePos": 1.255583126550872,
"maxWaypointRelativePos": 1.7617866004962806,
"constraints": {
"maxVelocity": 1.2,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 12.0,
"unlimited": false
}
}
],
"pointTowardsZones": [
{
"fieldPosition": {
"x": 7.0,
"y": 8.0
},
"rotationOffset": 0.0,
"minWaypointRelativePos": 1.3067552602436252,
"maxWaypointRelativePos": 2.015503875969026,
"name": "Point Towards Zone"
},
{
"fieldPosition": {
"x": 0.0,
"y": 0.6
},
"rotationOffset": 180.0,
"minWaypointRelativePos": 0.0,
"maxWaypointRelativePos": 0.6910299003322272,
"name": "Point Towards Zone"
},
{
"fieldPosition": {
"x": 0.0,
"y": 0.7
},
"rotationOffset": 180.0,
"minWaypointRelativePos": 2.5913621262458837,
"maxWaypointRelativePos": 5.0,
"name": "Point Towards Zone"
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 12.0,
"unlimited": true
},
"goalEndState": {
"velocity": 3.0,
"rotation": 0.0
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0.0,
"rotation": 0.0
},
"useDefaultConstraints": false
}
@@ -0,0 +1,95 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 2.472,
"y": 0.605
},
"prevControl": null,
"nextControl": {
"x": 2.2708330107691865,
"y": 0.7534312717853275
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 1.5754761904761914,
"y": 1.0
},
"prevControl": {
"x": 2.2272563574654534,
"y": 0.9727386663284083
},
"nextControl": {
"x": 0.9236960234869294,
"y": 1.0272613336715914
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 0.325,
"y": 0.95
},
"prevControl": {
"x": 0.5747421350529089,
"y": 0.9386480847776856
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [
{
"name": "Constraints Zone",
"minWaypointRelativePos": 0,
"maxWaypointRelativePos": 0.0,
"constraints": {
"maxVelocity": 1.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 10.0,
"unlimited": false
}
}
],
"pointTowardsZones": [
{
"fieldPosition": {
"x": 0.0,
"y": 0.7
},
"rotationOffset": 180.0,
"minWaypointRelativePos": 0.6,
"maxWaypointRelativePos": 1.0956834532374118,
"name": "Point Towards Zone"
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0.0,
"rotation": -95.0
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 3.0,
"rotation": 0.0
},
"useDefaultConstraints": true
}
@@ -145,6 +145,9 @@ public class RobotContainer {
private Command WaitIntakeReference = private Command WaitIntakeReference =
new WaitUntilCommand(m_robotIntake::intakeAtReference); new WaitUntilCommand(m_robotIntake::intakeAtReference);
private Command ZeroEncoder =
new InstantCommand(() -> m_robotIntake.io.fixEncoder(), m_robotIntake);
private Command RobotShootDriving = new SequentialCommandGroup( private Command RobotShootDriving = new SequentialCommandGroup(
new RunCommand(() -> new RunCommand(() ->
m_robotSwerveDrive.enableRotationOverride(FieldPositions.HUB_POSITION, ShooterConstants.AIM_LEAD_TIME.get(), FieldPositions.HUB_POSITION) m_robotSwerveDrive.enableRotationOverride(FieldPositions.HUB_POSITION, ShooterConstants.AIM_LEAD_TIME.get(), FieldPositions.HUB_POSITION)
@@ -163,9 +166,9 @@ public class RobotContainer {
new WaitUntilCommand(m_robotShooter::isShooterUpToSpeed), new WaitUntilCommand(m_robotShooter::isShooterUpToSpeed),
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Idle), m_robotIntake), new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Idle), m_robotIntake),
new InstantCommand(()-> m_robotShooter.allowShooting(), m_robotShooter), new InstantCommand(()-> m_robotShooter.allowShooting(), m_robotShooter),
new WaitCommand(2.75), new WaitCommand(3.5),
IntakeRetracted, IntakeRetracted,
new WaitCommand(4.4), new WaitCommand(5),
new InstantCommand(() -> m_robotShooter.denyShooting(), m_robotShooter), new InstantCommand(() -> m_robotShooter.denyShooting(), m_robotShooter),
new InstantCommand(()-> m_robotShooter.spinUpIdle(), m_robotShooter) new InstantCommand(()-> m_robotShooter.spinUpIdle(), m_robotShooter)
); );
@@ -191,6 +194,7 @@ public class RobotContainer {
}, true); }, true);
NamedCommands.registerCommand("Robot Rev Up", RobotRev); NamedCommands.registerCommand("Robot Rev Up", RobotRev);
NamedCommands.registerCommand("Zero Encoder", ZeroEncoder);
NamedCommands.registerCommand("Intake Retracted", IntakeRetracted); NamedCommands.registerCommand("Intake Retracted", IntakeRetracted);
NamedCommands.registerCommand("Robot Shoot", RobotShoot); NamedCommands.registerCommand("Robot Shoot", RobotShoot);
// NamedCommands.registerCommand("Lidar Intake", LidarIntake); // NamedCommands.registerCommand("Lidar Intake", LidarIntake);
@@ -7,12 +7,12 @@ public final class BuildConstants {
public static final String MAVEN_GROUP = ""; public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "2026KPopRobotHunters"; public static final String MAVEN_NAME = "2026KPopRobotHunters";
public static final String VERSION = "unspecified"; public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 238; public static final int GIT_REVISION = 239;
public static final String GIT_SHA = "e175ca49a34bea824ae7598a8cc54e22f060c4c2"; public static final String GIT_SHA = "4d732970da558d90c4be1787635dc5786674bd27";
public static final String GIT_DATE = "2026-04-10 13:20:37 MDT"; public static final String GIT_DATE = "2026-04-10 13:59:21 MDT";
public static final String GIT_BRANCH = "Encoder-Fix"; public static final String GIT_BRANCH = "Encoder-Fix";
public static final String BUILD_DATE = "2026-04-10 13:43:28 MDT"; public static final String BUILD_DATE = "2026-04-10 14:33:17 MDT";
public static final long BUILD_UNIX_TIME = 1775850208266L; public static final long BUILD_UNIX_TIME = 1775853197175L;
public static final int DIRTY = 1; public static final int DIRTY = 1;
private BuildConstants(){} private BuildConstants(){}