Skip to content

Commit

Permalink
Tuned Wing Down paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ACat701 committed Oct 29, 2024
1 parent 7d6f513 commit 187b528
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/PsW1W2W3.1.path
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"eventMarkers": [
{
"name": "W1",
"waypointRelativePos": 0.7,
"waypointRelativePos": 0.6,
"command": {
"type": "parallel",
"data": {
Expand Down
36 changes: 26 additions & 10 deletions src/main/deploy/pathplanner/paths/PsW1W2W3.2.path
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,36 @@
},
"prevControl": null,
"nextControl": {
"x": 2.671561759880276,
"y": 6.902042374607271
"x": 2.0801062616615122,
"y": 6.770913244273474
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.54,
"y": 5.56
"x": 2.391152335748853,
"y": 6.321743227809496
},
"prevControl": {
"x": 1.5508167603722594,
"y": 6.073199547997617
"x": 2.2780551404333225,
"y": 6.532338005293589
},
"nextControl": {
"x": 2.5057637817050153,
"y": 6.108328811201469
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.77,
"y": 5.75
},
"prevControl": {
"x": 2.5176287842244145,
"y": 6.181634995624721
},
"nextControl": null,
"isLocked": false,
Expand All @@ -30,16 +46,16 @@
],
"rotationTargets": [
{
"waypointRelativePos": 1.0,
"rotationDegrees": 0.0,
"waypointRelativePos": 1.1,
"rotationDegrees": -56.0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [
{
"name": "W2",
"waypointRelativePos": 0.85,
"waypointRelativePos": 1.4,
"command": {
"type": "parallel",
"data": {
Expand All @@ -63,7 +79,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0,
"rotation": -56.0,
"rotateFast": false
},
"reversed": false,
Expand Down
46 changes: 34 additions & 12 deletions src/main/deploy/pathplanner/paths/PsW1W2W3.3.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,59 @@
"waypoints": [
{
"anchor": {
"x": 2.54,
"y": 5.56
"x": 2.77,
"y": 5.75
},
"prevControl": null,
"nextControl": {
"x": 2.456797671433181,
"y": 5.513776484129545
"x": 2.5042495310643846,
"y": 5.4111158103551364
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.5518150181599504,
"y": 4.198201444835939
"x": 2.3209540765874896,
"y": 4.650634669440361
},
"prevControl": {
"x": 1.7449183616315946,
"y": 4.607496850321336
"x": 2.278461170442448,
"y": 4.942014597292088
},
"nextControl": {
"x": 2.3482533995946864,
"y": 4.46343931167672
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.574447790225748,
"y": 4.287943663773314
},
"prevControl": {
"x": 2.426251465329535,
"y": 4.432240085382781
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"rotationTargets": [
{
"waypointRelativePos": 1.35,
"rotationDegrees": -35.0,
"rotateFast": true
}
],
"constraintZones": [],
"eventMarkers": [
{
"name": "W3",
"waypointRelativePos": 0.8,
"waypointRelativePos": 1.2,
"command": {
"type": "parallel",
"data": {
Expand All @@ -57,13 +79,13 @@
},
"goalEndState": {
"velocity": 0,
"rotation": -25.75999999999999,
"rotation": -35.0,
"rotateFast": false
},
"reversed": false,
"folder": "Wing Down",
"previewStartingState": {
"rotation": 0.0,
"rotation": -56.0,
"velocity": 0
},
"useDefaultConstraints": true
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public ShooterPositionGroup(Measure<Angle> shooterAngle, Measure<Velocity<Angle>
}

public static final ShooterPositionGroup PREP_NONE = new ShooterPositionGroup(NONE_STATE_ANGLE,
Units.RotationsPerSecond.of(10), Units.RotationsPerSecond.of(10), Units.Meters.of(0));
Units.RotationsPerSecond.of(0), Units.RotationsPerSecond.of(0), Units.Meters.of(0));
public static final ShooterPositionGroup PREP_AMP_SHOOTER = new ShooterPositionGroup(Units.Degrees.of(111),
Units.RotationsPerSecond.of(10), Units.RotationsPerSecond.of(10), Units.Meters.of(0));
// Amping w/ amper
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public void disabledInit() {
Shooter.hasZeroed = false;
Elevator.hasZeroed = false;

RobotContainer.checkForManualZeroing().schedule();
if (!hasAutonomousRun) {
RobotContainer.checkForManualZeroing().schedule();
}
m_robotContainer.setDisabledLEDs();
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public RobotContainer() {
.andThen(Commands.deferredProxy(
() -> subStateMachine.tryTargetState(subStateMachine, subIntake, subLEDs, subShooter, subTransfer,
subElevator, subDrivetrain))))
.onTrue(new GamePieceRumble(conDriver, conOperator).asProxy());
.onTrue(new GamePieceRumble(conDriver, conOperator).asProxy())
.onTrue(Commands.runOnce(() -> subTransfer.setGamePieceCollected(true)));

gamePieceCollectedTrigger
.onTrue(Commands
Expand Down

0 comments on commit 187b528

Please sign in to comment.