"pathName": "#2(2) Right - Under the trench"
}
},
+ {
+ "type": "parallel",
+ "data": {
+ "commands": [
+ {
+ "type": "wait",
+ "data": {
+ "waitTime": 10.0
+ }
+ },
+ {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
+ ]
+ }
+ },
{
"type": "path",
"data": {
"pathName": "#3 Right - Under the trench"
}
+ },
+ {
+ "type": "parallel",
+ "data": {
+ "commands": [
+ {
+ "type": "wait",
+ "data": {
+ "waitTime": 10.0
+ }
+ },
+ {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ },
+ {
+ "type": "named",
+ "data": {
+ "name": "Start Intake Seizure"
+ }
+ }
+ ]
+ }
}
]
}
"constraintZones": [
{
"name": "Constraints Zone",
- "minWaypointRelativePos": 1.95,
+ "minWaypointRelativePos": 1.5658042744656906,
"maxWaypointRelativePos": 2.759480519480524,
"constraints": {
- "maxVelocity": 3.0,
+ "maxVelocity": 2.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
}
- },
- {
- "name": "Constraints Zone",
- "minWaypointRelativePos": 0,
- "maxWaypointRelativePos": 2.0652418447694045,
- "constraints": {
- "maxVelocity": 6.0,
- "maxAcceleration": 7.0,
- "maxAngularVelocity": 540.0,
- "maxAngularAcceleration": 720.0,
- "nominalVoltage": 12.0,
- "unlimited": false
- }
}
],
"pointTowardsZones": [],
"prevControl": null,
"nextControl": {
"x": 6.580806642941875,
- "y": 0.823380782918149
+ "y": 0.6081969157769855
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
- "x": 7.301672597864768,
- "y": 0.823380782918149
+ "x": 7.473819691577701,
+ "y": 0.7050296559905087
},
"prevControl": {
- "x": 6.72798848994848,
- "y": 0.776996631189148
+ "x": 6.900135583661412,
+ "y": 0.6586455042615077
},
"nextControl": {
- "x": 7.911232317280483,
- "y": 0.8726655898756941
+ "x": 8.083379410993413,
+ "y": 0.7543144629480538
},
"isLocked": false,
"linkedName": null
"minWaypointRelativePos": 1.55,
"maxWaypointRelativePos": 2.6989130434782616,
"constraints": {
- "maxVelocity": 3.0,
+ "maxVelocity": 2.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"y": 0.5865314569536417
},
"prevControl": {
- "x": 6.035164509263001,
- "y": 0.617600951415989
+ "x": 6.83902728351127,
+ "y": 0.5974377224199281
},
"nextControl": {
- "x": 3.0682440376782023,
- "y": 0.24599719472861176
+ "x": 3.157328753736785,
+ "y": 0.5592661840649349
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
- "x": 0.6398096026490065,
+ "x": 0.62,
"y": 0.65
},
"prevControl": {
- "x": 1.0581491579606932,
+ "x": 1.0383395553116865,
"y": 0.7153598580391806
},
"nextControl": null,
"nominalVoltage": 12.0,
"unlimited": false
}
+ },
+ {
+ "name": "Constraints Zone",
+ "minWaypointRelativePos": 1.4128233970753654,
+ "maxWaypointRelativePos": 2.0,
+ "constraints": {
+ "maxVelocity": 1.5,
+ "maxAcceleration": 3.0,
+ "maxAngularVelocity": 540.0,
+ "maxAngularAcceleration": 720.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ }
}
],
"pointTowardsZones": [],
]
}
}
+ },
+ {
+ "name": "Extend Intake",
+ "waypointRelativePos": 1.2508436445444353,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "parallel",
+ "data": {
+ "commands": [
+ {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ },
+ {
+ "type": "named",
+ "data": {
+ "name": "Extend Intake"
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "name": "Start Spindexer",
+ "waypointRelativePos": 1.277840269966252,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Start Spindexer"
+ }
+ }
}
],
"globalConstraints": {
"waypoints": [
{
"anchor": {
- "x": 0.64,
+ "x": 0.62,
"y": 0.65
},
"prevControl": null,
"nextControl": {
- "x": 1.5400413907284771,
+ "x": 1.520041390728477,
"y": 1.4359437086129003
},
"isLocked": false,
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
- "eventMarkers": [],
+ "eventMarkers": [
+ {
+ "name": "Stop Spindexer",
+ "waypointRelativePos": 0,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Spindexer"
+ }
+ }
+ }
+ ],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
--- /dev/null
+{
+ "version": "2025.0",
+ "waypoints": [
+ {
+ "anchor": {
+ "x": 7.842,
+ "y": 4.478
+ },
+ "prevControl": null,
+ "nextControl": {
+ "x": 8.592775800711744,
+ "y": 7.429525504151838
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 5.730830367740831,
+ "y": 8.67
+ },
+ "prevControl": {
+ "x": 7.0789534313387525,
+ "y": 8.67
+ },
+ "nextControl": {
+ "x": 3.9343350188895077,
+ "y": 8.67
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 2.5353499406880196,
+ "y": 7.526358244365362
+ },
+ "prevControl": {
+ "x": 2.9979952550415194,
+ "y": 8.591518386714121
+ },
+ "nextControl": {
+ "x": 2.3695164161432727,
+ "y": 7.1445554785530385
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 2.18,
+ "y": 5.966
+ },
+ "prevControl": {
+ "x": 2.224810422787547,
+ "y": 6.241444208960923
+ },
+ "nextControl": null,
+ "isLocked": false,
+ "linkedName": null
+ }
+ ],
+ "rotationTargets": [
+ {
+ "waypointRelativePos": 0.21847246891652505,
+ "rotationDegrees": 40.0
+ },
+ {
+ "waypointRelativePos": 0.4476021314387213,
+ "rotationDegrees": 150.0
+ },
+ {
+ "waypointRelativePos": 0.927175843694493,
+ "rotationDegrees": -179.587
+ },
+ {
+ "waypointRelativePos": 1.4422735346358764,
+ "rotationDegrees": 180.0
+ }
+ ],
+ "constraintZones": [],
+ "pointTowardsZones": [],
+ "eventMarkers": [
+ {
+ "name": "Retract Intake",
+ "waypointRelativePos": 0.65466816647919,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "parallel",
+ "data": {
+ "commands": [
+ {
+ "type": "named",
+ "data": {
+ "name": "Retract Intake"
+ }
+ },
+ {
+ "type": "named",
+ "data": {
+ "name": "Stop Intake Rollers"
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "name": "Hood Down",
+ "waypointRelativePos": 0.9111361079864995,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Hood Down"
+ }
+ }
+ },
+ {
+ "name": "Stop Hood Down",
+ "waypointRelativePos": 1.7885264341957245,
+ "endWaypointRelativePos": null,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Stop Hood Down"
+ }
+ }
+ }
+ ],
+ "globalConstraints": {
+ "maxVelocity": 3.0,
+ "maxAcceleration": 3.0,
+ "maxAngularVelocity": 540.0,
+ "maxAngularAcceleration": 720.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ },
+ "goalEndState": {
+ "velocity": 0,
+ "rotation": 180.0
+ },
+ "reversed": false,
+ "folder": "Left Autos",
+ "idealStartingState": {
+ "velocity": 0.0,
+ "rotation": -110.0
+ },
+ "useDefaultConstraints": true
+}
\ No newline at end of file
// Load the auto command
try {
String leftSideAuto = "Left(No SOTM) - Under Trench";
- PathPlannerAuto.getPathGroupFromAutoFile(leftSideAuto);
- auto = new PathPlannerAuto(leftSideAuto);
+ String rightSideAuto = "Right(2) - Under Trench";
+ PathPlannerAuto.getPathGroupFromAutoFile(rightSideAuto);
+ auto = new PathPlannerAuto(rightSideAuto);
} catch (IOException | ParseException e) {
e.printStackTrace();
}
public static final double RED_BORDER = FIELD_LENGTH/2 + Units.inchesToMeters(167.0);
public static final double BLUE_BORDER = FIELD_LENGTH/2 - Units.inchesToMeters(167.0);
- public static final double LEFT_SIDE_TARGET = FIELD_WIDTH * 0.10;
- public static final double RIGHT_SIDE_TARGET = FIELD_WIDTH * 0.90;
+ public static final double LEFT_SIDE_TARGET = FIELD_WIDTH * 0.12;
+ public static final double RIGHT_SIDE_TARGET = FIELD_WIDTH * 0.88;
/**The coordinate of the climb position */
public static final Pose2d BLUE_CLIMB_LOCATION = new Pose2d(1.5, FIELD_WIDTH/2 - 2.0, new Rotation2d()); // TODO: find this
new Translation3d(FIELD_LENGTH/2, RIGHT_SIDE_TARGET, 0);
public static final Translation3d ALLIANCE_LEFT_BLUE =
- new Translation3d(BLUE_BORDER - 2, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
+ new Translation3d(BLUE_BORDER - 2.2, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
public static final Translation3d ALLIANCE_RIGHT_BLUE =
- new Translation3d(BLUE_BORDER - 2, RIGHT_SIDE_TARGET, 0);
+ new Translation3d(BLUE_BORDER - 2.2, RIGHT_SIDE_TARGET, 0);
public static final Translation3d ALLIANCE_LEFT_RED =
- new Translation3d(RED_BORDER + 2, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
+ new Translation3d(RED_BORDER + 2.2, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
public static final Translation3d ALLIANCE_RIGHT_RED =
- new Translation3d(RED_BORDER + 2, RIGHT_SIDE_TARGET, 0);
+ new Translation3d(RED_BORDER + 2.2, RIGHT_SIDE_TARGET, 0);
public static final Translation3d ALLIANCE_CENTER_BLUE =
new Translation3d(BLUE_BORDER - 2, FIELD_WIDTH/2, 0);
public class SpindexerConstants {
public static final double spindexerVelocityWithBall = 6.0; // rps (for counting balls)
public static final double currentLimit = 40; //A
- public static final double spindexerMaxPower = 0.5;
+ public static final double spindexerMaxPower = 0.75;
public static final double spindexerReversePower = -0.2;
public static final double CURRENT_SPIKE_LIMIT = 80;
public static final double CURRENT_TIME_LIMIT = 1.0; //s