Skip to content

Commit

Permalink
Finished all auto-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
cuttestkittensrule committed Mar 15, 2024
1 parent 5230437 commit 6b99c52
Show file tree
Hide file tree
Showing 23 changed files with 244 additions and 138 deletions.
2 changes: 1 addition & 1 deletion Robot2024/.pathplanner/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"B3 Stuff"
],
"autoFolders": [],
"defaultMaxVel": 1.0,
"defaultMaxVel": 3.0,
"defaultMaxAccel": 3.0,
"defaultMaxAngVel": 540.0,
"defaultMaxAngAccel": 720.0,
Expand Down
25 changes: 25 additions & 0 deletions Robot2024/src/main/deploy/pathplanner/autos/Command Test.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.3464015540130732,
"y": 5.52155524239874
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "shoot-side"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"version": 1.0,
"startingPose": null,
"startingPose": {
"position": {
"x": 2.0,
"y": 7.0
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"version": 1.0,
"startingPose": null,
"startingPose": {
"position": {
"x": 1.34,
"y": 5.52155524239874
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
Expand Down
48 changes: 33 additions & 15 deletions Robot2024/src/main/deploy/pathplanner/paths/B1 Score Intake.path
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"prevControl": null,
"nextControl": {
"x": 2.3883881694216544,
"y": 7.177047995851627
"x": 2.3104826280826942,
"y": 7.595790280548532
},
"isLocked": false,
"linkedName": null
Expand All @@ -20,12 +20,12 @@
"y": 6.7972584818242
},
"prevControl": {
"x": 2.6513193714406413,
"y": 7.001760527838968
"x": 2.5149846740974624,
"y": 7.6055284732159025
},
"nextControl": {
"x": 3.5277461266883083,
"y": 6.367106670590658
"x": 3.2710988604838738,
"y": 6.146052252981667
},
"isLocked": false,
"linkedName": null
Expand All @@ -44,37 +44,55 @@
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"rotationTargets": [
{
"waypointRelativePos": 0.45,
"rotationDegrees": -42.51088582857621,
"rotateFast": true
}
],
"constraintZones": [
{
"name": "New Constraints Zone",
"minWaypointRelativePos": 0.25,
"maxWaypointRelativePos": 1.4,
"constraints": {
"maxVelocity": 1.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
}
}
],
"eventMarkers": [
{
"name": "start intake",
"waypointRelativePos": 0.15,
"name": "stop intake",
"waypointRelativePos": 1.35,
"command": {
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "start-intake"
"name": "stop-intake"
}
}
]
}
}
},
{
"name": "New Event Marker",
"waypointRelativePos": 1.5,
"name": "start intake",
"waypointRelativePos": 0.15,
"command": {
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "stop-intake"
"name": "start-intake"
}
}
]
Expand All @@ -83,7 +101,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
2 changes: 1 addition & 1 deletion Robot2024/src/main/deploy/pathplanner/paths/B1-Leave.path
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
2 changes: 1 addition & 1 deletion Robot2024/src/main/deploy/pathplanner/paths/B3-Leave.path
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0.0,
"rotation": 180.0,
"rotateFast": false
"rotateFast": true
},
"reversed": false,
"folder": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
],
"globalConstraints": {
"maxVelocity": 1.0,
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
Expand Down
6 changes: 3 additions & 3 deletions Robot2024/src/main/java/com/team2813/AutoCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Command stopIntake() {

private Command createShootFront() {
// TODO: get correct angle and speed
return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.SUBWOOFER_FRONT, 26.5);
return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.SUBWOOFER_FRONT, 75);
}

public Command shootFront() {
Expand All @@ -95,7 +95,7 @@ public Command shootFront() {

private Command createShootSide() {
// TODO: get correct angle and speed
return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.SUBWOOFER_SIDE, 25);
return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.SUBWOOFER_SIDE, 80);
}

public Command shootSide() {
Expand Down Expand Up @@ -131,7 +131,7 @@ public Command shootAuto() {

private Command createShootAmp() {
return new SequentialCommandGroup(
new InstantCommand(() -> shooter.run(10), shooter),
new InstantCommand(() -> shooter.run(22.5), shooter),
new WaitCommand(0.2),
new InstantCommand(magazine::runMagKicker, magazine),
new WaitCommand(1),
Expand Down
4 changes: 2 additions & 2 deletions Robot2024/src/main/java/com/team2813/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public static class OperatorConstants {
// public static final Trigger spoolAutoAimButton = operatorController.options();
public static final Trigger spoolPodiumButton = operatorController.cross(); // actually maps to circle
public static final Trigger climbButton = operatorController.share();
public static final Trigger climbManualUpButton = operatorController.povUp();
public static final Trigger climbDownUpButton = operatorController.povDown();
public static final Trigger climbUpButton = operatorController.povUp();
public static final Trigger climbDownButton = operatorController.povDown();
public static final Trigger altOuttakeButton = new Trigger(() -> operatorXboxController.getLeftTriggerAxis() >= 0.5).and(() -> false);

}
Expand Down
Loading

0 comments on commit 6b99c52

Please sign in to comment.