--- /dev/null
+{
+ "version": "2025.0",
+ "command": {
+ "type": "sequential",
+ "data": {
+ "commands": [
+ {
+ "type": "path",
+ "data": {
+ "pathName": "shoot from start"
+ }
+ },
+ {
+ "type": "path",
+ "data": {
+ "pathName": "Full Left Path v3"
+ }
+ }
+ ]
+ }
+ },
+ "resetOdom": true,
+ "folder": null,
+ "choreoAuto": false
+}
\ No newline at end of file
--- /dev/null
+{
+ "version": "2025.0",
+ "waypoints": [
+ {
+ "anchor": {
+ "x": 4.461245551596047,
+ "y": 7.623190984573506
+ },
+ "prevControl": null,
+ "nextControl": {
+ "x": 7.613160638537474,
+ "y": 7.456089060354733
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 7.667485172004747,
+ "y": 6.428920521945433
+ },
+ "prevControl": {
+ "x": 7.545273564909296,
+ "y": 6.647012986490055
+ },
+ "nextControl": {
+ "x": 8.2418218927067,
+ "y": 5.403989143712815
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 7.667485172004747,
+ "y": 4.6644128113879
+ },
+ "prevControl": {
+ "x": 7.975395404605428,
+ "y": 5.131586957402723
+ },
+ "nextControl": {
+ "x": 7.35546856465006,
+ "y": 4.191008303677343
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 6.236512455516015,
+ "y": 5.084021352313167
+ },
+ "prevControl": {
+ "x": 6.5799561936021105,
+ "y": 4.75215445445843
+ },
+ "nextControl": {
+ "x": 5.65645110998725,
+ "y": 5.644529924630823
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 6.236512455516015,
+ "y": 7.268137603795967
+ },
+ "prevControl": {
+ "x": 6.709845339124411,
+ "y": 6.5665940697865075
+ },
+ "nextControl": {
+ "x": 5.8207588839551905,
+ "y": 7.884340787581406
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 0.6013318584144021,
+ "y": 7.134601236249081
+ },
+ "prevControl": {
+ "x": 3.5546210957312354,
+ "y": 7.467259667375804
+ },
+ "nextControl": {
+ "x": 0.35290289496152694,
+ "y": 7.106618203573367
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 0.4588256227758012,
+ "y": 5.084021352313167
+ },
+ "prevControl": {
+ "x": 0.5558396548739409,
+ "y": 5.465118366137181
+ },
+ "nextControl": null,
+ "isLocked": false,
+ "linkedName": null
+ }
+ ],
+ "rotationTargets": [
+ {
+ "waypointRelativePos": 1.087033747779748,
+ "rotationDegrees": -90.0
+ },
+ {
+ "waypointRelativePos": 2.5364120781527437,
+ "rotationDegrees": 155.02674741986806
+ },
+ {
+ "waypointRelativePos": 3.85,
+ "rotationDegrees": 138.60721817200425
+ },
+ {
+ "waypointRelativePos": 4.4,
+ "rotationDegrees": 180.0
+ },
+ {
+ "waypointRelativePos": 4.660237388724038,
+ "rotationDegrees": 180.0
+ },
+ {
+ "waypointRelativePos": 4.95,
+ "rotationDegrees": -89.50334218867351
+ }
+ ],
+ "constraintZones": [
+ {
+ "name": "Depot",
+ "minWaypointRelativePos": 4.953880764904385,
+ "maxWaypointRelativePos": 6.0,
+ "constraints": {
+ "maxVelocity": 1.0,
+ "maxAcceleration": 2.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ },
+ {
+ "name": "Constraints Zone",
+ "minWaypointRelativePos": 0.9718785151856066,
+ "maxWaypointRelativePos": 2.4701912260967447,
+ "constraints": {
+ "maxVelocity": 0.3,
+ "maxAcceleration": 2.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ },
+ {
+ "name": "Constraints Zone",
+ "minWaypointRelativePos": 2.767154105736777,
+ "maxWaypointRelativePos": 4.467941507311604,
+ "constraints": {
+ "maxVelocity": 2.0,
+ "maxAcceleration": 1.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ }
+ ],
+ "pointTowardsZones": [],
+ "eventMarkers": [
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 0,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Extend Intake",
+ "waypointRelativePos": 0.0944881889763795,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Extend Intake"
+ }
+ }
+ },
+ {
+ "name": "Spin Intake Rollers",
+ "waypointRelativePos": 0.17547806524185328,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Spin Intake Rollers"
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 0.3104611923509808,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 0.39145106861638246,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Spindexer",
+ "waypointRelativePos": 2.9156355455568033,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 3.3745781777277815,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 4.724409448818935,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 4.764904386951711,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ }
+ ],
+ "globalConstraints": {
+ "maxVelocity": 1.5,
+ "maxAcceleration": 1.5,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 150.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ },
+ "goalEndState": {
+ "velocity": 0,
+ "rotation": -90.37860096211433
+ },
+ "reversed": false,
+ "folder": "week 2 autos",
+ "idealStartingState": {
+ "velocity": 0,
+ "rotation": -0.4275725068334245
+ },
+ "useDefaultConstraints": false
+}
\ No newline at end of file
--- /dev/null
+{
+ "version": "2025.0",
+ "waypoints": [
+ {
+ "anchor": {
+ "x": 4.0,
+ "y": 7.623190984573506
+ },
+ "prevControl": null,
+ "nextControl": {
+ "x": 7.193921116983211,
+ "y": 7.623190984573506
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 7.667485172004747,
+ "y": 6.428920521945433
+ },
+ "prevControl": {
+ "x": 7.665365003292386,
+ "y": 6.686760835840097
+ },
+ "nextControl": {
+ "x": 7.684288184321054,
+ "y": 4.385453912541243
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 7.667485172004747,
+ "y": 4.6644128113879
+ },
+ "prevControl": {
+ "x": 7.722519349903317,
+ "y": 4.908280068851933
+ },
+ "nextControl": {
+ "x": 7.611361211994106,
+ "y": 4.415716515223697
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 6.236512455516015,
+ "y": 5.084021352313167
+ },
+ "prevControl": {
+ "x": 7.118832485314941,
+ "y": 4.554066742084302
+ },
+ "nextControl": {
+ "x": 5.563661514586408,
+ "y": 5.488160945770811
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 6.236512455516015,
+ "y": 7.031435349940688
+ },
+ "prevControl": {
+ "x": 6.607692290036552,
+ "y": 6.097932084737065
+ },
+ "nextControl": {
+ "x": 5.905339551755663,
+ "y": 7.864322695252948
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 2.6967378410438916,
+ "y": 7.031435349940688
+ },
+ "prevControl": {
+ "x": 3.336191665489592,
+ "y": 7.488201938773801
+ },
+ "nextControl": {
+ "x": 2.4696060632890897,
+ "y": 6.869193443841226
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 1.8682799525504161,
+ "y": 5.084
+ },
+ "prevControl": {
+ "x": 1.8804205947396213,
+ "y": 5.5984071344829935
+ },
+ "nextControl": null,
+ "isLocked": false,
+ "linkedName": null
+ }
+ ],
+ "rotationTargets": [
+ {
+ "waypointRelativePos": 1.087033747779748,
+ "rotationDegrees": -90.0
+ },
+ {
+ "waypointRelativePos": 2.5364120781527437,
+ "rotationDegrees": 155.02674741986806
+ },
+ {
+ "waypointRelativePos": 3.85,
+ "rotationDegrees": 138.60721817200425
+ },
+ {
+ "waypointRelativePos": 4.4,
+ "rotationDegrees": 180.0
+ },
+ {
+ "waypointRelativePos": 4.660237388724038,
+ "rotationDegrees": 180.0
+ },
+ {
+ "waypointRelativePos": 4.95,
+ "rotationDegrees": -89.50334218867351
+ }
+ ],
+ "constraintZones": [
+ {
+ "name": "Depot",
+ "minWaypointRelativePos": 4.953880764904385,
+ "maxWaypointRelativePos": 6.0,
+ "constraints": {
+ "maxVelocity": 0.5,
+ "maxAcceleration": 2.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ },
+ {
+ "name": "Constraints Zone",
+ "minWaypointRelativePos": 0.9718785151856066,
+ "maxWaypointRelativePos": 2.4701912260967447,
+ "constraints": {
+ "maxVelocity": 0.3,
+ "maxAcceleration": 2.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ },
+ {
+ "name": "Constraints Zone",
+ "minWaypointRelativePos": 2.767154105736777,
+ "maxWaypointRelativePos": 4.467941507311604,
+ "constraints": {
+ "maxVelocity": 2.0,
+ "maxAcceleration": 1.0,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
+ }
+ ],
+ "pointTowardsZones": [],
+ "eventMarkers": [
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 0,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Extend Intake",
+ "waypointRelativePos": 0.0944881889763795,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Extend Intake"
+ }
+ }
+ },
+ {
+ "name": "Spin Intake Rollers",
+ "waypointRelativePos": 0.17547806524185328,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Spin Intake Rollers"
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 0.3104611923509808,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 0.39145106861638246,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Spindexer",
+ "waypointRelativePos": 2.9156355455568033,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 3.3745781777277815,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 4.724409448818935,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 4.764904386951711,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ }
+ ],
+ "globalConstraints": {
+ "maxVelocity": 1.5,
+ "maxAcceleration": 1.5,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 150.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ },
+ "goalEndState": {
+ "velocity": 0,
+ "rotation": -90.37860096211433
+ },
+ "reversed": false,
+ "folder": "week 2 autos",
+ "idealStartingState": {
+ "velocity": 0,
+ "rotation": 0.0
+ },
+ "useDefaultConstraints": false
+}
\ No newline at end of file
--- /dev/null
+{
+ "version": "2025.0",
+ "waypoints": [
+ {
+ "anchor": {
+ "x": 3.5,
+ "y": 7.623
+ },
+ "prevControl": null,
+ "nextControl": {
+ "x": 3.75,
+ "y": 7.623
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 4.0,
+ "y": 7.623
+ },
+ "prevControl": {
+ "x": 3.7421509693935855,
+ "y": 7.623
+ },
+ "nextControl": null,
+ "isLocked": false,
+ "linkedName": null
+ }
+ ],
+ "rotationTargets": [],
+ "constraintZones": [],
+ "pointTowardsZones": [],
+ "eventMarkers": [
+ {
+ "name": "Extend Intake",
+ "waypointRelativePos": 0.0944881889763795,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Extend Intake"
+ }
+ }
+ },
+ {
+ "name": "Spin Intake Rollers",
+ "waypointRelativePos": 0.17547806524185328,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Spin Intake Rollers"
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 0.3104611923509808,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 0.40494938132733566,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Spindexer",
+ "waypointRelativePos": 1.0,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Spindexer"
+ }
+ }
+ },
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 1.0,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ }
+ ],
+ "globalConstraints": {
+ "maxVelocity": 2.0,
+ "maxAcceleration": 0.5,
+ "maxAngularVelocity": 200.0,
+ "maxAngularAcceleration": 300.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ },
+ "goalEndState": {
+ "velocity": 0,
+ "rotation": 0.0
+ },
+ "reversed": false,
+ "folder": "week 2 autos",
+ "idealStartingState": {
+ "velocity": 0,
+ "rotation": -0.0
+ },
+ "useDefaultConstraints": false
+}
\ No newline at end of file
PathGroupLoader.loadPathGroups();
// Load the auto command
try {
- String leftSideAuto = "Left Week 2";
+ String leftSideAuto = "Left Week 2 slower";
// String rightSideAuto = "Right(2) - Under Trench";
// String testing = "Straight Test";
PathPlannerAuto.getPathGroupFromAutoFile(leftSideAuto);
// CALIBRATION: Low current while finding hardstop to prevent damage
// NORMAL: Moderate current for PID-controlled movement
// CLIMB: High current for full-power climbing
- public final static double CALIBRATION_CURRENT = 7.0;
+ public final static double CALIBRATION_CURRENT = 20.0;
public final static double CLIMB_CURRENT = 42.0;
- public final static double CALIBRATION_CURRENT_THRESHOLD = 6.0;
+ public final static double CALIBRATION_CURRENT_THRESHOLD = 18.0;
// PID Constants
// TODO: what are the units? Inches? Meters?
updateInputs();
TalonFXConfiguration config = new TalonFXConfiguration();
- config.Slot0.kP = 0.15; //tune p value
+ config.Slot0.kP = 1.0; //tune p value
config.Slot0.kI = 0;
config.Slot0.kD = 0.0;
config.Slot0.kV = 0.125; //Maximum rps = 100 --> 12V/100rps
public void updateInputs(){
inputs.shooterSpeedLeft = Units.rotationsToRadians(shooterMotorLeft.getVelocity().getValueAsDouble()) * ShooterConstants.SHOOTER_LAUNCH_DIAMETER/2;
inputs.shooterSpeedRight = Units.rotationsToRadians(shooterMotorRight.getVelocity().getValueAsDouble())* ShooterConstants.SHOOTER_LAUNCH_DIAMETER/2;
+ inputs.shooterCurrentLeft = shooterMotorLeft.getStatorCurrent().getValueAsDouble();
+ inputs.shooterCurrentRight = shooterMotorRight.getStatorCurrent().getValueAsDouble();
+
+
Logger.processInputs("Shooter", inputs);
}
public static class ShooterIOInputs {
public double shooterSpeedLeft = 0.0;
public double shooterSpeedRight = 0.0;
+ public double shooterCurrentLeft = 0.0;
+ public double shooterCurrentRight = 0.0;
}
public void updateInputs();