center 4 piece, intake reverse, hood software limits

This commit is contained in:
Tyler-J42 2024-03-23 02:48:21 -04:00
parent b22a3c2348
commit 16909c356f
17 changed files with 243 additions and 232 deletions

View File

@ -0,0 +1,118 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.3216735004898588,
"y": 5.55593454044051
},
"rotation": 180.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Speaker Note Shot"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Center Sub to Note 1"
}
},
{
"type": "named",
"data": {
"name": "Auto Intake"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "Note 1 to Center Sub"
}
},
{
"type": "named",
"data": {
"name": "Speaker Note Shot"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Center Sub to Note 2"
}
},
{
"type": "named",
"data": {
"name": "Auto Intake"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "Note 2 to Center Sub"
}
},
{
"type": "named",
"data": {
"name": "Speaker Note Shot"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Left Sub to Note 3"
}
},
{
"type": "named",
"data": {
"name": "Auto Intake"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "Left Note 3 to Sub"
}
},
{
"type": "named",
"data": {
"name": "Speaker Note Shot"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.7046435911053639,
"y": 4.3751818412727745
},
"rotation": 120.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "From Subwoofer Far Edge to Amp"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.29,
"y": 5.58
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "From Subwoofer Front to Amp"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}

View File

@ -1,25 +0,0 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.4585613729632017,
"y": 7.0398809743488435
},
"rotation": 180.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "He He He Haw"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}

View File

@ -2,8 +2,8 @@
"version": 1.0, "version": 1.0,
"startingPose": { "startingPose": {
"position": { "position": {
"x": 0.4936438362905214, "x": 0.5740411480822968,
"y": 6.981410202136645 "y": 7.021880329474945
}, },
"rotation": 180.0 "rotation": 180.0
}, },

View File

@ -3,25 +3,25 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 0.7046435911053639, "x": 1.3216735004898588,
"y": 4.3751818412727745 "y": 5.55593454044051
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 2.4368920788482864, "x": 1.8054356108712222,
"y": 3.1622483921028106 "y": 6.010377735041184
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 1.82409310273166, "x": 2.421132842265685,
"y": 7.565612949407717 "y": 6.728691171668058
}, },
"prevControl": { "prevControl": {
"x": 1.8176568333482528, "x": 2.1572626002394863,
"y": 6.336387277909188 "y": 6.3328858086287605
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -39,13 +39,13 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 89.21368742867472, "rotation": -151.8214098900407,
"rotateFast": false "rotateFast": false
}, },
"reversed": false, "reversed": false,
"folder": null, "folder": null,
"previewStartingState": { "previewStartingState": {
"rotation": 122.73522627210761, "rotation": 180.0,
"velocity": 0 "velocity": 0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true

View File

@ -3,25 +3,25 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 1.2945574370576298, "x": 1.3216735004898588,
"y": 5.580559282764361 "y": 5.541275082550166
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 2.2786077412442953, "x": 2.3216735004898608,
"y": 5.580559282764361 "y": 5.541275082550166
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 1.8232420006879377, "x": 2.289197721252586,
"y": 7.533755031731888 "y": 5.541275082550166
}, },
"prevControl": { "prevControl": {
"x": 1.8232420006879377, "x": 1.2891977212525858,
"y": 6.694612522270728 "y": 5.541275082550166
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -39,13 +39,13 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 90.0, "rotation": 180.0,
"rotateFast": false "rotateFast": false
}, },
"reversed": false, "reversed": false,
"folder": null, "folder": null,
"previewStartingState": { "previewStartingState": {
"rotation": 0, "rotation": 180.0,
"velocity": 0 "velocity": 0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true

View File

@ -3,25 +3,25 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 0.4585613729632017, "x": 0.66,
"y": 4.0695657459691 "y": 4.38
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 0.7743035429090797, "x": 0.8945513262455097,
"y": 3.9643183559871398 "y": 3.688073587575746
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 0.9029392417759192, "x": 0.9539344375942316,
"y": 4.408696224799858 "y": 4.503791885637482
}, },
"prevControl": { "prevControl": {
"x": 1.2654580294915574, "x": 1.3164532253098697,
"y": 4.02278912819934 "y": 4.117884789036965
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -39,13 +39,13 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 132.79740183823424, "rotation": 133.4021151464655,
"rotateFast": false "rotateFast": false
}, },
"reversed": false, "reversed": false,
"folder": null, "folder": null,
"previewStartingState": { "previewStartingState": {
"rotation": 180.0, "rotation": 119.88721357012417,
"velocity": 0 "velocity": 0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true

View File

@ -1,74 +0,0 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.4585613729632017,
"y": 7.0398809743488435
},
"prevControl": null,
"nextControl": {
"x": 1.4585613729632003,
"y": 7.0398809743488435
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.7856981070087494,
"y": 5.98740707452925
},
"prevControl": {
"x": 1.7856981070087494,
"y": 5.98740707452925
},
"nextControl": {
"x": 3.7856981070087494,
"y": 5.98740707452925
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.69184528112646,
"y": 7.051575128791284
},
"prevControl": {
"x": 4.238771694067605,
"y": 6.519491101660266
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [
{
"waypointRelativePos": 1.0,
"rotationDegrees": 90.0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 88.210089391754,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 0,
"velocity": 0
},
"useDefaultConstraints": true
}

View File

@ -3,25 +3,25 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 2.353014392638472, "x": 2.230559889691208,
"y": 6.993104356579084 "y": 6.640734424325992
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 1.768306670516475, "x": 1.8200950687615667,
"y": 7.004798511021523 "y": 5.863783156137741
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 1.8384715971711143, "x": 1.3070140425995143,
"y": 7.624588696470841 "y": 5.570593998330854
}, },
"prevControl": { "prevControl": {
"x": 1.7950792079196904, "x": 1.8494139845422553,
"y": 7.315863019194643 "y": 5.629231829892232
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -30,18 +30,7 @@
], ],
"rotationTargets": [], "rotationTargets": [],
"constraintZones": [], "constraintZones": [],
"eventMarkers": [ "eventMarkers": [],
{
"name": "New Event Marker",
"waypointRelativePos": 0,
"command": {
"type": "parallel",
"data": {
"commands": []
}
}
}
],
"globalConstraints": { "globalConstraints": {
"maxVelocity": 4.0, "maxVelocity": 4.0,
"maxAcceleration": 4.0, "maxAcceleration": 4.0,
@ -49,14 +38,14 @@
"maxAngularAcceleration": 720.0 "maxAngularAcceleration": 720.0
}, },
"goalEndState": { "goalEndState": {
"velocity": 0.0, "velocity": 0,
"rotation": 90.0, "rotation": 180.0,
"rotateFast": true "rotateFast": false
}, },
"reversed": false, "reversed": false,
"folder": null, "folder": null,
"previewStartingState": { "previewStartingState": {
"rotation": -178.36342295838335, "rotation": 180.0,
"velocity": 0 "velocity": 0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true

View File

@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 2.503225806451614,
"y": 5.535411299394028
},
"prevControl": null,
"nextControl": {
"x": 2.016531804492181,
"y": 5.541275082550166
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 1.3480605246924788,
"y": 5.535411299394028
},
"prevControl": {
"x": 1.6881599477484674,
"y": 5.55300264886244
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": -178.53119928561404,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 180.0,
"velocity": 0
},
"useDefaultConstraints": true
}

View File

@ -16,12 +16,12 @@
}, },
{ {
"anchor": { "anchor": {
"x": 7.0095431619434665, "x": 7.639899851228273,
"y": 0.8355890997496291 "y": 0.7769512681882514
}, },
"prevControl": { "prevControl": {
"x": 6.0095431619434665, "x": 6.639899851228273,
"y": 0.8355890997496291 "y": 0.7769512681882514
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -39,7 +39,7 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 0, "rotation": 180.0,
"rotateFast": false "rotateFast": false
}, },
"reversed": false, "reversed": false,

View File

@ -233,8 +233,6 @@ public class RobotContainer {
) )
); );
//intake.setDefaultCommand(intake.intakeUpCommand());
//intake.setDefaultCommand(intake.manualPivot(() -> -operator.getLeftY(), operator::getRightY));
intake.setDefaultCommand( intake.setDefaultCommand(
intake.intakeControl( intake.intakeControl(
() -> { () -> {
@ -247,6 +245,8 @@ public class RobotContainer {
() -> { () -> {
if(intakeDown && indexer.getBeamBreak()){ if(intakeDown && indexer.getBeamBreak()){
return 1.0; return 1.0;
}else if(operator.leftBumper().getAsBoolean()){
return -1.0;
}else{ }else{
return 0.0; return 0.0;
} }
@ -290,7 +290,6 @@ public class RobotContainer {
} }
) )
); );
//shooter.setDefaultCommand(shooter.manualPivot(operator::getRightY, operator::getLeftTriggerAxis));
driver.leftBumper().onTrue( driver.leftBumper().onTrue(
shooter.angleSpeedsSetpoints( shooter.angleSpeedsSetpoints(
@ -415,18 +414,13 @@ public class RobotContainer {
driver.a().whileTrue(indexer.shootNote(() -> 1.0)); driver.a().whileTrue(indexer.shootNote(() -> 1.0));
operator.back().toggleOnTrue(shooter.manualPivot( operator.back().toggleOnTrue(shooter.manualPivot(
() -> MathUtil.clamp(-operator.getLeftY(), -0.75, 0.75), () -> MathUtil.clamp(-operator.getLeftY(), -0.5, 0.5),
() -> MathUtil.clamp(operator.getRightTriggerAxis()-operator.getLeftTriggerAxis(), -0.75, 0.75) () -> MathUtil.clamp(driver.getRightTriggerAxis(), -1, 1)
)); ));
driver.povDown().whileTrue(indexer.shootNote(() -> -1.0)); driver.povDown().whileTrue(indexer.shootNote(() -> -1.0));
operator.start().toggleOnTrue(intake.manualPivot(() -> -operator.getRightY()*0.2, () -> driver.getLeftTriggerAxis())); operator.start().toggleOnTrue(intake.manualPivot(() -> -operator.getRightY()*0.2, () -> driver.getLeftTriggerAxis()));
//operator.povDown().whileTrue(intake.intakeDownCommand());
//operator.povUp().whileTrue(intake.intakeUpCommand());
//driver.leftTrigger().whileTrue(Commands.parallel( intake.manualPivot(() -> 0.0, () -> 1.0), indexer.advanceNote()));
} }

View File

@ -29,9 +29,11 @@ public class Climber extends SubsystemBase {
public Command setSpeedWithSupplier(DoubleSupplier speed) { public Command setSpeedWithSupplier(DoubleSupplier speed) {
return run(() -> { return run(() -> {
if(shooterAngle.getAsDouble() <= ShooterConstants.kShooterLoadAngle){
motor1.set(VictorSPXControlMode.PercentOutput, speed.getAsDouble());
motor1.set(VictorSPXControlMode.PercentOutput, speed.getAsDouble());
}
}); });
} }

View File

@ -141,9 +141,14 @@ public class Shooter extends SubsystemBase{
public Command manualPivot(DoubleSupplier pivotPower, DoubleSupplier spinny){ public Command manualPivot(DoubleSupplier pivotPower, DoubleSupplier spinny){
return run(() ->{ return run(() ->{
shooterPivot.set(pivotPower.getAsDouble()); shooterPivot.setIdleMode(IdleMode.kBrake);
if(getShooterAngle() >= ShooterConstants.kShooterLoadAngle || getShooterAngle() <= ShooterConstants.kShooterAmpAngle){
shooterPivot.set(pivotPower.getAsDouble());
}
topShooter.set(spinny.getAsDouble()); topShooter.set(spinny.getAsDouble());
bottomShooter.set(spinny.getAsDouble()); bottomShooter.set(spinny.getAsDouble());
}); });
} }

View File

@ -1,7 +1,7 @@
{ {
"fileName": "PathplannerLib.json", "fileName": "PathplannerLib.json",
"name": "PathplannerLib", "name": "PathplannerLib",
"version": "2024.2.6", "version": "2024.2.7",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
"frcYear": "2024", "frcYear": "2024",
"mavenUrls": [ "mavenUrls": [
@ -12,7 +12,7 @@
{ {
"groupId": "com.pathplanner.lib", "groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java", "artifactId": "PathplannerLib-java",
"version": "2024.2.6" "version": "2024.2.7"
} }
], ],
"jniDependencies": [], "jniDependencies": [],
@ -20,7 +20,7 @@
{ {
"groupId": "com.pathplanner.lib", "groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp", "artifactId": "PathplannerLib-cpp",
"version": "2024.2.6", "version": "2024.2.7",
"libName": "PathplannerLib", "libName": "PathplannerLib",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": false, "sharedLibrary": false,

View File

@ -1,7 +1,7 @@
{ {
"fileName": "REVLib.json", "fileName": "REVLib.json",
"name": "REVLib", "name": "REVLib",
"version": "2024.2.3", "version": "2024.2.4",
"frcYear": "2024", "frcYear": "2024",
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
"mavenUrls": [ "mavenUrls": [
@ -12,14 +12,14 @@
{ {
"groupId": "com.revrobotics.frc", "groupId": "com.revrobotics.frc",
"artifactId": "REVLib-java", "artifactId": "REVLib-java",
"version": "2024.2.3" "version": "2024.2.4"
} }
], ],
"jniDependencies": [ "jniDependencies": [
{ {
"groupId": "com.revrobotics.frc", "groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver", "artifactId": "REVLib-driver",
"version": "2024.2.3", "version": "2024.2.4",
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"isJar": false, "isJar": false,
"validPlatforms": [ "validPlatforms": [
@ -37,7 +37,7 @@
{ {
"groupId": "com.revrobotics.frc", "groupId": "com.revrobotics.frc",
"artifactId": "REVLib-cpp", "artifactId": "REVLib-cpp",
"version": "2024.2.3", "version": "2024.2.4",
"libName": "REVLib", "libName": "REVLib",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": false, "sharedLibrary": false,
@ -55,7 +55,7 @@
{ {
"groupId": "com.revrobotics.frc", "groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver", "artifactId": "REVLib-driver",
"version": "2024.2.3", "version": "2024.2.4",
"libName": "REVLibDriver", "libName": "REVLibDriver",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": false, "sharedLibrary": false,