diff --git a/src/main/deploy/pathplanner/autos/JustClimb1.auto b/src/main/deploy/pathplanner/autos/Blah Blah.auto similarity index 70% rename from src/main/deploy/pathplanner/autos/JustClimb1.auto rename to src/main/deploy/pathplanner/autos/Blah Blah.auto index ab0d5a6..81a12fe 100644 --- a/src/main/deploy/pathplanner/autos/JustClimb1.auto +++ b/src/main/deploy/pathplanner/autos/Blah Blah.auto @@ -5,27 +5,27 @@ "data": { "commands": [ { - "type": "named", + "type": "path", "data": { - "name": "ExtendClimber" + "pathName": "Move Down " } }, { - "type": "path", + "type": "wait", "data": { - "pathName": "JustClimb1" + "waitTime": 1.0 } }, { "type": "named", "data": { - "name": "Climb" + "name": "Shoot" } } ] } }, "resetOdom": true, - "folder": "Only Climb", + "folder": "Olivia's Test Autos ", "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Cal being indecisive smh .auto b/src/main/deploy/pathplanner/autos/Cal being indecisive smh .auto new file mode 100644 index 0000000..06dff9e --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Cal being indecisive smh .auto @@ -0,0 +1,45 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Move Down " + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.0 + } + }, + { + "type": "named", + "data": { + "name": "ReadyUp" + } + } + ] + } + } + ] + } + } + ] + } + }, + "resetOdom": true, + "folder": "Olivia's Test Autos ", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Example Auto.auto b/src/main/deploy/pathplanner/autos/Example Auto.auto new file mode 100644 index 0000000..70b7ab2 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Example Auto.auto @@ -0,0 +1,19 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Example Path" + } + } + ] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/JustClimb2.auto b/src/main/deploy/pathplanner/autos/JustClimb2.auto deleted file mode 100644 index c15137c..0000000 --- a/src/main/deploy/pathplanner/autos/JustClimb2.auto +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "ExtendClimber" - } - }, - { - "type": "path", - "data": { - "pathName": "JustClimb2" - } - }, - { - "type": "named", - "data": { - "name": "Climb" - } - } - ] - } - }, - "resetOdom": true, - "folder": "Only Climb", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/LB.Sweep.S1.M2.Climb.auto b/src/main/deploy/pathplanner/autos/LB.Sweep.S1.M2.Climb.auto deleted file mode 100644 index 4a8b995..0000000 --- a/src/main/deploy/pathplanner/autos/LB.Sweep.S1.M2.Climb.auto +++ /dev/null @@ -1,88 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Shoot3-SweepUp-Shoot1" - } - }, - { - "type": "named", - "data": { - "name": "Shoot" - } - }, - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Shoot1-Main2" - } - }, - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "wait", - "data": { - "waitTime": 1.5 - } - }, - { - "type": "named", - "data": { - "name": "IntakeOn" - } - } - ] - } - } - ] - } - }, - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "IntakeOff" - } - }, - { - "type": "path", - "data": { - "pathName": "Main2-Climb1" - } - }, - { - "type": "named", - "data": { - "name": "ExtendClimber" - } - } - ] - } - }, - { - "type": "named", - "data": { - "name": "Climb" - } - } - ] - } - }, - "resetOdom": true, - "folder": "Sweep First", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/S3.M4.Climb.auto b/src/main/deploy/pathplanner/autos/S3.M4.Climb.auto deleted file mode 100644 index 18b9d6b..0000000 --- a/src/main/deploy/pathplanner/autos/S3.M4.Climb.auto +++ /dev/null @@ -1,108 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "LBump-Shoot3" - } - }, - { - "type": "named", - "data": { - "name": "ReadyUp" - } - }, - { - "type": "named", - "data": { - "name": "IntakeDown" - } - } - ] - } - }, - { - "type": "named", - "data": { - "name": "Shoot" - } - }, - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Shoot3-Main4" - } - }, - { - "type": "sequential", - "data": { - "commands": [ - { - "type": "wait", - "data": { - "waitTime": 1.5 - } - }, - { - "type": "named", - "data": { - "name": "IntakeOn" - } - } - ] - } - } - ] - } - }, - { - "type": "sequential", - "data": { - "commands": [ - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Main4-Climb2" - } - }, - { - "type": "named", - "data": { - "name": "ExtendClimber" - } - } - ] - } - }, - { - "type": "named", - "data": { - "name": "Climb" - } - } - ] - } - } - ] - } - }, - "resetOdom": true, - "folder": "Shoot First", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/UB.Sweep.S3.Climb.auto b/src/main/deploy/pathplanner/autos/UB.Sweep.S3.Climb.auto deleted file mode 100644 index d1b130b..0000000 --- a/src/main/deploy/pathplanner/autos/UB.Sweep.S3.Climb.auto +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "UBump-SweepDown-Shoot3" - } - }, - { - "type": "named", - "data": { - "name": "Shoot" - } - }, - { - "type": "parallel", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Shoot3-Climb2" - } - }, - { - "type": "named", - "data": { - "name": "ExtendClimber" - } - } - ] - } - }, - { - "type": "named", - "data": { - "name": "Climb" - } - } - ] - } - }, - "resetOdom": true, - "folder": "Sweep First", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Depot-Climb1.path b/src/main/deploy/pathplanner/paths/Depot-Climb1.path index ca333f2..482fa46 100644 --- a/src/main/deploy/pathplanner/paths/Depot-Climb1.path +++ b/src/main/deploy/pathplanner/paths/Depot-Climb1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Depot-Shoot1.path b/src/main/deploy/pathplanner/paths/Depot-Shoot1.path index 650b756..81a6195 100644 --- a/src/main/deploy/pathplanner/paths/Depot-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/Depot-Shoot1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Depot-Shoot2.path b/src/main/deploy/pathplanner/paths/Depot-Shoot2.path index acc1efe..1994377 100644 --- a/src/main/deploy/pathplanner/paths/Depot-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/Depot-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Depot-Shoot3.path b/src/main/deploy/pathplanner/paths/Depot-Shoot3.path index d2fa138..c7decbd 100644 --- a/src/main/deploy/pathplanner/paths/Depot-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/Depot-Shoot3.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Main1.path b/src/main/deploy/pathplanner/paths/Example Path.path similarity index 57% rename from src/main/deploy/pathplanner/paths/Shoot2-Main1.path rename to src/main/deploy/pathplanner/paths/Example Path.path index 8bae84f..fd61ab1 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Main1.path +++ b/src/main/deploy/pathplanner/paths/Example Path.path @@ -3,45 +3,45 @@ "waypoints": [ { "anchor": { - "x": 3.495168269230769, - "y": 3.976858974358975 + "x": 2.0, + "y": 7.0 }, "prevControl": null, "nextControl": { - "x": 3.592847900557547, - "y": 4.963312327872699 + "x": 3.013282910175676, + "y": 6.5274984191074985 }, "isLocked": false, - "linkedName": "S2" + "linkedName": null }, { "anchor": { - "x": 3.76778313253012, - "y": 5.291686746987953 + "x": 5.166769560390973, + "y": 5.0964860911203305 }, "prevControl": { - "x": 3.5745839880885217, - "y": 5.101240702945876 + "x": 4.166769560390973, + "y": 6.0964860911203305 }, "nextControl": { - "x": 4.225742841389206, - "y": 5.743120500149518 + "x": 6.166769560390973, + "y": 4.0964860911203305 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 7.675728952774968, - "y": 5.9918925393593625 + "x": 7.0, + "y": 1.0 }, "prevControl": { - "x": 6.456, - "y": 5.88178313253012 + "x": 6.75, + "y": 2.5 }, "nextControl": null, "isLocked": false, - "linkedName": "M1" + "linkedName": null } ], "rotationTargets": [], @@ -49,8 +49,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, @@ -61,10 +61,10 @@ "rotation": 0.0 }, "reversed": false, - "folder": "Shoot✔️ ", + "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 1.101706115206352 + "rotation": 0.0 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/JustClimb1.path b/src/main/deploy/pathplanner/paths/JustClimb1.path index 32581dd..9b384c2 100644 --- a/src/main/deploy/pathplanner/paths/JustClimb1.path +++ b/src/main/deploy/pathplanner/paths/JustClimb1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/JustClimb2.path b/src/main/deploy/pathplanner/paths/JustClimb2.path index dec627e..0912397 100644 --- a/src/main/deploy/pathplanner/paths/JustClimb2.path +++ b/src/main/deploy/pathplanner/paths/JustClimb2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-Climb.path b/src/main/deploy/pathplanner/paths/LBump-Climb.path index 13b50f6..4761cc3 100644 --- a/src/main/deploy/pathplanner/paths/LBump-Climb.path +++ b/src/main/deploy/pathplanner/paths/LBump-Climb.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-Main3.path b/src/main/deploy/pathplanner/paths/LBump-Main3.path index 9f43872..fb84f24 100644 --- a/src/main/deploy/pathplanner/paths/LBump-Main3.path +++ b/src/main/deploy/pathplanner/paths/LBump-Main3.path @@ -45,8 +45,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-Main4.path b/src/main/deploy/pathplanner/paths/LBump-Main4.path index 73857e7..91b0f21 100644 --- a/src/main/deploy/pathplanner/paths/LBump-Main4.path +++ b/src/main/deploy/pathplanner/paths/LBump-Main4.path @@ -40,8 +40,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-Shoot2.path b/src/main/deploy/pathplanner/paths/LBump-Shoot2.path index 18d30a8..75761f4 100644 --- a/src/main/deploy/pathplanner/paths/LBump-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/LBump-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-Shoot3.path b/src/main/deploy/pathplanner/paths/LBump-Shoot3.path index 714bdd1..79c65a3 100644 --- a/src/main/deploy/pathplanner/paths/LBump-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/LBump-Shoot3.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-SweepUp-Shoot1.path b/src/main/deploy/pathplanner/paths/LBump-SweepUp-Shoot1.path index 4cba3c5..cacd00f 100644 --- a/src/main/deploy/pathplanner/paths/LBump-SweepUp-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/LBump-SweepUp-Shoot1.path @@ -129,8 +129,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LBump-SweepUp.path b/src/main/deploy/pathplanner/paths/LBump-SweepUp.path index 6819b10..ca8d19f 100644 --- a/src/main/deploy/pathplanner/paths/LBump-SweepUp.path +++ b/src/main/deploy/pathplanner/paths/LBump-SweepUp.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LTrench-Climb2.path b/src/main/deploy/pathplanner/paths/LTrench-Climb2.path index 0188f32..369f579 100644 --- a/src/main/deploy/pathplanner/paths/LTrench-Climb2.path +++ b/src/main/deploy/pathplanner/paths/LTrench-Climb2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/LTrench-Shoot3.path b/src/main/deploy/pathplanner/paths/LTrench-Shoot3.path index 3fa73b3..8f18008 100644 --- a/src/main/deploy/pathplanner/paths/LTrench-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/LTrench-Shoot3.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main1-Climb1.path b/src/main/deploy/pathplanner/paths/Main1-Climb1.path index 4ac9697..35a1e4a 100644 --- a/src/main/deploy/pathplanner/paths/Main1-Climb1.path +++ b/src/main/deploy/pathplanner/paths/Main1-Climb1.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main1-Shoot1.path b/src/main/deploy/pathplanner/paths/Main1-Shoot1.path index e2959bf..364f8be 100644 --- a/src/main/deploy/pathplanner/paths/Main1-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/Main1-Shoot1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main1-Shoot2.path b/src/main/deploy/pathplanner/paths/Main1-Shoot2.path index 521a288..8431473 100644 --- a/src/main/deploy/pathplanner/paths/Main1-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/Main1-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main2-Climb1.path b/src/main/deploy/pathplanner/paths/Main2-Climb1.path index 1c03ea5..b3db7d4 100644 --- a/src/main/deploy/pathplanner/paths/Main2-Climb1.path +++ b/src/main/deploy/pathplanner/paths/Main2-Climb1.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main2-Shoot1.path b/src/main/deploy/pathplanner/paths/Main2-Shoot1.path index d62b805..e765140 100644 --- a/src/main/deploy/pathplanner/paths/Main2-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/Main2-Shoot1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main2-Shoot2.path b/src/main/deploy/pathplanner/paths/Main2-Shoot2.path index 3807627..cff8acd 100644 --- a/src/main/deploy/pathplanner/paths/Main2-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/Main2-Shoot2.path @@ -8,7 +8,7 @@ }, "prevControl": null, "nextControl": { - "x": 3.9426265060240966, + "x": 3.942626506024097, "y": 5.521168674698794 }, "isLocked": false, @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main3-Climb2.path b/src/main/deploy/pathplanner/paths/Main3-Climb2.path index ae6f2e8..7f778d0 100644 --- a/src/main/deploy/pathplanner/paths/Main3-Climb2.path +++ b/src/main/deploy/pathplanner/paths/Main3-Climb2.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main3-Shoot2.path b/src/main/deploy/pathplanner/paths/Main3-Shoot2.path index 77b6b93..7627d06 100644 --- a/src/main/deploy/pathplanner/paths/Main3-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/Main3-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main3-Shoot3.path b/src/main/deploy/pathplanner/paths/Main3-Shoot3.path index 59577a1..53aa1e4 100644 --- a/src/main/deploy/pathplanner/paths/Main3-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/Main3-Shoot3.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main4-Climb2.path b/src/main/deploy/pathplanner/paths/Main4-Climb2.path index b44f772..5369cff 100644 --- a/src/main/deploy/pathplanner/paths/Main4-Climb2.path +++ b/src/main/deploy/pathplanner/paths/Main4-Climb2.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main4-Shoot2.path b/src/main/deploy/pathplanner/paths/Main4-Shoot2.path index 2ee2cae..e2cafa1 100644 --- a/src/main/deploy/pathplanner/paths/Main4-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/Main4-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Main4-Shoot3.path b/src/main/deploy/pathplanner/paths/Main4-Shoot3.path index bc59ae1..5fce4f9 100644 --- a/src/main/deploy/pathplanner/paths/Main4-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/Main4-Shoot3.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Move Down .path b/src/main/deploy/pathplanner/paths/Move Down .path index dd02f81..4e3566e 100644 --- a/src/main/deploy/pathplanner/paths/Move Down .path +++ b/src/main/deploy/pathplanner/paths/Move Down .path @@ -3,29 +3,29 @@ "waypoints": [ { "anchor": { - "x": 2.344094151212553, - "y": 5.089500713266761 + "x": 2.5262075134168156, + "y": 5.786 }, "prevControl": null, "nextControl": { - "x": 2.344094151212553, - "y": 5.339500713266761 + "x": 2.5262075134168156, + "y": 5.451165697708541 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.344094151212553, - "y": 4.59 + "x": 2.5262075134168156, + "y": 3.786 }, "prevControl": { - "x": 2.344094151212553, - "y": 4.84 + "x": 2.5262075134168156, + "y": 4.036 }, "nextControl": null, "isLocked": false, - "linkedName": null + "linkedName": "Top Position " } ], "rotationTargets": [], @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, @@ -47,7 +47,7 @@ "reversed": false, "folder": "New Folder", "idealStartingState": { - "velocity": 0, + "velocity": 0.0, "rotation": 0.0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/pathplanner/paths/Move Up .path b/src/main/deploy/pathplanner/paths/Move Up .path index ae4b778..b190ad7 100644 --- a/src/main/deploy/pathplanner/paths/Move Up .path +++ b/src/main/deploy/pathplanner/paths/Move Up .path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 2.033566333808844, - "y": 2.838174037089873 + "x": 2.639785330948121, + "y": 4.28649373881932 }, "prevControl": null, "nextControl": { - "x": 2.004356021916995, - "y": 2.589886386009154 + "x": 2.639542529386918, + "y": 4.816394912583497 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.033566333808844, - "y": 3.388 + "x": 2.639785330948121, + "y": 6.286 }, "prevControl": { - "x": 2.019698828903213, - "y": 3.637615088301353 + "x": 2.639472847563966, + "y": 5.762694956403431 }, "nextControl": null, "isLocked": false, @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Rotating Cal rows his boat .path b/src/main/deploy/pathplanner/paths/Rotating Cal rows his boat .path new file mode 100644 index 0000000..a2457af --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Rotating Cal rows his boat .path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.6782110912343464, + "y": 6.1686404293381045 + }, + "prevControl": null, + "nextControl": { + "x": 3.6781162799222873, + "y": 5.371914863241866 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.678, + "y": 4.169 + }, + "prevControl": { + "x": 3.705489649159504, + "y": 4.807769668377498 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 0.5, + "maxAcceleration": 0.5, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 180.0 + }, + "reversed": false, + "folder": "New Folder", + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SWERVE BEND THAT CORNER WHOAAA.path b/src/main/deploy/pathplanner/paths/SWERVE BEND THAT CORNER WHOAAA.path new file mode 100644 index 0000000..40f2716 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/SWERVE BEND THAT CORNER WHOAAA.path @@ -0,0 +1,59 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.62953488372093, + "y": 5.260017889087655 + }, + "prevControl": null, + "nextControl": { + "x": 2.1205724508050086, + "y": 6.233542039355992 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.029194991055456, + "y": 3.994436493738819 + }, + "prevControl": { + "x": 2.866940966010733, + "y": 4.8868336314847935 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.7192513368983966, + "rotationDegrees": -50.0 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 0.5, + "maxAcceleration": 0.5, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": "New Folder", + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Shoot1-Center.path b/src/main/deploy/pathplanner/paths/Shoot1-Center.path index a382388..e107b75 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-Center.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-Center.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot1-Climb1.path b/src/main/deploy/pathplanner/paths/Shoot1-Climb1.path index 73eb355..b9d3c37 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-Climb1.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-Climb1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot1-Depot.path b/src/main/deploy/pathplanner/paths/Shoot1-Depot.path index 6cb664b..d9774fa 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-Depot.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-Depot.path @@ -45,8 +45,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot1-Main1.path b/src/main/deploy/pathplanner/paths/Shoot1-Main1.path index 9a0207f..1750626 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-Main1.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-Main1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot1-Main2.path b/src/main/deploy/pathplanner/paths/Shoot1-Main2.path index f362f54..6b6de52 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-Main2.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-Main2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot1-SweepDown.path b/src/main/deploy/pathplanner/paths/Shoot1-SweepDown.path index 7b461b7..5faa902 100644 --- a/src/main/deploy/pathplanner/paths/Shoot1-SweepDown.path +++ b/src/main/deploy/pathplanner/paths/Shoot1-SweepDown.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Climb1.path b/src/main/deploy/pathplanner/paths/Shoot2-Climb1.path index 4b5f922..7a68c7b 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Climb1.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-Climb1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Depot.path b/src/main/deploy/pathplanner/paths/Shoot2-Depot.path index 128b7e0..93b9c6f 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Depot.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-Depot.path @@ -45,8 +45,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Main2.path b/src/main/deploy/pathplanner/paths/Shoot2-Main2.path index c91ee58..bdd1c7f 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Main2.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-Main2.path @@ -49,8 +49,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Main3.path b/src/main/deploy/pathplanner/paths/Shoot2-Main3.path index 13d8742..b2c9149 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Main3.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-Main3.path @@ -49,8 +49,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-Main4.path b/src/main/deploy/pathplanner/paths/Shoot2-Main4.path index c422f4f..fc917d4 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-Main4.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-Main4.path @@ -49,8 +49,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-SweepDown.path b/src/main/deploy/pathplanner/paths/Shoot2-SweepDown.path index ab8992c..7a02ab3 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-SweepDown.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-SweepDown.path @@ -70,8 +70,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot2-SweepUp.path b/src/main/deploy/pathplanner/paths/Shoot2-SweepUp.path index ab50426..3451533 100644 --- a/src/main/deploy/pathplanner/paths/Shoot2-SweepUp.path +++ b/src/main/deploy/pathplanner/paths/Shoot2-SweepUp.path @@ -70,8 +70,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-Climb2.path b/src/main/deploy/pathplanner/paths/Shoot3-Climb2.path index 6854f92..a1fb8c2 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-Climb2.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-Climb2.path @@ -24,7 +24,7 @@ "y": 2.0946011699463005 }, "nextControl": { - "x": 0.48719889838116087, + "x": 0.4871988983811609, "y": 2.534262681236635 }, "isLocked": false, @@ -36,7 +36,7 @@ "y": 2.8801012661030256 }, "prevControl": { - "x": 0.44575903614457835, + "x": 0.44575903614457846, "y": 2.811096385542169 }, "nextControl": null, @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-Depot.path b/src/main/deploy/pathplanner/paths/Shoot3-Depot.path index 8286d2c..7c09d37 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-Depot.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-Depot.path @@ -45,8 +45,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-Main3.path b/src/main/deploy/pathplanner/paths/Shoot3-Main3.path index 294af81..c8d260a 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-Main3.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-Main3.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-Main4.path b/src/main/deploy/pathplanner/paths/Shoot3-Main4.path index 4068130..4c6d738 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-Main4.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-Main4.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-SweepUp-Shoot1.path b/src/main/deploy/pathplanner/paths/Shoot3-SweepUp-Shoot1.path index 5884144..d045f0f 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-SweepUp-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-SweepUp-Shoot1.path @@ -139,8 +139,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/Shoot3-SweepUp.path b/src/main/deploy/pathplanner/paths/Shoot3-SweepUp.path index 00c6255..e27ce7f 100644 --- a/src/main/deploy/pathplanner/paths/Shoot3-SweepUp.path +++ b/src/main/deploy/pathplanner/paths/Shoot3-SweepUp.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepDown-Climb2.path b/src/main/deploy/pathplanner/paths/SweepDown-Climb2.path index f7a1e62..5b2f138 100644 --- a/src/main/deploy/pathplanner/paths/SweepDown-Climb2.path +++ b/src/main/deploy/pathplanner/paths/SweepDown-Climb2.path @@ -24,7 +24,7 @@ "y": 2.2865662650602405 }, "nextControl": { - "x": 0.28312723263173406, + "x": 0.2831272326317341, "y": 2.364988790443167 }, "isLocked": false, @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepDown-LBump.path b/src/main/deploy/pathplanner/paths/SweepDown-LBump.path index 6085d3b..13caef7 100644 --- a/src/main/deploy/pathplanner/paths/SweepDown-LBump.path +++ b/src/main/deploy/pathplanner/paths/SweepDown-LBump.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepDown-Shoot2.path b/src/main/deploy/pathplanner/paths/SweepDown-Shoot2.path index 039ea3f..86b6e97 100644 --- a/src/main/deploy/pathplanner/paths/SweepDown-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/SweepDown-Shoot2.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepDown-Shoot3.path b/src/main/deploy/pathplanner/paths/SweepDown-Shoot3.path index d9e34f4..6c38dc9 100644 --- a/src/main/deploy/pathplanner/paths/SweepDown-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/SweepDown-Shoot3.path @@ -54,8 +54,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepDown.path b/src/main/deploy/pathplanner/paths/SweepDown.path index 03b935d..4fbd5b1 100644 --- a/src/main/deploy/pathplanner/paths/SweepDown.path +++ b/src/main/deploy/pathplanner/paths/SweepDown.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepUp-Climb.path b/src/main/deploy/pathplanner/paths/SweepUp-Climb.path index 0a0dfd0..0816927 100644 --- a/src/main/deploy/pathplanner/paths/SweepUp-Climb.path +++ b/src/main/deploy/pathplanner/paths/SweepUp-Climb.path @@ -20,7 +20,7 @@ "y": 4.599583975068654 }, "prevControl": { - "x": 3.280448600922838, + "x": 3.2804486009228384, "y": 4.638438076655999 }, "nextControl": null, @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepUp-Shoot1.path b/src/main/deploy/pathplanner/paths/SweepUp-Shoot1.path index 2b5578d..98888b5 100644 --- a/src/main/deploy/pathplanner/paths/SweepUp-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/SweepUp-Shoot1.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepUp-Shoot2.path b/src/main/deploy/pathplanner/paths/SweepUp-Shoot2.path index be6b606..c273453 100644 --- a/src/main/deploy/pathplanner/paths/SweepUp-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/SweepUp-Shoot2.path @@ -49,8 +49,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepUp-UBump.path b/src/main/deploy/pathplanner/paths/SweepUp-UBump.path index 6a677f5..3c0fc3c 100644 --- a/src/main/deploy/pathplanner/paths/SweepUp-UBump.path +++ b/src/main/deploy/pathplanner/paths/SweepUp-UBump.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/SweepUp.path b/src/main/deploy/pathplanner/paths/SweepUp.path index 71d8f7b..5920899 100644 --- a/src/main/deploy/pathplanner/paths/SweepUp.path +++ b/src/main/deploy/pathplanner/paths/SweepUp.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-Climb.path b/src/main/deploy/pathplanner/paths/UBump-Climb.path index 30b22d0..fe2d6d0 100644 --- a/src/main/deploy/pathplanner/paths/UBump-Climb.path +++ b/src/main/deploy/pathplanner/paths/UBump-Climb.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-Main1.path b/src/main/deploy/pathplanner/paths/UBump-Main1.path index 4a0d7ca..36c940b 100644 --- a/src/main/deploy/pathplanner/paths/UBump-Main1.path +++ b/src/main/deploy/pathplanner/paths/UBump-Main1.path @@ -40,8 +40,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-Main2.path b/src/main/deploy/pathplanner/paths/UBump-Main2.path index 5e718cf..0a66dcd 100644 --- a/src/main/deploy/pathplanner/paths/UBump-Main2.path +++ b/src/main/deploy/pathplanner/paths/UBump-Main2.path @@ -40,8 +40,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-Shoot1.path b/src/main/deploy/pathplanner/paths/UBump-Shoot1.path index b795d94..3a1eb2d 100644 --- a/src/main/deploy/pathplanner/paths/UBump-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/UBump-Shoot1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-Shoot2.path b/src/main/deploy/pathplanner/paths/UBump-Shoot2.path index 13d3536..29a9187 100644 --- a/src/main/deploy/pathplanner/paths/UBump-Shoot2.path +++ b/src/main/deploy/pathplanner/paths/UBump-Shoot2.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-SweepDown-Shoot3.path b/src/main/deploy/pathplanner/paths/UBump-SweepDown-Shoot3.path index aff3f32..640e7d7 100644 --- a/src/main/deploy/pathplanner/paths/UBump-SweepDown-Shoot3.path +++ b/src/main/deploy/pathplanner/paths/UBump-SweepDown-Shoot3.path @@ -139,8 +139,8 @@ } ], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UBump-SweepDown.path b/src/main/deploy/pathplanner/paths/UBump-SweepDown.path index 8fffdd7..1145fca 100644 --- a/src/main/deploy/pathplanner/paths/UBump-SweepDown.path +++ b/src/main/deploy/pathplanner/paths/UBump-SweepDown.path @@ -38,8 +38,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UTrench-Climb1.path b/src/main/deploy/pathplanner/paths/UTrench-Climb1.path index 97c258d..474bc98 100644 --- a/src/main/deploy/pathplanner/paths/UTrench-Climb1.path +++ b/src/main/deploy/pathplanner/paths/UTrench-Climb1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/paths/UTrench-Shoot1.path b/src/main/deploy/pathplanner/paths/UTrench-Shoot1.path index 4a0fcee..220fbd8 100644 --- a/src/main/deploy/pathplanner/paths/UTrench-Shoot1.path +++ b/src/main/deploy/pathplanner/paths/UTrench-Shoot1.path @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxVelocity": 0.5, + "maxAcceleration": 0.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index f48139e..bf0674a 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -1,6 +1,6 @@ { - "robotWidth": 0.69, - "robotLength": 0.7, + "robotWidth": 0.9, + "robotLength": 0.9, "holonomicMode": true, "pathFolders": [ "Climb Paths ✔", @@ -13,34 +13,23 @@ "Sweep Paths ✔" ], "autoFolders": [ - "New Folder", + "Olivia's Test Autos ", "Only Climb", "Shoot First", "Sweep First" ], - "defaultMaxVel": 3.0, - "defaultMaxAccel": 3.0, + "defaultMaxVel": 0.5, + "defaultMaxAccel": 0.5, "defaultMaxAngVel": 540.0, "defaultMaxAngAccel": 720.0, - "defaultNominalVoltage": 12.0, - "robotMass": 52.0, + "robotMass": 74.088, "robotMOI": 6.883, + "robotWheelbase": 0.546, "robotTrackwidth": 0.546, "driveWheelRadius": 0.048, "driveGearing": 5.143, "maxDriveSpeed": 5.45, "driveMotorType": "krakenX60FOC", "driveCurrentLimit": 60.0, - "wheelCOF": 1.2, - "flModuleX": 0.273, - "flModuleY": 0.273, - "frModuleX": 0.273, - "frModuleY": -0.273, - "blModuleX": -0.273, - "blModuleY": 0.273, - "brModuleX": -0.273, - "brModuleY": -0.273, - "bumperOffsetX": 0.0, - "bumperOffsetY": 0.0, - "robotFeatures": [] -} \ No newline at end of file + "wheelCOF": 1.2 +} diff --git a/src/main/java/frc/lib/W8/io/absoluteencoder/AbsoluteEncoderIOCANCoder.java b/src/main/java/frc/lib/W8/io/absoluteencoder/AbsoluteEncoderIOCANCoder.java index e915ac2..d6a3641 100644 --- a/src/main/java/frc/lib/W8/io/absoluteencoder/AbsoluteEncoderIOCANCoder.java +++ b/src/main/java/frc/lib/W8/io/absoluteencoder/AbsoluteEncoderIOCANCoder.java @@ -41,13 +41,7 @@ public AbsoluteEncoderIOCANCoder( angle = CANCoder.getAbsolutePosition(); - // Further reduce update frequency for absolute encoder since it's mainly used for - // initialization - updateThread.CTRECheckErrorAndRetry( - () -> angle.setUpdateFrequency(10.0)); // Further reduced from 25.0 - - // Optimize bus utilization - CANCoder.optimizeBusUtilization(1.0); + updateThread.CTRECheckErrorAndRetry(() -> angle.setUpdateFrequency(200)); } @Override diff --git a/src/main/java/frc/lib/W8/io/distancesensor/DistanceSensorIOCANRange.java b/src/main/java/frc/lib/W8/io/distancesensor/DistanceSensorIOCANRange.java index 02a2d54..90c66a2 100644 --- a/src/main/java/frc/lib/W8/io/distancesensor/DistanceSensorIOCANRange.java +++ b/src/main/java/frc/lib/W8/io/distancesensor/DistanceSensorIOCANRange.java @@ -51,13 +51,6 @@ public DistanceSensorIOCANRange(Device.CAN id, String name, CANrangeConfiguratio ambientSignal = CANRange.getAmbientSignal(); distance = CANRange.getDistance(); - - // Set very low update frequencies for distance sensors (not critical for control) - updateThread.CTRECheckErrorAndRetry( - () -> BaseStatusSignal.setUpdateFrequencyForAll(10.0, ambientSignal, distance)); - - // Optimize bus utilization - CANRange.optimizeBusUtilization(1.0); } @Override diff --git a/src/main/java/frc/lib/W8/io/motor/MotorIOTalonFX.java b/src/main/java/frc/lib/W8/io/motor/MotorIOTalonFX.java index 729f730..2bbd047 100644 --- a/src/main/java/frc/lib/W8/io/motor/MotorIOTalonFX.java +++ b/src/main/java/frc/lib/W8/io/motor/MotorIOTalonFX.java @@ -75,9 +75,9 @@ public record TalonFXFollower(Device.CAN id, MotorAlignmentValue opposesMain) {} // Preconfigured control objects reused for efficiency protected final CoastOut coastControl = new CoastOut(); protected final StaticBrake brakeControl = new StaticBrake(); - protected final VoltageOut voltageControl = new VoltageOut(0).withEnableFOC(true); + protected final VoltageOut voltageControl = new VoltageOut(0); protected final TorqueCurrentFOC currentControl = new TorqueCurrentFOC(0); - protected final DutyCycleOut dutyCycleControl = new DutyCycleOut(0).withEnableFOC(true); + protected final DutyCycleOut dutyCycleControl = new DutyCycleOut(0); protected final DynamicMotionMagicTorqueCurrentFOC positionControl = new DynamicMotionMagicTorqueCurrentFOC(0, 0, 0); protected final VelocityTorqueCurrentFOC velocityControl = new VelocityTorqueCurrentFOC(0); @@ -105,7 +105,6 @@ public MotorIOTalonFX( this.name = name; motor = new TalonFX(main.id(), main.bus()); - motor.optimizeBusUtilization(); updateThread.CTRECheckErrorAndRetry(() -> motor.getConfigurator().apply(config)); // Initialize lists @@ -141,38 +140,17 @@ public MotorIOTalonFX( closedLoopReference = motor.getClosedLoopReference(); closedLoopReferenceSlope = motor.getClosedLoopReferenceSlope(); - // Set different update frequencies based on signal importance - // Critical signals for control (reduced frequency) updateThread.CTRECheckErrorAndRetry( () -> BaseStatusSignal.setUpdateFrequencyForAll( - 50.0, position, velocity)); // Critical for control loops + 100, position, velocity, supplyCurrent, supplyCurrent, torqueCurrent, temperature)); - // Important telemetry (lower frequency) updateThread.CTRECheckErrorAndRetry( () -> BaseStatusSignal.setUpdateFrequencyForAll( - 20.0, supplyCurrent, torqueCurrent)); // Important for monitoring + 200, closedLoopError, closedLoopReference, closedLoopReferenceSlope)); - // Non-critical telemetry (very low frequency) - updateThread.CTRECheckErrorAndRetry( - () -> - BaseStatusSignal.setUpdateFrequencyForAll( - 10.0, temperature, supplyVoltage)); // Less critical - - // Control loop feedback (reduced frequency when in closed-loop) - updateThread.CTRECheckErrorAndRetry( - () -> - BaseStatusSignal.setUpdateFrequencyForAll( - 100.0, closedLoopError, closedLoopReference, closedLoopReferenceSlope)); - - // Optimize bus utilization with longer timeout for better optimization - motor.optimizeBusUtilization(1.0, 1.0); // Increased timeout for better optimization - - // Optimize follower bus utilization - for (TalonFX follower : followers) { - follower.optimizeBusUtilization(1.0, 1.0); - } + motor.optimizeBusUtilization(0, 1.0); } /** @@ -188,7 +166,7 @@ protected boolean isRunningPositionControl() { return (control instanceof PositionTorqueCurrentFOC) || (control instanceof PositionVoltage) || (control instanceof MotionMagicTorqueCurrentFOC) - || (control instanceof DynamicMotionMagicTorqueCurrentFOC) + || (control instanceof MotionMagicDutyCycle) || (control instanceof MotionMagicVoltage); } @@ -203,7 +181,7 @@ protected boolean isRunningVelocityControl() { var control = motor.getAppliedControl(); return (control instanceof VelocityTorqueCurrentFOC) || (control instanceof VelocityVoltage) - || (control instanceof MotionMagicVelocityTorqueCurrentFOC) + || (control instanceof MotionMagicVelocityDutyCycle) || (control instanceof MotionMagicVelocityVoltage); } @@ -218,8 +196,8 @@ protected boolean isRunningVelocityControl() { protected boolean isRunningMotionMagic() { var control = motor.getAppliedControl(); return (control instanceof MotionMagicTorqueCurrentFOC) - || (control instanceof DynamicMotionMagicTorqueCurrentFOC) - || (control instanceof MotionMagicVelocityTorqueCurrentFOC) + || (control instanceof MotionMagicDutyCycle) + || (control instanceof MotionMagicVelocityDutyCycle) || (control instanceof MotionMagicVoltage) || (control instanceof MotionMagicVelocityVoltage); } @@ -263,17 +241,19 @@ protected ControlType getCurrentControlType() { */ @Override public void updateInputs(MotorInputs inputs) { - // Refresh signals in groups based on priority - // Refresh critical signals first - boolean criticalSignalsOk = BaseStatusSignal.refreshAll(position, velocity).isOK(); - - // Refresh telemetry signals - boolean telemetrySignalsOk = - BaseStatusSignal.refreshAll(supplyCurrent, torqueCurrent, temperature, supplyVoltage) + inputs.connected = + BaseStatusSignal.refreshAll( + position, + velocity, + supplyVoltage, + supplyCurrent, + torqueCurrent, + temperature, + closedLoopError, + closedLoopReference, + closedLoopReferenceSlope) .isOK(); - inputs.connected = criticalSignalsOk && telemetrySignalsOk; - inputs.position = position.getValue(); inputs.velocity = velocity.getValue(); inputs.appliedVoltage = supplyVoltage.getValue(); @@ -281,47 +261,34 @@ public void updateInputs(MotorInputs inputs) { inputs.torqueCurrent = torqueCurrent.getValue(); inputs.temperature = temperature.getValue(); - // Check current control modes + // Interpret control-loop status signals conditionally based on current mode + Double closedLoopErrorValue = closedLoopError.getValue(); + Double closedLoopTargetValue = closedLoopReference.getValue(); + boolean isRunningPositionControl = isRunningPositionControl(); boolean isRunningMotionMagic = isRunningMotionMagic(); boolean isRunningVelocityControl = isRunningVelocityControl(); - // Only update closed-loop signals when in closed-loop modes - if (isRunningPositionControl || isRunningVelocityControl) { - BaseStatusSignal.refreshAll(closedLoopError, closedLoopReference, closedLoopReferenceSlope); - - // Interpret control-loop status signals conditionally based on current mode - Double closedLoopErrorValue = closedLoopError.getValue(); - Double closedLoopTargetValue = closedLoopReference.getValue(); - - inputs.positionError = isRunningPositionControl ? Rotations.of(closedLoopErrorValue) : null; - - inputs.activeTrajectoryPosition = - isRunningPositionControl && isRunningMotionMagic - ? Rotations.of(closedLoopTargetValue) - : null; - - inputs.goalPosition = isRunningPositionControl ? goalPosition : null; - - if (isRunningVelocityControl) { - inputs.velocityError = RotationsPerSecond.of(closedLoopErrorValue); - inputs.activeTrajectoryVelocity = RotationsPerSecond.of(closedLoopTargetValue); - } else if (isRunningPositionControl && isRunningMotionMagic) { - var targetVelocity = closedLoopReferenceSlope.getValue(); - inputs.velocityError = - RotationsPerSecond.of(targetVelocity - inputs.velocity.in(RotationsPerSecond)); - inputs.activeTrajectoryVelocity = RotationsPerSecond.of(targetVelocity); - } else { - inputs.velocityError = null; - inputs.activeTrajectoryVelocity = null; - } + inputs.positionError = isRunningPositionControl ? Rotations.of(closedLoopErrorValue) : null; + + inputs.activeTrajectoryPosition = + isRunningPositionControl && isRunningMotionMagic + ? Rotations.of(closedLoopTargetValue) + : null; + + inputs.goalPosition = isRunningPositionControl ? goalPosition : null; + + if (isRunningVelocityControl) { + inputs.velocityError = RotationsPerSecond.of(closedLoopErrorValue); + inputs.activeTrajectoryVelocity = RotationsPerSecond.of(closedLoopTargetValue); + } else if (isRunningPositionControl && isRunningMotionMagic) { + var targetVelocity = closedLoopReferenceSlope.getValue(); + inputs.velocityError = + RotationsPerSecond.of(targetVelocity - inputs.velocity.in(RotationsPerSecond)); + inputs.activeTrajectoryVelocity = RotationsPerSecond.of(targetVelocity); } else { - // Not in closed-loop mode, set control loop values to null - inputs.positionError = null; inputs.velocityError = null; inputs.activeTrajectoryVelocity = null; - inputs.activeTrajectoryPosition = null; - inputs.goalPosition = null; } inputs.controlType = getCurrentControlType(); @@ -428,13 +395,7 @@ public void runPosition( Velocity maxJerk, PIDSlot slot) { this.goalPosition = position; - motor.setControl( - positionControl - .withPosition(position) - .withVelocity(cruiseVelocity) - .withAcceleration(acceleration) - .withJerk(maxJerk) - .withSlot(slot.getNum())); + motor.setControl(positionControl.withPosition(position).withSlot(slot.getNum())); } /** diff --git a/src/main/java/frc/lib/W8/mechanisms/rotary/RotaryMechanismReal.java b/src/main/java/frc/lib/W8/mechanisms/rotary/RotaryMechanismReal.java index d83d8df..b8b7b62 100644 --- a/src/main/java/frc/lib/W8/mechanisms/rotary/RotaryMechanismReal.java +++ b/src/main/java/frc/lib/W8/mechanisms/rotary/RotaryMechanismReal.java @@ -107,9 +107,4 @@ public Angle getPosition() { public AngularVelocity getVelocity() { return inputs.velocity; } - - @Override - public Current getSupplyCurrent() { - return inputs.supplyCurrent; - } } diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 5f158c5..d58b34a 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -34,7 +34,7 @@ import com.ctre.phoenix6.configs.Slot0Configs; import com.ctre.phoenix6.configs.Slot1Configs; import com.ctre.phoenix6.configs.TalonFXConfiguration; -import com.ctre.phoenix6.controls.RainbowAnimation; +import com.ctre.phoenix6.controls.*; import com.ctre.phoenix6.signals.Enable5VRailValue; import com.ctre.phoenix6.signals.FeedbackSensorSourceValue; import com.ctre.phoenix6.signals.InvertedValue; @@ -62,9 +62,9 @@ import edu.wpi.first.units.measure.MomentOfInertia; import edu.wpi.first.units.measure.Velocity; import edu.wpi.first.units.measure.Voltage; -import edu.wpi.first.wpilibj.DigitalInput; -import edu.wpi.first.wpilibj.DutyCycle; -import edu.wpi.first.wpilibj.DutyCycleEncoder; +// import edu.wpi.first.wpilibj.DigitalInput; +// import edu.wpi.first.wpilibj.DutyCycle; +// import edu.wpi.first.wpilibj.DutyCycleEncoder; import edu.wpi.first.wpilibj.RobotBase; import edu.wpi.first.wpilibj.simulation.SingleJointedArmSim; import frc.lib.W8.io.motor.MotorIOTalonFX.TalonFXFollower; @@ -249,7 +249,13 @@ public static TalonFXConfiguration getFXConfig() { config.Feedback.SensorToMechanismRatio = GEARING; - config.Slot0 = new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0).withKS(2.5).withKV(0.05); + if (RobotBase.isReal()) { + config.Slot0 = + new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0).withKS(2.5).withKV(0.05); + + } else { + config.Slot0 = new Slot0Configs().withKP(0.75).withKI(0.0).withKD(0.0); + } config.MotionMagic.MotionMagicCruiseVelocity = CRUISE_VELOCITY.in(RotationsPerSecond); config.MotionMagic.MotionMagicAcceleration = ACCELERATION.in(RotationsPerSecondPerSecond); @@ -322,10 +328,6 @@ public class ShooterFlywheelConstants { public static final TalonFXFollower FOLLOWER_1 = new TalonFXFollower(Ports.LeftFlywheel, MotorAlignmentValue.Opposed); - // Velocity PID - private static Slot0Configs SLOT0CONFIG = - new Slot0Configs().withKP(3.5).withKI(0.15).withKD(0.0).withKV(0.1).withKS(8.5); - public static TalonFXConfiguration getFXConfig(boolean invert) { TalonFXConfiguration config = new TalonFXConfiguration(); @@ -356,7 +358,13 @@ public static TalonFXConfiguration getFXConfig(boolean invert) { config.Feedback.SensorToMechanismRatio = GEARING; - config.Slot0 = SLOT0CONFIG; + if (RobotBase.isReal()) { + // Velocity PID + config.Slot0 = + new Slot0Configs().withKP(3.5).withKI(0.15).withKD(0.0).withKV(0.1).withKS(8.5); + } else { + config.Slot0 = new Slot0Configs().withKP(0.75).withKI(0.0).withKD(0.0); + } return config; } @@ -372,14 +380,13 @@ public class ShooterRotaryConstants { public static final Velocity JERK = ACCELERATION.per(Second); private static final double ROTOR_TO_SENSOR = (1.0 / 1.0); - private static final double SENSOR_TO_MECHANISM = 1 / 50; public static final Translation3d OFFSET = Translation3d.kZero; public static final Angle MIN_ANGLE = Degrees.of(0.0); public static final Angle MAX_ANGLE = Degrees.of(25); public static final Angle STARTING_ANGLE = Degrees.of(0.0); - public static final Distance ARM_LENGTH = Meters.of(0.0); + public static final Distance ARM_LENGTH = Meters.of(0.5); public static final RotaryMechCharacteristics CONSTANTS = new RotaryMechCharacteristics(OFFSET, ARM_LENGTH, MIN_ANGLE, MAX_ANGLE, STARTING_ANGLE); @@ -392,12 +399,12 @@ public class ShooterRotaryConstants { private static final Angle ENCODER_OFFSET = Rotations.of(0.0); - // Positional PID - private static Slot0Configs SLOT0CONFIG = - new Slot0Configs().withKP(500.0).withKI(0.0).withKD(0.05).withKS(10.0).withKV(0.0); - // Velocity PID - private static Slot1Configs SLOT1CONFIG = - new Slot1Configs().withKP(30.0).withKI(0.0).withKD(0.0).withKS(40.0).withKV(0.0); + // // Positional PID + // private static Slot0Configs SLOT0CONFIG = + // new Slot0Configs().withKP(500.0).withKI(0.0).withKD(0.0).withKS(10.0).withKV(0.0); + // // Velocity PID + // private static Slot1Configs SLOT1CONFIG = + // new Slot1Configs().withKP(30.0).withKI(0.0).withKD(0.0).withKS(40.0).withKV(0.0); /** * Creates and returns the TalonFX motor controller configuration for the rotary mechanism. @@ -419,7 +426,7 @@ public class ShooterRotaryConstants { public static TalonFXConfiguration getFXConfig() { TalonFXConfiguration config = new TalonFXConfiguration(); - config.CurrentLimits.SupplyCurrentLimitEnable = false; + config.CurrentLimits.SupplyCurrentLimitEnable = Robot.isReal(); config.CurrentLimits.SupplyCurrentLimit = 40.0; config.CurrentLimits.SupplyCurrentLowerLimit = 40.0; config.CurrentLimits.SupplyCurrentLowerTime = 0.1; @@ -440,12 +447,20 @@ public static TalonFXConfiguration getFXConfig() { config.SoftwareLimitSwitch.ReverseSoftLimitThreshold = MIN_ANGLE.in(Degrees); config.Feedback.RotorToSensorRatio = ROTOR_TO_SENSOR; - config.Feedback.SensorToMechanismRatio = SENSOR_TO_MECHANISM; - config.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.RotorSensor; + if (RobotBase.isReal()) { + config.Feedback.SensorToMechanismRatio = 1 / 50; + // Positional PID + config.Slot0 = + new Slot0Configs().withKP(500.0).withKI(0.0).withKD(0.0).withKS(10.0).withKV(0.0); + // Velocity PID + config.Slot1 = + new Slot1Configs().withKP(30.0).withKI(0.0).withKD(0.0).withKS(40.0).withKV(0.0); - config.Slot0 = SLOT0CONFIG; - config.Slot1 = SLOT1CONFIG; + } else { + config.Feedback.SensorToMechanismRatio = (50.0 / 1.0); + config.Slot0 = new Slot0Configs().withKP(30.0).withKI(0.0).withKD(5.0); + } config.MotionMagic.MotionMagicCruiseVelocity = CRUISE_VELOCITY.in(RotationsPerSecond); config.MotionMagic.MotionMagicAcceleration = ACCELERATION.in(RotationsPerSecondPerSecond); @@ -473,6 +488,55 @@ public static CANcoderConfiguration getCANcoderConfig(boolean sim) { } } + // // Needs tuned + // public class ShooterTowerConstants { + // public static String NAME = "ShooterTowerFlywheel"; + + // public static final AngularVelocity MAX_VELOCITY = RadiansPerSecond.of(2 * Math.PI); + // public static final AngularAcceleration MAX_ACCELERATION = MAX_VELOCITY.per(Second); + + // private static final double GEARING = (2.0 / 1.0); + + // public static final AngularVelocity TOLERANCE = MAX_VELOCITY.times(0.1); + + // public static final DCMotor DCMOTOR = DCMotor.getKrakenX60(1); + // public static final MomentOfInertia MOI = KilogramSquareMeters.of(1.0); + + // // Velocity PID + // private static Slot0Configs SLOT0CONFIG = + // new Slot0Configs().withKP(0.0).withKI(0.0).withKD(0.0); + + // public static TalonFXConfiguration getFXConfig() { + // TalonFXConfiguration config = new TalonFXConfiguration(); + + // config.CurrentLimits.SupplyCurrentLimitEnable = Robot.isReal(); + // config.CurrentLimits.SupplyCurrentLimit = 40.0; + // config.CurrentLimits.SupplyCurrentLowerLimit = 40.0; + // config.CurrentLimits.SupplyCurrentLowerTime = 0.1; + + // config.CurrentLimits.StatorCurrentLimitEnable = Robot.isReal(); + // config.CurrentLimits.StatorCurrentLimit = 80.0; + + // config.Voltage.PeakForwardVoltage = 12.0; + // config.Voltage.PeakReverseVoltage = -12.0; + + // config.MotorOutput.NeutralMode = NeutralModeValue.Brake; + // config.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive; + + // config.SoftwareLimitSwitch.ForwardSoftLimitEnable = false; + + // config.SoftwareLimitSwitch.ReverseSoftLimitEnable = false; + + // config.Feedback.RotorToSensorRatio = 1.0; + + // config.Feedback.SensorToMechanismRatio = GEARING; + + // config.Slot0 = SLOT0CONFIG; + + // return config; + // } + // } + public static final int CANDLE_ID = 50; public class IntakeFlywheelConstants { @@ -527,8 +591,8 @@ public static CANcoderConfiguration getCANcoderConfig(boolean sim) { } // config.Slot0 = new Slot0Configs().withKP(0.75).withKI(0.0).withKD(0.0); - private static Slot0Configs SLOT0CONFIG = - new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0).withKV(0.05).withKS(8.0); + // private static Slot0Configs SLOT0CONFIG = + // new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0).withKV(0.05).withKS(8.0); public static TalonFXConfiguration getFXConfig() { TalonFXConfiguration config = new TalonFXConfiguration(); @@ -559,7 +623,12 @@ public static TalonFXConfiguration getFXConfig() { config.Feedback.SensorToMechanismRatio = GEARING; - config.Slot0 = SLOT0CONFIG; + if (RobotBase.isReal()) { + config.Slot0 = + new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0).withKV(0.05).withKS(8.0); + } else { + config.Slot0 = new Slot0Configs().withKP(0.75).withKI(0.0).withKD(0.0); + } config.MotionMagic.MotionMagicCruiseVelocity = CRUISE_VELOCITY.in(RotationsPerSecond); config.MotionMagic.MotionMagicAcceleration = ACCELERATION.in(RotationsPerSecondPerSecond); @@ -641,14 +710,13 @@ public class IntakePivotConstants { public static final DCMotor DCMOTOR = DCMotor.getKrakenX60(1); public static final MomentOfInertia MOI = KilogramSquareMeters.of(0.25); - public static final int ENCODER_CHANNEL = 9; - public static final DutyCycleEncoder ENCODER1 = - new DutyCycleEncoder(new DutyCycle(new DigitalInput(ENCODER_CHANNEL))); + // public static final int ENCODER_CHANNEL = 9; + // public static final DutyCycleEncoder ENCODER1 = + // new DutyCycleEncoder(new DutyCycle(new DigitalInput(ENCODER_CHANNEL))); + // public static final Encoder ENCODER = new Encoder(ENCODER_CHANNEL, ENCODER_CHANNEL); // Positional PID - public static final Slot0Configs SLOT_0_CONFIG = - new Slot0Configs().withKP(300.0).withKI(1000).withKD(80).withKS(8.0).withKV(0.0); // .withKG(15) // .withGravityType(GravityTypeValue.Arm_Cosine); @@ -681,7 +749,14 @@ public static TalonFXConfiguration getFXConfig() { config.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.RotorSensor; - config.Slot0 = SLOT_0_CONFIG; + if (RobotBase.isReal()) { + config.Slot0 = + new Slot0Configs().withKP(300.0).withKI(1000).withKD(80).withKS(8.0).withKV(0.0); + + } else { + config.Slot0 = + new Slot0Configs().withKP(100.0).withKI(0.0).withKD(0).withKS(0.07).withKV(0.1); + } config.MotionMagic.MotionMagicCruiseVelocity = CRUISE_VELOCITY.in(RotationsPerSecond); config.MotionMagic.MotionMagicAcceleration = ACCELERATION.in(RotationsPerSecondPerSecond); config.MotionMagic.MotionMagicJerk = JERK.in(RotationsPerSecondPerSecond.per(Second)); @@ -707,8 +782,8 @@ public class FeederConstants { public static final MomentOfInertia MOI = KilogramSquareMeters.of(1.0); // Velocity PID - private static Slot0Configs SLOT0CONFIG = - new Slot0Configs().withKP(5.0).withKI(0.0).withKD(0.0).withKV(0.05).withKS(12.0); + // private static Slot0Configs SLOT0CONFIG = + // new Slot0Configs().withKP(5.0).withKI(0.0).withKD(0.0).withKV(0.05).withKS(12.0); public static TalonFXConfiguration getFXConfig(boolean invert) { TalonFXConfiguration config = new TalonFXConfiguration(); @@ -740,7 +815,14 @@ public static TalonFXConfiguration getFXConfig(boolean invert) { config.Feedback.SensorToMechanismRatio = GEARING; - config.Slot0 = SLOT0CONFIG; + // config.Slot0 = SLOT0CONFIG; + if (RobotBase.isReal()) { + config.Slot0 = + new Slot0Configs().withKP(5.0).withKI(0.0).withKD(0.0).withKV(0.05).withKS(12.0); + + } else { + config.Slot0 = new Slot0Configs().withKP(0.0).withKI(0.0).withKD(0.0).withKS(10.0); + } return config; } @@ -813,8 +895,12 @@ public static TalonFXConfiguration getFXConfig() { config.Feedback.SensorToMechanismRatio = GEARING; - config.Slot0 = new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0); - config.Slot1 = new Slot1Configs().withKP(1).withKI(0.0).withKD(0.0); + if (Robot.isReal()) { + config.Slot0 = new Slot0Configs().withKP(10).withKI(0.0).withKD(0.0); + config.Slot1 = new Slot1Configs().withKP(1).withKI(0.0).withKD(0.0); + } else { + config.Slot0 = new Slot0Configs().withKP(0.75).withKI(0.0).withKD(0.0); + } config.MotionMagic.MotionMagicCruiseVelocity = CRUISE_VELOCITY.in(RotationsPerSecond); config.MotionMagic.MotionMagicAcceleration = ACCELERATION.in(RotationsPerSecondPerSecond); diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index ec3ff1b..7a0edc1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -89,7 +89,12 @@ public RobotContainer() { // if (Robot.isReal()) ballCounter = new BallCounter(new LaserCan(1)); // else ballCounter = null; - BaseStatusSignal.setUpdateFrequencyForAll(50.0); + // DISABLED IN SIM: BaseStatusSignal.setUpdateFrequencyForAll(50.0) was causing NT flooding + // because it sets ALL status signals to 50Hz before the module IO can set specific frequencies + // Let subsystem-specific configs handle signal frequencies instead + if (Constants.currentMode == Constants.Mode.REAL) { + BaseStatusSignal.setUpdateFrequencyForAll(50.0); + } switch (Constants.currentMode) { case REAL: @@ -118,7 +123,9 @@ public RobotContainer() { ShooterFlywheelConstants.FOLLOWER_1)), new FlywheelMechanismReal( new MotorIOTalonFX( - "ShooterTower", FeederConstants.getFXConfig(false), Ports.TowerRoller)), + FeederConstants.NAME, + FeederConstants.getFXConfig(false), + Ports.TowerRoller)), new RotaryMechanismReal( new MotorIOTalonFX( ShooterRotaryConstants.NAME, @@ -182,19 +189,18 @@ public RobotContainer() { new MotorIOTalonFXSim( ShooterFlywheelConstants.NAME, ShooterFlywheelConstants.getFXConfig(true), - Ports.RightFlywheel, - ShooterFlywheelConstants.FOLLOWER_1), + Ports.RightFlywheel), ShooterFlywheelConstants.DCMOTOR, ShooterFlywheelConstants.MOI, ShooterFlywheelConstants.TOLERANCE), new FlywheelMechanismSim( new MotorIOTalonFXSim( - ShooterFlywheelConstants.NAME, - ShooterFlywheelConstants.getFXConfig(false), + FeederConstants.NAME, + FeederConstants.getFXConfig(false), Ports.TowerRoller), - ShooterFlywheelConstants.DCMOTOR, - ShooterFlywheelConstants.MOI, - ShooterFlywheelConstants.TOLERANCE), + FeederConstants.DCMOTOR, + FeederConstants.MOI, + FeederConstants.TOLERANCE), new RotaryMechanismSim( new MotorIOTalonFXSim( ShooterRotaryConstants.NAME, @@ -202,7 +208,7 @@ public RobotContainer() { Ports.HoodMotor), ShooterRotaryConstants.DCMOTOR, ShooterRotaryConstants.MOI, - true, + false, ShooterRotaryConstants.CONSTANTS, java.util.Optional.empty())); @@ -220,7 +226,7 @@ public RobotContainer() { new MotorIOTalonFXSim( IntakePivotConstants.NAME, IntakePivotConstants.getFXConfig(), - Ports.IntakeRoller), + Ports.IntakePivot), IntakePivotConstants.DCMOTOR, IntakePivotConstants.MOI, false, @@ -349,6 +355,23 @@ private void configureButtonBindings() { // // Switch to X pattern when X button is pressed // controller.x().onTrue(Commands.runOnce(drive::stopWithX, drive)); + // controller + // .x() + // .onTrue(Commands.runOnce(() -> hopper.setGoal(HopperConstants.HOPPER_POSITION), hopper)); + + // // Commands for sim testing! + // controller.rightTrigger().onTrue(Commands.runOnce(() -> shooter.simShoot())); + + // controller + // .leftTrigger() + // .onTrue( + // Commands.runOnce( + // () -> { + // Robot.fuelSim.clearFuel(); + // Robot.fuelSim.spawnStartingFuel(); + // intake.simBalls = 0; + // })); + // Shoot controller.leftTrigger().whileTrue(shooter.runFlywheel(RotationsPerSecond.of(67))); controller.leftTrigger().onFalse(shooter.runFlywheel(RotationsPerSecond.of(0))); @@ -398,6 +421,8 @@ private void configureButtonBindings() { // controller.povLeft().onTrue(shooter.setHoodAngle(6.8)); // controller.povDown().onTrue(shooter.setHoodAngle(12.1)); // controller.povRight().onTrue(shooter.setHoodAngle(18.6)); + + // controller.povLeft().onTrue(shooter.setAngleForDistance(2.0)); } /** diff --git a/src/main/java/frc/robot/subsystems/Climber.java b/src/main/java/frc/robot/subsystems/Climber.java index 782b75e..de009ce 100644 --- a/src/main/java/frc/robot/subsystems/Climber.java +++ b/src/main/java/frc/robot/subsystems/Climber.java @@ -51,21 +51,6 @@ public boolean isAboveCurrentLimit() { // Commands.waitUntil(() -> isAboveCurrentLimit())); // } - @Override - public void periodic() { - _io.periodic(); - - // double z = Math.abs(Math.sin(Timer.getFPGATimestamp()) * 0.33); // Placeholder for position - - // // The z of the Translation3D should be - // // 'ClimberConstants.CONVERTER.toDistance(_io.getPosition()).in(Meters)', change after fixing - // // motor configs. - // Logger.recordOutput( - // "3DField/4_Climber", new Pose3d(new Translation3d(0, 0, z), new Rotation3d(0, 0, 0))); - - // _io.runVoltage(Volts.of(Math.sin(Timer.getFPGATimestamp()) * 0.25)); - } - public Command runClimber() { return this.runOnce( () -> @@ -126,4 +111,19 @@ public boolean nearGoalposition() { return false; } } + + @Override + public void periodic() { + _io.periodic(); + + // double z = Math.abs(Math.sin(Timer.getFPGATimestamp()) * 0.33); // Placeholder for position + + // // The z of the Translation3D should be + // // 'ClimberConstants.CONVERTER.toDistance(_io.getPosition()).in(Meters)', change after fixing + // // motor configs. + // Logger.recordOutput( + // "3DField/4_Climber", new Pose3d(new Translation3d(0, 0, z), new Rotation3d(0, 0, 0))); + + // _io.runVoltage(Volts.of(Math.sin(Timer.getFPGATimestamp()) * 0.25)); + } } diff --git a/src/main/java/frc/robot/subsystems/Intake.java b/src/main/java/frc/robot/subsystems/Intake.java index 3b03c9e..a919cb4 100644 --- a/src/main/java/frc/robot/subsystems/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake.java @@ -3,7 +3,6 @@ import static edu.wpi.first.units.Units.Degree; import static edu.wpi.first.units.Units.Degrees; import static edu.wpi.first.units.Units.Radians; -import static edu.wpi.first.units.Units.Rotations; import static edu.wpi.first.units.Units.RotationsPerSecond; import edu.wpi.first.math.geometry.Pose3d; @@ -120,8 +119,9 @@ public Command jostleIntake() { } public void tunePivotPosition() { - System.out.println(IntakePivotConstants.ENCODER1.get()); - _pivotIO.setEncoderPosition(Rotations.of(IntakePivotConstants.ENCODER1.get())); + // DISABLED: Encoder was disabled in Constants to fix NT flooding in sim + // System.out.println(IntakePivotConstants.ENCODER1.get()); + // _pivotIO.setEncoderPosition(Rotations.of(IntakePivotConstants.ENCODER1.get())); } public Command zeroEncoder() { diff --git a/src/main/java/frc/robot/subsystems/Shooter.java b/src/main/java/frc/robot/subsystems/Shooter.java index aa84cc8..78d0aa3 100644 --- a/src/main/java/frc/robot/subsystems/Shooter.java +++ b/src/main/java/frc/robot/subsystems/Shooter.java @@ -15,6 +15,7 @@ import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.math.geometry.Translation3d; import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap; +import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.units.Units; import edu.wpi.first.units.measure.Angle; import edu.wpi.first.units.measure.AngularVelocity; @@ -188,9 +189,7 @@ public Command runTower(AngularVelocity velocity) { public void simShoot() { if (Robot.robotContainer.intake.simBalls <= 0) return; - double flywheelSpeed = 6; Translation2d robotPose2d = Robot.robotContainer.drive.getPose().getTranslation(); - double Yaw = Robot.robotContainer.drive.getPose().getRotation().getRadians(); Pose3d robotPose3d = new Pose3d( new Translation3d(robotPose2d.getX(), robotPose2d.getY(), 0), @@ -200,10 +199,16 @@ public void simShoot() { new Translation3d(-0.0075, 0.0, 0.523), new Rotation3d(0, _hood.getPosition().in(Radians), 0)); + double flywheelSpeed = _flywheel.getVelocity().magnitude(); + + double Yaw = Robot.robotContainer.drive.getPose().getRotation().getRadians(); double V_xy = Math.sin(Math.PI / 2 - (_hood.getPosition().in(Radians) + Degrees.of(12).in(Radians))) * flywheelSpeed; + ChassisSpeeds driveChassisSpeeds = Robot.robotContainer.drive.getChassisSpeeds(); + Translation3d driveSpeed3d = new Translation3d(0.0, 0.0, 0.0); + Robot.fuelSim.spawnFuel( robotPose3d .plus( @@ -214,10 +219,14 @@ public void simShoot() { new Rotation3d(0, 0, 0))) .getTranslation(), new Translation3d( - V_xy * Math.cos(Yaw), - V_xy * Math.sin(Yaw), - Math.sin(Math.PI / 2 - (_hood.getPosition().in(Radians) + Degrees.of(12).in(Radians))) - * flywheelSpeed)); + V_xy * Math.cos(Yaw), + V_xy * Math.sin(Yaw), + Math.sin( + Math.PI / 2 + - (_hood.getPosition().in(Radians) + Degrees.of(12).in(Radians))) + * flywheelSpeed) + .plus(driveSpeed3d)); + Robot.robotContainer.intake.simBalls--; } @@ -288,9 +297,11 @@ public void periodic() { // The pitch of the Rotation3D should be '_hood.getPosition().in(Radians)', change after fixing // motor configs. - // Logger.recordOutput( - // "3DField/3_Hood", - // new Pose3d(new Translation3d(-0.0075, 0.0, 0.523), new Rotation3d(0, pitch, 0))); + Logger.recordOutput( + "3DField/3_Hood", + new Pose3d( + new Translation3d(-0.0075, 0.0, 0.523), + new Rotation3d(0, _hood.getPosition().in(Radians), 0))); // _hood.runVoltage(Volts.of(Math.sin(Timer.getFPGATimestamp()) * 0.25)); } diff --git a/src/main/java/frc/robot/subsystems/drive/ModuleIOTalonFX.java b/src/main/java/frc/robot/subsystems/drive/ModuleIOTalonFX.java index 39878e4..bb6a6d6 100644 --- a/src/main/java/frc/robot/subsystems/drive/ModuleIOTalonFX.java +++ b/src/main/java/frc/robot/subsystems/drive/ModuleIOTalonFX.java @@ -172,38 +172,28 @@ public ModuleIOTalonFX( turnAppliedVolts = turnTalon.getMotorVoltage(); turnCurrent = turnTalon.getStatorCurrent(); - // Configure periodic frames with optimized frequencies - // Odometry signals need high frequency for accurate pose estimation + // Configure periodic frames BaseStatusSignal.setUpdateFrequencyForAll( Drive.ODOMETRY_FREQUENCY, drivePosition, turnPosition); - - // Control signals need reduced frequency - BaseStatusSignal.setUpdateFrequencyForAll(50.0, driveVelocity, turnVelocity); - - // Telemetry signals can use very low frequency BaseStatusSignal.setUpdateFrequencyForAll( - 10.0, driveAppliedVolts, driveCurrent, turnAppliedVolts, turnCurrent); - - // Absolute encoder only needs very low updates since it's mainly used for initialization - BaseStatusSignal.setUpdateFrequencyForAll(20.0, turnAbsolutePosition); - - // Optimize bus utilization for each motor with longer timeout for better optimization + 50.0, + driveVelocity, + driveAppliedVolts, + driveCurrent, + turnAbsolutePosition, + turnVelocity, + turnAppliedVolts, + turnCurrent); ParentDevice.optimizeBusUtilizationForAll(driveTalon, turnTalon); - cancoder.optimizeBusUtilization(1.0); } @Override public void updateInputs(ModuleIOInputs inputs) { - // Refresh signals in priority groups - // Refresh critical odometry signals first - var driveStatus = BaseStatusSignal.refreshAll(drivePosition, driveVelocity); - var turnStatus = BaseStatusSignal.refreshAll(turnPosition, turnVelocity); - - // Refresh telemetry signals - BaseStatusSignal.refreshAll(driveAppliedVolts, driveCurrent); - BaseStatusSignal.refreshAll(turnAppliedVolts, turnCurrent); - - // Refresh absolute encoder with lower priority + // Refresh all signals + var driveStatus = + BaseStatusSignal.refreshAll(drivePosition, driveVelocity, driveAppliedVolts, driveCurrent); + var turnStatus = + BaseStatusSignal.refreshAll(turnPosition, turnVelocity, turnAppliedVolts, turnCurrent); var turnEncoderStatus = BaseStatusSignal.refreshAll(turnAbsolutePosition); // Update drive inputs diff --git a/vendordeps/AdvantageKit.json b/vendordeps/AdvantageKit.json index 868ae9d..162ad66 100644 --- a/vendordeps/AdvantageKit.json +++ b/vendordeps/AdvantageKit.json @@ -1,7 +1,7 @@ { "fileName": "AdvantageKit.json", "name": "AdvantageKit", - "version": "26.0.1", + "version": "26.0.0", "uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", "frcYear": "2026", "mavenUrls": [ @@ -12,14 +12,14 @@ { "groupId": "org.littletonrobotics.akit", "artifactId": "akit-java", - "version": "26.0.1" + "version": "26.0.0" } ], "jniDependencies": [ { "groupId": "org.littletonrobotics.akit", "artifactId": "akit-wpilibio", - "version": "26.0.1", + "version": "26.0.0", "skipInvalidPlatforms": false, "isJar": false, "validPlatforms": [ diff --git a/vendordeps/Phoenix6-26.1.1.json b/vendordeps/Phoenix6-26.1.0.json similarity index 92% rename from vendordeps/Phoenix6-26.1.1.json rename to vendordeps/Phoenix6-26.1.0.json index 7a0eca0..dc5dc62 100644 --- a/vendordeps/Phoenix6-26.1.1.json +++ b/vendordeps/Phoenix6-26.1.0.json @@ -1,7 +1,7 @@ { - "fileName": "Phoenix6-26.1.1.json", + "fileName": "Phoenix6-26.1.0.json", "name": "CTRE-Phoenix (v6)", - "version": "26.1.1", + "version": "26.1.0", "frcYear": "2026", "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", "mavenUrls": [ @@ -19,14 +19,14 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-java", - "version": "26.1.1" + "version": "26.1.0" } ], "jniDependencies": [ { "groupId": "com.ctre.phoenix6", "artifactId": "api-cpp", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -40,7 +40,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -54,7 +54,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "api-cpp-sim", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -68,7 +68,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -82,7 +82,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -96,7 +96,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -110,7 +110,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -124,7 +124,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -138,7 +138,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -152,7 +152,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -166,7 +166,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -180,7 +180,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -194,7 +194,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdi", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -208,7 +208,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdle", - "version": "26.1.1", + "version": "26.1.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -224,7 +224,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-cpp", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_Phoenix6_WPI", "headerClassifier": "headers", "sharedLibrary": true, @@ -240,7 +240,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_PhoenixTools", "headerClassifier": "headers", "sharedLibrary": true, @@ -256,7 +256,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "wpiapi-cpp-sim", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_Phoenix6_WPISim", "headerClassifier": "headers", "sharedLibrary": true, @@ -272,7 +272,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_PhoenixTools_Sim", "headerClassifier": "headers", "sharedLibrary": true, @@ -288,7 +288,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimTalonSRX", "headerClassifier": "headers", "sharedLibrary": true, @@ -304,7 +304,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimVictorSPX", "headerClassifier": "headers", "sharedLibrary": true, @@ -320,7 +320,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimPigeonIMU", "headerClassifier": "headers", "sharedLibrary": true, @@ -336,7 +336,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProTalonFX", "headerClassifier": "headers", "sharedLibrary": true, @@ -352,7 +352,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProTalonFXS", "headerClassifier": "headers", "sharedLibrary": true, @@ -368,7 +368,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProCANcoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -384,7 +384,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProPigeon2", "headerClassifier": "headers", "sharedLibrary": true, @@ -400,7 +400,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProCANrange", "headerClassifier": "headers", "sharedLibrary": true, @@ -416,7 +416,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdi", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProCANdi", "headerClassifier": "headers", "sharedLibrary": true, @@ -432,7 +432,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdle", - "version": "26.1.1", + "version": "26.1.0", "libName": "CTRE_SimProCANdle", "headerClassifier": "headers", "sharedLibrary": true, diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib.json index e8196c3..d35e593 100644 --- a/vendordeps/REVLib.json +++ b/vendordeps/REVLib.json @@ -1,7 +1,7 @@ { "fileName": "REVLib.json", "name": "REVLib", - "version": "2026.0.4", + "version": "2026.0.1", "frcYear": "2026", "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", "mavenUrls": [ @@ -12,14 +12,14 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-java", - "version": "2026.0.4" + "version": "2026.0.1" } ], "jniDependencies": [ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2026.0.4", + "version": "2026.0.1", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -34,7 +34,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "RevLibBackendDriver", - "version": "2026.0.4", + "version": "2026.0.1", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -49,7 +49,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "RevLibWpiBackendDriver", - "version": "2026.0.4", + "version": "2026.0.1", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -66,7 +66,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-cpp", - "version": "2026.0.4", + "version": "2026.0.1", "libName": "REVLib", "headerClassifier": "headers", "sharedLibrary": false, @@ -83,7 +83,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2026.0.4", + "version": "2026.0.1", "libName": "REVLibDriver", "headerClassifier": "headers", "sharedLibrary": false, @@ -100,7 +100,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "RevLibBackendDriver", - "version": "2026.0.4", + "version": "2026.0.1", "libName": "BackendDriver", "sharedLibrary": true, "skipInvalidPlatforms": true, @@ -116,7 +116,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "RevLibWpiBackendDriver", - "version": "2026.0.4", + "version": "2026.0.1", "libName": "REVLibWpi", "sharedLibrary": true, "skipInvalidPlatforms": true, diff --git a/vendordeps/photonlib.json b/vendordeps/photonlib.json index 62f135c..0a948bd 100644 --- a/vendordeps/photonlib.json +++ b/vendordeps/photonlib.json @@ -1,7 +1,7 @@ { "fileName": "photonlib.json", "name": "photonlib", - "version": "v2026.3.1", + "version": "v2026.1.1-rc-2", "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", "frcYear": "2026", "mavenUrls": [ @@ -13,7 +13,7 @@ { "groupId": "org.photonvision", "artifactId": "photontargeting-cpp", - "version": "v2026.3.1", + "version": "v2026.1.1-rc-2", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -28,7 +28,7 @@ { "groupId": "org.photonvision", "artifactId": "photonlib-cpp", - "version": "v2026.3.1", + "version": "v2026.1.1-rc-2", "libName": "photonlib", "headerClassifier": "headers", "sharedLibrary": true, @@ -43,7 +43,7 @@ { "groupId": "org.photonvision", "artifactId": "photontargeting-cpp", - "version": "v2026.3.1", + "version": "v2026.1.1-rc-2", "libName": "photontargeting", "headerClassifier": "headers", "sharedLibrary": true, @@ -60,12 +60,12 @@ { "groupId": "org.photonvision", "artifactId": "photonlib-java", - "version": "v2026.3.1" + "version": "v2026.1.1-rc-2" }, { "groupId": "org.photonvision", "artifactId": "photontargeting-java", - "version": "v2026.3.1" + "version": "v2026.1.1-rc-2" } ] } \ No newline at end of file