Skip to content

Commit

Permalink
autos
Browse files Browse the repository at this point in the history
  • Loading branch information
PatribotsProgramming committed Oct 24, 2024
1 parent d72945c commit 5c9133a
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 21 deletions.
139 changes: 139 additions & 0 deletions src/main/deploy/pathplanner/autos/S W2 S C3-5 S DEF.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.36,
"y": 5.572415049000463
},
"rotation": -179.42706130231647
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "deadline",
"data": {
"commands": [
{
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "P CA2"
}
},
{
"type": "named",
"data": {
"name": "ShootInstantlyWhenReady2"
}
},
{
"type": "path",
"data": {
"pathName": "CA2 W2"
}
},
{
"type": "named",
"data": {
"name": "ShootInstantlyWhenReady"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "PrepareSWD"
}
}
]
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "W2 C3"
}
},
{
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "StopAll"
}
},
{
"type": "wait",
"data": {
"waitTime": 1.0
}
},
{
"type": "named",
"data": {
"name": "ToIndexer"
}
}
]
}
}
]
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "C3 M"
}
},
{
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "StopIntake"
}
},
{
"type": "named",
"data": {
"name": "ToIndexer"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "PrepareSWD"
}
}
]
}
}
]
}
},
"folder": "Normal",
"choreoAuto": false
}
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/CA2 W2.path
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
}
],
"globalConstraints": {
"maxVelocity": 5.0,
"maxVelocity": 2.54,
"maxAcceleration": 3.5,
"maxAngularVelocity": 1137.21,
"maxAngularAcceleration": 1492.9
},
"goalEndState": {
"velocity": 2.54,
"velocity": 0.0,
"rotation": -179.2747757009407,
"rotateFast": false
},
Expand All @@ -66,5 +66,5 @@
"rotation": 180.0,
"velocity": 0
},
"useDefaultConstraints": true
"useDefaultConstraints": false
}
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/P CA2.path
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 5.0,
"maxVelocity": 2.54,
"maxAcceleration": 3.5,
"maxAngularVelocity": 1137.21,
"maxAngularAcceleration": 1492.9
},
"goalEndState": {
"velocity": 2.54,
"velocity": 0.0,
"rotation": -179.29528514946807,
"rotateFast": false
},
Expand All @@ -48,5 +48,5 @@
"rotation": 180.0,
"velocity": 0
},
"useDefaultConstraints": true
"useDefaultConstraints": false
}
16 changes: 8 additions & 8 deletions src/main/deploy/pathplanner/paths/S W2.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 1.3793978662827602,
"y": 5.631181847982673
"x": 1.3642439036290506,
"y": 5.572415049000463
},
"prevControl": null,
"nextControl": {
"x": 1.8146745263093393,
"y": 5.612789876434728
"x": 1.7995205636556297,
"y": 5.554023077452517
},
"isLocked": false,
"linkedName": null
Expand All @@ -20,8 +20,8 @@
"y": 5.572415049000463
},
"prevControl": {
"x": 2.438669900029892,
"y": 5.579020672674274
"x": 2.2454678129695247,
"y": 5.570262711146891
},
"nextControl": null,
"isLocked": false,
Expand Down Expand Up @@ -57,13 +57,13 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 179.31337875990656,
"rotation": -179.21039048519975,
"rotateFast": false
},
"reversed": false,
"folder": "Preloads",
"previewStartingState": {
"rotation": -179.1656544244532,
"rotation": -178.888482285124,
"velocity": 0
},
"useDefaultConstraints": true
Expand Down
10 changes: 5 additions & 5 deletions src/main/deploy/pathplanner/paths/W2 C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"prevControl": null,
"nextControl": {
"x": 5.202725850291558,
"y": 4.411401278318571
"x": 7.198276073971502,
"y": 2.4991028046572223
},
"isLocked": false,
"linkedName": "W2"
Expand All @@ -20,8 +20,8 @@
"y": 4.095455268178173
},
"prevControl": {
"x": 5.718850061662163,
"y": 3.729727791602677
"x": 7.887059903152064,
"y": 6.04003375748687
},
"nextControl": null,
"isLocked": false,
Expand All @@ -39,7 +39,7 @@
},
"goalEndState": {
"velocity": 0.0,
"rotation": -169.4937204001024,
"rotation": 111.44077429233252,
"rotateFast": false
},
"reversed": false,
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ public static final class AutoConstants {
"S W2 S C1-2 S W1 S C3-5 S", // UNTESTED
"S C1-5 S Over W1 DEF",
"S W1 S C1-5 S DEF",
"S W3-1 S C1-5 S DEF"
"S W3-1 S C1-5 S DEF",
"S W2 S C3-5 S DEF"
};
}

Expand Down Expand Up @@ -570,7 +571,7 @@ private enum SwerveGearing {

// Calculations required for driving motor conversion factors and feed forward
public static final double DRIVING_MOTOR_FREE_SPEED_RPS = NeoMotorConstants.VORTEX_FREE_SPEED_RPM / 60;
public static final double WHEEL_DIAMETER_METERS = Units.inchesToMeters(1.504919579940926*2.0);
public static final double WHEEL_DIAMETER_METERS = Units.inchesToMeters(1.4629649170172998*2.0);
public static final double WHEEL_CIRCUMFERENCE_METERS = WHEEL_DIAMETER_METERS * Math.PI;
// 45 teeth on the wheel's bevel gear, 15 teeth on the bevel pinion
public static final double DRIVING_MOTOR_REDUCTION = (45.0 * CURRENT_GEARING.spurTeeth) / (CURRENT_GEARING.pinionTeeth * 15.0);
Expand Down

0 comments on commit 5c9133a

Please sign in to comment.