From 9445c309ef17270391c0ddbb75737bac6fe7cd6c Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Mon, 28 Jul 2025 18:05:22 -0500 Subject: [PATCH 1/9] r2oc --- .../pathplanner/autos/Center L4 Algae.auto | 113 +++++++++ .../deploy/pathplanner/autos/Center L4.auto | 81 +++++++ .../deploy/pathplanner/autos/NOSide 3xL4.auto | 209 +++++++++++++++++ .../pathplanner/autos/Side 2xL4 L2.auto | 215 ++++++++++++++++++ .../deploy/pathplanner/autos/Side 2xL4.auto | 164 +++++++++++++ .../deploy/pathplanner/autos/Side 3xL4.auto | 214 +++++++++++++++++ .../deploy/pathplanner/autos/Side L4.auto | 89 ++++++++ src/main/deploy/pathplanner/navgrid.json | 2 +- .../paths/CoralHToAlgaeRemove.path | 54 +++++ .../pathplanner/paths/CoralIToSource.path | 54 +++++ .../pathplanner/paths/CoralKToSource.path | 54 +++++ .../pathplanner/paths/CoralLToSource.path | 54 +++++ .../pathplanner/paths/HAlgaeToRemove.path | 54 +++++ .../paths/{Source.path => RemoveAlgaeH.path} | 28 +-- .../deploy/pathplanner/paths/SimplePath.path | 75 ------ .../pathplanner/paths/SourceToCoralK.path | 59 +++++ .../pathplanner/paths/SourceToCoralL.path | 59 +++++ .../paths/{New Path.path => ToCoralH.path} | 26 +-- .../deploy/pathplanner/paths/ToCoralI.path | 59 +++++ .../paths/TopSourceToCenterL2.path | 59 +++++ src/main/java/frc/robot/Robot.java | 4 +- src/main/java/frc/robot/RobotContainer.java | 55 ++++- .../java/frc/robot/commands/ArmCommands.java | 2 +- .../frc/robot/constants/WristConstants.java | 4 +- .../java/frc/robot/subsystems/Elevator.java | 2 +- .../java/frc/robot/subsystems/Intake.java | 6 + src/main/java/frc/robot/subsystems/Wrist.java | 51 ++++- 27 files changed, 1720 insertions(+), 126 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Center L4 Algae.auto create mode 100644 src/main/deploy/pathplanner/autos/Center L4.auto create mode 100644 src/main/deploy/pathplanner/autos/NOSide 3xL4.auto create mode 100644 src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto create mode 100644 src/main/deploy/pathplanner/autos/Side 2xL4.auto create mode 100644 src/main/deploy/pathplanner/autos/Side 3xL4.auto create mode 100644 src/main/deploy/pathplanner/autos/Side L4.auto create mode 100644 src/main/deploy/pathplanner/paths/CoralHToAlgaeRemove.path create mode 100644 src/main/deploy/pathplanner/paths/CoralIToSource.path create mode 100644 src/main/deploy/pathplanner/paths/CoralKToSource.path create mode 100644 src/main/deploy/pathplanner/paths/CoralLToSource.path create mode 100644 src/main/deploy/pathplanner/paths/HAlgaeToRemove.path rename src/main/deploy/pathplanner/paths/{Source.path => RemoveAlgaeH.path} (63%) delete mode 100644 src/main/deploy/pathplanner/paths/SimplePath.path create mode 100644 src/main/deploy/pathplanner/paths/SourceToCoralK.path create mode 100644 src/main/deploy/pathplanner/paths/SourceToCoralL.path rename src/main/deploy/pathplanner/paths/{New Path.path => ToCoralH.path} (65%) create mode 100644 src/main/deploy/pathplanner/paths/ToCoralI.path create mode 100644 src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path diff --git a/src/main/deploy/pathplanner/autos/Center L4 Algae.auto b/src/main/deploy/pathplanner/autos/Center L4 Algae.auto new file mode 100644 index 0000000..f270207 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Center L4 Algae.auto @@ -0,0 +1,113 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Wrist Out" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralH" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.45 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralHToAlgaeRemove" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "L3 Alage Remove" + } + } + ] + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.5 + } + }, + { + "type": "path", + "data": { + "pathName": "HAlgaeToRemove" + } + }, + { + "type": "path", + "data": { + "pathName": "RemoveAlgaeH" + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Center L4.auto b/src/main/deploy/pathplanner/autos/Center L4.auto new file mode 100644 index 0000000..76d7f43 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Center L4.auto @@ -0,0 +1,81 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Wrist Out" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralH" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.45 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "path", + "data": { + "pathName": "CoralHToAlgaeRemove" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.5 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto new file mode 100644 index 0000000..58a7fe3 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto @@ -0,0 +1,209 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralI" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralIToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralK" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralKToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralL" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.2 + } + }, + { + "type": "named", + "data": { + "name": "Go To L2" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto b/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto new file mode 100644 index 0000000..9693b1d --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto @@ -0,0 +1,215 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Wrist Out" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralI" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.3 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralIToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.6 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralL" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.0 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.3 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralLToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.6 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "TopSourceToCenterL2" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.1 + } + }, + { + "type": "named", + "data": { + "name": "Go To L2" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 2xL4.auto b/src/main/deploy/pathplanner/autos/Side 2xL4.auto new file mode 100644 index 0000000..0faba5c --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Side 2xL4.auto @@ -0,0 +1,164 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralI" + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.5 + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralIToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.8 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralK" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.8 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.5 + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.7 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralKToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.8 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 3xL4.auto b/src/main/deploy/pathplanner/autos/Side 3xL4.auto new file mode 100644 index 0000000..ed9e25f --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Side 3xL4.auto @@ -0,0 +1,214 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralI" + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.15 + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.35 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralIToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.8 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralK" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.1 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.1 + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.35 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralKToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.6 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "SourceToCoralL" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 1.1 + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.1 + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.35 + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side L4.auto b/src/main/deploy/pathplanner/autos/Side L4.auto new file mode 100644 index 0000000..70b6f55 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Side L4.auto @@ -0,0 +1,89 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "ToCoralI" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To L4" + } + } + ] + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Reverse Intake" + } + }, + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "CoralIToSource" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 0.4 + } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } + } + ] + } + } + ] + } + } + ] + } + }, + "resetOdom": true, + "folder": " Right", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/navgrid.json b/src/main/deploy/pathplanner/navgrid.json index bab0da9..23e0db9 100644 --- a/src/main/deploy/pathplanner/navgrid.json +++ b/src/main/deploy/pathplanner/navgrid.json @@ -1 +1 @@ -{"field_size":{"x":16.54,"y":8.21},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true],[true,true,true,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file +{"field_size":{"x":17.548,"y":8.052},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/CoralHToAlgaeRemove.path b/src/main/deploy/pathplanner/paths/CoralHToAlgaeRemove.path new file mode 100644 index 0000000..4e054da --- /dev/null +++ b/src/main/deploy/pathplanner/paths/CoralHToAlgaeRemove.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 5.78, + "y": 4.13 + }, + "prevControl": null, + "nextControl": { + "x": 6.097470632875189, + "y": 3.984296756850397 + }, + "isLocked": false, + "linkedName": "CoralH" + }, + { + "anchor": { + "x": 6.28155737704918, + "y": 4.025 + }, + "prevControl": { + "x": 5.816784891305164, + "y": 4.207795207870129 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "HAlageReady" + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 1.7, + "maxAcceleration": 1.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 180.0 + }, + "reversed": false, + "folder": "Right", + "idealStartingState": { + "velocity": 0, + "rotation": 180.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/CoralIToSource.path b/src/main/deploy/pathplanner/paths/CoralIToSource.path new file mode 100644 index 0000000..86048f1 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/CoralIToSource.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 5.301, + "y": 5.05 + }, + "prevControl": null, + "nextControl": { + "x": 4.721805898271478, + "y": 6.379917760037189 + }, + "isLocked": false, + "linkedName": "CoralI" + }, + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": { + "x": 1.6238856870446252, + "y": 6.579037229147693 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Source" + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 5.0, + "maxAcceleration": 2.25, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 1000.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 126.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": -119.99999999999999 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/CoralKToSource.path b/src/main/deploy/pathplanner/paths/CoralKToSource.path new file mode 100644 index 0000000..dc8f261 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/CoralKToSource.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 4.00389344262295, + "y": 5.2597336065573765 + }, + "prevControl": null, + "nextControl": { + "x": 2.925, + "y": 6.038934426229508 + }, + "isLocked": false, + "linkedName": "CoralK" + }, + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": { + "x": 1.8097676569992724, + "y": 6.393862605550668 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Source" + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 5.0, + "maxAcceleration": 2.25, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 900.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 126.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": -59.99999999999999 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/CoralLToSource.path b/src/main/deploy/pathplanner/paths/CoralLToSource.path new file mode 100644 index 0000000..e4f34d9 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/CoralLToSource.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.668237704918033, + "y": 5.067930327868853 + }, + "prevControl": null, + "nextControl": { + "x": 3.4806958709673737, + "y": 5.233242337470162 + }, + "isLocked": false, + "linkedName": "CoralL" + }, + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": { + "x": 1.214813908168607, + "y": 7.112932542631113 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Source" + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 2.0, + "maxAcceleration": 1.2, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 126.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": -59.99999999999999 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/HAlgaeToRemove.path b/src/main/deploy/pathplanner/paths/HAlgaeToRemove.path new file mode 100644 index 0000000..07fae7c --- /dev/null +++ b/src/main/deploy/pathplanner/paths/HAlgaeToRemove.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 6.28155737704918, + "y": 4.025 + }, + "prevControl": null, + "nextControl": { + "x": 6.042937382540423, + "y": 3.950431251716013 + }, + "isLocked": false, + "linkedName": "HAlageReady" + }, + { + "anchor": { + "x": 5.730122950819672, + "y": 3.97 + }, + "prevControl": { + "x": 6.070321154826206, + "y": 3.97 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "AlageRemove" + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 1.7, + "maxAcceleration": 1.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 180.0 + }, + "reversed": false, + "folder": "Right", + "idealStartingState": { + "velocity": 0, + "rotation": 180.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Source.path b/src/main/deploy/pathplanner/paths/RemoveAlgaeH.path similarity index 63% rename from src/main/deploy/pathplanner/paths/Source.path rename to src/main/deploy/pathplanner/paths/RemoveAlgaeH.path index 39ad90d..83412b2 100644 --- a/src/main/deploy/pathplanner/paths/Source.path +++ b/src/main/deploy/pathplanner/paths/RemoveAlgaeH.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 5.21625, - "y": 3.0304999999999995 + "x": 5.730122950819672, + "y": 3.97 }, "prevControl": null, "nextControl": { - "x": 4.797000000000001, - "y": 2.075 + "x": 6.001738466702153, + "y": 3.939984378773848 }, "isLocked": false, - "linkedName": "first" + "linkedName": "AlageRemove" }, { "anchor": { - "x": 1.1992500000000001, - "y": 0.9244999999999993 + "x": 6.245594262295082, + "y": 4.025 }, "prevControl": { - "x": 1.8915000000000002, - "y": 1.499749999999999 + "x": 5.995838872934667, + "y": 4.036056468035822 }, "nextControl": null, "isLocked": false, @@ -33,8 +33,8 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.0, - "maxAcceleration": 0.5, + "maxVelocity": 0.2, + "maxAcceleration": 0.1, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, "nominalVoltage": 12.0, @@ -42,13 +42,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": -126.40877456777238 + "rotation": 146.68936917543914 }, "reversed": false, - "folder": "Blue Right", + "folder": "Right", "idealStartingState": { "velocity": 0, - "rotation": 121.26373169437744 + "rotation": 180.0 }, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SimplePath.path b/src/main/deploy/pathplanner/paths/SimplePath.path deleted file mode 100644 index 1c1dd5c..0000000 --- a/src/main/deploy/pathplanner/paths/SimplePath.path +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 2.7931352459016394, - "y": 2.274795081967213 - }, - "prevControl": null, - "nextControl": { - "x": 2.9992128622624037, - "y": 1.917858180127682 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.292790014151457, - "y": 4.494829275372837 - }, - "prevControl": { - "x": 5.292790014151457, - "y": 3.7217006253977063 - }, - "nextControl": { - "x": 5.292790014151457, - "y": 5.182086031031642 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 12.215381640288863, - "y": 2.923206785184939 - }, - "prevControl": { - "x": 12.12956096836855, - "y": 2.4364935687758864 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 1.0, - "rotationDegrees": 90.0 - } - ], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3, - "maxAcceleration": 3, - "maxAngularVelocity": 540, - "maxAngularAcceleration": 720, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": 58.29857033049431 - }, - "reversed": false, - "folder": null, - "idealStartingState": { - "velocity": 0, - "rotation": -59.86347243867993 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralK.path b/src/main/deploy/pathplanner/paths/SourceToCoralK.path new file mode 100644 index 0000000..90c7ad2 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/SourceToCoralK.path @@ -0,0 +1,59 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": null, + "nextControl": { + "x": 2.2460313199662254, + "y": 6.940890260938448 + }, + "isLocked": false, + "linkedName": "Source" + }, + { + "anchor": { + "x": 4.00389344262295, + "y": 5.2597336065573765 + }, + "prevControl": { + "x": 3.9306689931289513, + "y": 5.502597209740501 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "CoralK" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.8443496801705674, + "rotationDegrees": -59.99999999999999 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 5.0, + "maxAcceleration": 2.25, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 850.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -59.99999999999999 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 126.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralL.path b/src/main/deploy/pathplanner/paths/SourceToCoralL.path new file mode 100644 index 0000000..b97798c --- /dev/null +++ b/src/main/deploy/pathplanner/paths/SourceToCoralL.path @@ -0,0 +1,59 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": null, + "nextControl": { + "x": 1.8504464482011718, + "y": 6.3111222410241785 + }, + "isLocked": false, + "linkedName": "Source" + }, + { + "anchor": { + "x": 3.668237704918033, + "y": 5.067930327868853 + }, + "prevControl": { + "x": 2.9373484743997063, + "y": 5.917061157261267 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "CoralL" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.8891919378698225, + "rotationDegrees": -59.99999999999999 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 5.0, + "maxAcceleration": 2.25, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 850.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -59.99999999999999 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 126.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/New Path.path b/src/main/deploy/pathplanner/paths/ToCoralH.path similarity index 65% rename from src/main/deploy/pathplanner/paths/New Path.path rename to src/main/deploy/pathplanner/paths/ToCoralH.path index a5df396..9d6185a 100644 --- a/src/main/deploy/pathplanner/paths/New Path.path +++ b/src/main/deploy/pathplanner/paths/ToCoralH.path @@ -3,29 +3,29 @@ "waypoints": [ { "anchor": { - "x": 8.079713114754098, - "y": 1.8792008196721315 + "x": 7.863934426229507, + "y": 4.13 }, "prevControl": null, "nextControl": { - "x": 6.880942622950819, - "y": 2.059016393442623 + "x": 6.863934426229508, + "y": 4.13 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 5.21625, - "y": 3.0304999999999995 + "x": 5.78, + "y": 4.13 }, "prevControl": { - "x": 5.78686475409836, - "y": 2.046069672131147 + "x": 6.223707048407509, + "y": 4.13 }, "nextControl": null, "isLocked": false, - "linkedName": "first" + "linkedName": "CoralH" } ], "rotationTargets": [], @@ -33,7 +33,7 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 3.0, + "maxVelocity": 1.7, "maxAcceleration": 1.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0, @@ -42,13 +42,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 121.26373169437744 + "rotation": 180.0 }, "reversed": false, - "folder": "Blue Right", + "folder": "Right", "idealStartingState": { "velocity": 0, - "rotation": -178.15238973400534 + "rotation": 180.0 }, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/ToCoralI.path b/src/main/deploy/pathplanner/paths/ToCoralI.path new file mode 100644 index 0000000..6a614b0 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/ToCoralI.path @@ -0,0 +1,59 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 7.204610655737704, + "y": 5.523463114754098 + }, + "prevControl": null, + "nextControl": { + "x": 5.449850400727928, + "y": 5.466020022053859 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 5.301, + "y": 5.05 + }, + "prevControl": { + "x": 5.694159836065573, + "y": 5.367622950819673 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "CoralI" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.551597941321499, + "rotationDegrees": -119.99999999999999 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 2.1, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -119.99999999999999 + }, + "reversed": false, + "folder": "Right", + "idealStartingState": { + "velocity": 0, + "rotation": 180.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path b/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path new file mode 100644 index 0000000..4c57c5f --- /dev/null +++ b/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path @@ -0,0 +1,59 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 0.7955190248842581, + "y": 7.684127965856481 + }, + "prevControl": null, + "nextControl": { + "x": 1.845663013315091, + "y": 6.388384571359108 + }, + "isLocked": false, + "linkedName": "Source" + }, + { + "anchor": { + "x": 3.2, + "y": 4.18 + }, + "prevControl": { + "x": 2.56006691261574, + "y": 4.463603877314815 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.698294193786982, + "rotationDegrees": 0.0 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 1.2, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 126.0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index dfc8ad9..2d1bde7 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -38,10 +38,10 @@ public void robotPeriodic() { double omegaRps = Units.radiansToRotations(driveState.Speeds.omegaRadiansPerSecond); var llMeasurement = LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2("limelight-fleft"); var llRMeasurement = LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2("limelight-fright"); - if (llMeasurement != null && llMeasurement.tagCount > 0 && Math.abs(omegaRps) < 2.0) { + if (llMeasurement != null && llMeasurement.tagCount > 2 && llMeasurement.tagCount != 12 && llMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { m_robotContainer.drivetrain.addVisionMeasurement(llMeasurement.pose, llMeasurement.timestampSeconds); } - if (llRMeasurement != null && llRMeasurement.tagCount > 0 && Math.abs(omegaRps) < 2.0) { + if (llRMeasurement != null && llRMeasurement.tagCount > 2 && llRMeasurement.tagCount != 12 && llRMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { m_robotContainer.drivetrain.addVisionMeasurement(llRMeasurement.pose, llRMeasurement.timestampSeconds); } } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index d1c8103..0410c5c 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,27 +4,32 @@ package frc.robot; -import static edu.wpi.first.units.Units.*; +import static edu.wpi.first.units.Units.MetersPerSecond; +import static edu.wpi.first.units.Units.RadiansPerSecond; +import static edu.wpi.first.units.Units.RotationsPerSecond; import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType; import com.ctre.phoenix6.swerve.SwerveRequest; import com.pathplanner.lib.auto.AutoBuilder; +import com.pathplanner.lib.auto.NamedCommands; +import com.pathplanner.lib.commands.PathPlannerAuto; + +import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; +import frc.robot.commands.AlignToTarget; +import frc.robot.commands.ArmCommands; +import frc.robot.commands.LEDDefaultCommand; +import frc.robot.constants.AlignmentConstants; import frc.robot.generated.TunerConstants; import frc.robot.subsystems.CommandSwerveDrivetrain; -import frc.robot.subsystems.Vision; -import frc.robot.constants.AlignmentConstants; -import frc.robot.commands.AlignToTarget; -import frc.robot.subsystems.Intake; -import frc.robot.subsystems.Wrist; import frc.robot.subsystems.Elevator; -import frc.robot.commands.ArmCommands; -import com.pathplanner.lib.auto.NamedCommands; +import frc.robot.subsystems.Intake; import frc.robot.subsystems.LEDSubsystem; -import frc.robot.commands.LEDDefaultCommand; +import frc.robot.subsystems.Vision; +import frc.robot.subsystems.Wrist; public class RobotContainer { private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond); // kSpeedAt12Volts desired top speed @@ -55,6 +60,7 @@ public class RobotContainer { private final Elevator elevator = new Elevator(); private final ArmCommands armCommands; + private final SendableChooser autoLocationChooser; private final LEDSubsystem ledSubsystem = new LEDSubsystem(0); @@ -78,6 +84,12 @@ public RobotContainer() { autoChooser = AutoBuilder.buildAutoChooser(); SmartDashboard.putData("Auto Mode", autoChooser); + autoLocationChooser = new SendableChooser<>(); + autoLocationChooser.addOption("Left", new String("Left")); + autoLocationChooser.addOption("Center", new String("Center")); + autoLocationChooser.addOption("Right", new String("Right")); + + SmartDashboard.putData("Auto Location", autoLocationChooser); // Set default command for LEDs ledSubsystem.setDefaultCommand(new LEDDefaultCommand( @@ -102,9 +114,19 @@ private void configureBindings() { ) ); + // Manual wrist control using operator right joystick Y-axis + wrist.setDefaultCommand( + wrist.run(() -> wrist.setManualControl(-operatorController.getRightY())) + ); + + // Toggle between manual and preset control with back button + operatorController.back().onTrue(wrist.toggleManualControlCommand()); + + // Zero encoder when start button is pressed + operatorController.start().onTrue(wrist.zeroEncoderCommand()); + joystick.a().whileTrue(drivetrain.applyRequest(() -> brake)); - // X button for left side targets with LED feedback joystick.x().whileTrue( new AlignToTarget(drivetrain, () -> { @@ -129,6 +151,7 @@ private void configureBindings() { ); // Combined elevator and wrist controls for all positions + // These will only work when not in manual control mode operatorController.a().onTrue(armCommands.goToL2()); // L2 position on A operatorController.b().onTrue(armCommands.goToL3()); // L3 position on B operatorController.y().onTrue(armCommands.goToL4()); // L4 position on Y @@ -147,7 +170,15 @@ private void configureBindings() { } public Command getAutonomousCommand() { - /* Run the path selected from the auto chooser */ - return autoChooser.getSelected(); + try{ + if(autoLocationChooser.getSelected().equals("Right")){ + return new PathPlannerAuto(autoChooser.getSelected().getName(), true); + }else{ + return new PathPlannerAuto(autoChooser.getSelected().getName(), false); + } + }catch(Exception e){ + DriverStation.reportError("PathPlanner ERROR: " + e.getMessage(), e.getStackTrace()); + return null; + } } } diff --git a/src/main/java/frc/robot/commands/ArmCommands.java b/src/main/java/frc/robot/commands/ArmCommands.java index 20212d4..94c2b36 100644 --- a/src/main/java/frc/robot/commands/ArmCommands.java +++ b/src/main/java/frc/robot/commands/ArmCommands.java @@ -33,7 +33,7 @@ public Command goToL4() { // Source Position with Intake Command public Command goToSource() { - return elevator.goToSourceCommand().alongWith(wrist.goToSourceCommand()).andThen(intake.startIntakeCommand()); + return elevator.goToSourceCommand().alongWith(wrist.goToSourceCommand()).andThen(intake.IntakeCommand()); } // Rest Position Command diff --git a/src/main/java/frc/robot/constants/WristConstants.java b/src/main/java/frc/robot/constants/WristConstants.java index 71e9836..7f496c7 100644 --- a/src/main/java/frc/robot/constants/WristConstants.java +++ b/src/main/java/frc/robot/constants/WristConstants.java @@ -1,8 +1,8 @@ package frc.robot.constants; public final class WristConstants { - public static final double L4_Angle = 7.4; - public static final double L3_Angle = 7; + public static final double L4_Angle = 8.2; + public static final double L3_Angle = 7.2; public static final double Source_Angle = 4.2; public static final double Rest_Angle = 0; diff --git a/src/main/java/frc/robot/subsystems/Elevator.java b/src/main/java/frc/robot/subsystems/Elevator.java index 9217309..400a657 100644 --- a/src/main/java/frc/robot/subsystems/Elevator.java +++ b/src/main/java/frc/robot/subsystems/Elevator.java @@ -49,7 +49,7 @@ private void configureMotors() { slot0.kS = 0.25; slot0.kV = 0.02; slot0.kA = 0.01; - slot0.kP = 10; + slot0.kP = 12; slot0.kI = 0; slot0.kD = 1.0; diff --git a/src/main/java/frc/robot/subsystems/Intake.java b/src/main/java/frc/robot/subsystems/Intake.java index 71d1d16..c5db02b 100644 --- a/src/main/java/frc/robot/subsystems/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake.java @@ -33,6 +33,12 @@ public Command startIntakeCommand() { ); } + public Command IntakeCommand() { + return this.runOnce( + () -> intakeMotor.set(INTAKE_SPEED) + ); + } + public Command reverseIntakeCommand() { return this.runOnce( () -> intakeMotor.set(REVERSE_SPEED) diff --git a/src/main/java/frc/robot/subsystems/Wrist.java b/src/main/java/frc/robot/subsystems/Wrist.java index 7ddd941..a008a91 100644 --- a/src/main/java/frc/robot/subsystems/Wrist.java +++ b/src/main/java/frc/robot/subsystems/Wrist.java @@ -22,6 +22,7 @@ public class Wrist extends SubsystemBase { private final SparkClosedLoopController closedLoopController; private double targetLocation = 0; private double desiredLocation = 0; + private boolean isManualControl = false; public Wrist() { wristMotor = new SparkMax(WristConstants.WRIST_MOTOR_ID, MotorType.kBrushless); @@ -50,16 +51,47 @@ public Wrist() { } public void setTargetLocation(double targetLocation) { - this.desiredLocation = targetLocation; + if (!isManualControl) { + this.desiredLocation = targetLocation; + } + } + + public void setManualControl(double speed) { + if (isManualControl) { + // Apply a deadband and limit the speed + if (Math.abs(speed) < 0.1) { + speed = 0; + } + // Limit the speed to 30% for safety + speed = speed * 0.3; + wristMotor.set(speed); + } + } + + public void toggleManualControl() { + isManualControl = !isManualControl; + if (!isManualControl) { + // When switching back to preset mode, maintain current position + desiredLocation = getCurrentAngle(); + targetLocation = desiredLocation; + } + } + + public boolean isInManualControl() { + return isManualControl; } public void resume() { - this.targetLocation = this.desiredLocation; - closedLoopController.setReference(this.targetLocation, ControlType.kMAXMotionPositionControl); + if (!isManualControl) { + this.targetLocation = this.desiredLocation; + closedLoopController.setReference(this.targetLocation, ControlType.kMAXMotionPositionControl); + } } - private void zeroEncoder() { + public void zeroEncoder() { wristMotor.getEncoder().setPosition(0); + targetLocation = 0; + desiredLocation = 0; } // Command wrappers for the preset positions @@ -79,11 +111,20 @@ public Command goToRestCommand() { return this.runOnce(() -> setTargetLocation(WristConstants.Rest_Angle)); } + public Command zeroEncoderCommand() { + return this.runOnce(this::zeroEncoder); + } + + public Command toggleManualControlCommand() { + return this.runOnce(this::toggleManualControl); + } + @Override public void periodic() { - resume(); + resume(); SmartDashboard.putNumber("Wrist Encoder Reading", wristMotor.getEncoder().getPosition()); SmartDashboard.putNumber("Wrist Target Location", targetLocation); + SmartDashboard.putBoolean("Wrist Manual Control", isManualControl); } public double getCurrentAngle() { From 903eae898bea4d2b89b7399363d9eb7d6e0ba4e2 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Mon, 25 Aug 2025 18:42:15 -0500 Subject: [PATCH 2/9] autos --- .../pathplanner/autos/Center L4 Algae.auto | 2 +- .../deploy/pathplanner/autos/Center L4.auto | 2 +- .../deploy/pathplanner/autos/NOSide 3xL4.auto | 2 +- .../pathplanner/autos/Side 2xL4 L2.auto | 2 +- .../deploy/pathplanner/autos/Side 2xL4.auto | 2 +- .../deploy/pathplanner/autos/Side 3xL4.auto | 2 +- .../deploy/pathplanner/autos/Side L4.auto | 2 +- .../deploy/pathplanner/autos/TestBlue.auto | 4 +- src/main/deploy/pathplanner/autos/Tests.auto | 2 +- .../deploy/pathplanner/paths/1M Test.path | 54 +++++++++++++++++++ .../pathplanner/paths/CoralIToSource.path | 14 ++--- .../pathplanner/paths/CoralKToSource.path | 15 ++++-- .../pathplanner/paths/CoralLToSource.path | 16 +++--- src/main/deploy/pathplanner/paths/Neath.path | 54 +++++++++++++++++++ .../pathplanner/paths/SourceToCoralK.path | 22 ++++---- .../pathplanner/paths/SourceToCoralL.path | 38 +++++++------ .../deploy/pathplanner/paths/ToCoralI.path | 24 ++++----- .../paths/TopSourceToCenterL2.path | 8 +-- src/main/deploy/pathplanner/settings.json | 20 +++---- .../frc/robot/generated/TunerConstants.java | 4 +- .../subsystems/CommandSwerveDrivetrain.java | 2 +- .../java/frc/robot/subsystems/Elevator.java | 14 ++--- .../java/frc/robot/subsystems/Vision.java | 2 +- 23 files changed, 214 insertions(+), 93 deletions(-) create mode 100644 src/main/deploy/pathplanner/paths/1M Test.path create mode 100644 src/main/deploy/pathplanner/paths/Neath.path diff --git a/src/main/deploy/pathplanner/autos/Center L4 Algae.auto b/src/main/deploy/pathplanner/autos/Center L4 Algae.auto index f270207..dd87fb7 100644 --- a/src/main/deploy/pathplanner/autos/Center L4 Algae.auto +++ b/src/main/deploy/pathplanner/autos/Center L4 Algae.auto @@ -108,6 +108,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Center L4.auto b/src/main/deploy/pathplanner/autos/Center L4.auto index 76d7f43..9ed122f 100644 --- a/src/main/deploy/pathplanner/autos/Center L4.auto +++ b/src/main/deploy/pathplanner/autos/Center L4.auto @@ -76,6 +76,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto index 58a7fe3..634b69b 100644 --- a/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto +++ b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto @@ -204,6 +204,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto b/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto index 9693b1d..11cb565 100644 --- a/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto +++ b/src/main/deploy/pathplanner/autos/Side 2xL4 L2.auto @@ -210,6 +210,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 2xL4.auto b/src/main/deploy/pathplanner/autos/Side 2xL4.auto index 0faba5c..236c70c 100644 --- a/src/main/deploy/pathplanner/autos/Side 2xL4.auto +++ b/src/main/deploy/pathplanner/autos/Side 2xL4.auto @@ -159,6 +159,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side 3xL4.auto b/src/main/deploy/pathplanner/autos/Side 3xL4.auto index ed9e25f..2ca3a25 100644 --- a/src/main/deploy/pathplanner/autos/Side 3xL4.auto +++ b/src/main/deploy/pathplanner/autos/Side 3xL4.auto @@ -209,6 +209,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Side L4.auto b/src/main/deploy/pathplanner/autos/Side L4.auto index 70b6f55..3c9224c 100644 --- a/src/main/deploy/pathplanner/autos/Side L4.auto +++ b/src/main/deploy/pathplanner/autos/Side L4.auto @@ -84,6 +84,6 @@ } }, "resetOdom": true, - "folder": " Right", + "folder": null, "choreoAuto": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/TestBlue.auto b/src/main/deploy/pathplanner/autos/TestBlue.auto index b7f38e9..8961b98 100644 --- a/src/main/deploy/pathplanner/autos/TestBlue.auto +++ b/src/main/deploy/pathplanner/autos/TestBlue.auto @@ -11,7 +11,7 @@ { "type": "path", "data": { - "pathName": "New Path" + "pathName": null } }, { @@ -36,7 +36,7 @@ { "type": "path", "data": { - "pathName": "Source" + "pathName": null } }, { diff --git a/src/main/deploy/pathplanner/autos/Tests.auto b/src/main/deploy/pathplanner/autos/Tests.auto index e8c593b..bccbeec 100644 --- a/src/main/deploy/pathplanner/autos/Tests.auto +++ b/src/main/deploy/pathplanner/autos/Tests.auto @@ -7,7 +7,7 @@ { "type": "path", "data": { - "pathName": "SimplePath" + "pathName": "Neath" } } ] diff --git a/src/main/deploy/pathplanner/paths/1M Test.path b/src/main/deploy/pathplanner/paths/1M Test.path new file mode 100644 index 0000000..d6b2f77 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/1M Test.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 2.0, + "y": 7.0 + }, + "prevControl": null, + "nextControl": { + "x": 3.0, + "y": 7.0 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 3.0, + "y": 7.0 + }, + "prevControl": { + "x": 2.0, + "y": 7.0 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 700.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/CoralIToSource.path b/src/main/deploy/pathplanner/paths/CoralIToSource.path index 86048f1..08abd48 100644 --- a/src/main/deploy/pathplanner/paths/CoralIToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralIToSource.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": { - "x": 1.6238856870446252, - "y": 6.579037229147693 + "x": 2.503220820260696, + "y": 6.301000893122627 }, "nextControl": null, "isLocked": false, @@ -33,10 +33,10 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 5.0, - "maxAcceleration": 2.25, + "maxVelocity": 3.0, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 1000.0, + "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, "unlimited": false }, diff --git a/src/main/deploy/pathplanner/paths/CoralKToSource.path b/src/main/deploy/pathplanner/paths/CoralKToSource.path index dc8f261..37c60a6 100644 --- a/src/main/deploy/pathplanner/paths/CoralKToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralKToSource.path @@ -16,19 +16,24 @@ }, { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": { - "x": 1.8097676569992724, - "y": 6.393862605550668 + "x": 2.689102790215343, + "y": 6.115826269525601 }, "nextControl": null, "isLocked": false, "linkedName": "Source" } ], - "rotationTargets": [], + "rotationTargets": [ + { + "waypointRelativePos": 0.8228552476415096, + "rotationDegrees": 119.99999999999999 + } + ], "constraintZones": [], "pointTowardsZones": [], "eventMarkers": [], diff --git a/src/main/deploy/pathplanner/paths/CoralLToSource.path b/src/main/deploy/pathplanner/paths/CoralLToSource.path index e4f34d9..65a8fb3 100644 --- a/src/main/deploy/pathplanner/paths/CoralLToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralLToSource.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": { - "x": 1.214813908168607, - "y": 7.112932542631113 + "x": 2.0941490413846777, + "y": 6.834896206606047 }, "nextControl": null, "isLocked": false, @@ -33,10 +33,10 @@ "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 2.0, - "maxAcceleration": 1.2, + "maxVelocity": 3.0, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, + "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, "unlimited": false }, @@ -48,7 +48,7 @@ "folder": null, "idealStartingState": { "velocity": 0, - "rotation": -59.99999999999999 + "rotation": -53.42674645539572 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Neath.path b/src/main/deploy/pathplanner/paths/Neath.path new file mode 100644 index 0000000..cb90582 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Neath.path @@ -0,0 +1,54 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 2.0, + "y": 7.0 + }, + "prevControl": null, + "nextControl": { + "x": 3.0, + "y": 7.0 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 4.477816290604441, + "y": 5.9570469906455585 + }, + "prevControl": { + "x": 3.4778162906044408, + "y": 5.9570469906455585 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 700.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -91.03333967404583 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 0.0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralK.path b/src/main/deploy/pathplanner/paths/SourceToCoralK.path index 90c7ad2..386895d 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralK.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralK.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": null, "nextControl": { - "x": 2.2460313199662254, - "y": 6.940890260938448 + "x": 3.1253664531822962, + "y": 6.662853924913382 }, "isLocked": false, "linkedName": "Source" @@ -30,23 +30,23 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.8443496801705674, - "rotationDegrees": -59.99999999999999 + "waypointRelativePos": 0.46130601415094313, + "rotationDegrees": -38.0 } ], "constraintZones": [], "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 5.0, - "maxAcceleration": 2.25, + "maxVelocity": 3.0, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 850.0, + "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { - "velocity": 0, + "velocity": 0.0, "rotation": -59.99999999999999 }, "reversed": false, @@ -55,5 +55,5 @@ "velocity": 0, "rotation": 126.0 }, - "useDefaultConstraints": false + "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralL.path b/src/main/deploy/pathplanner/paths/SourceToCoralL.path index b97798c..232bb71 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralL.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralL.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": null, "nextControl": { - "x": 1.8504464482011718, - "y": 6.3111222410241785 + "x": 1.9762843081825656, + "y": 7.136007208573191 }, "isLocked": false, "linkedName": "Source" @@ -20,34 +20,40 @@ "y": 5.067930327868853 }, "prevControl": { - "x": 2.9373484743997063, - "y": 5.917061157261267 + "x": 3.492042439736339, + "y": 5.24528654717777 }, "nextControl": null, "isLocked": false, "linkedName": "CoralL" } ], - "rotationTargets": [ + "rotationTargets": [], + "constraintZones": [], + "pointTowardsZones": [ { - "waypointRelativePos": 0.8891919378698225, - "rotationDegrees": -59.99999999999999 + "fieldPosition": { + "x": 3.9, + "y": 4.7 + }, + "rotationOffset": 0.0, + "minWaypointRelativePos": 0.6353441988330342, + "maxWaypointRelativePos": 0.7425100987432677, + "name": "Point Towards Zone" } ], - "constraintZones": [], - "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 5.0, - "maxAcceleration": 2.25, + "maxVelocity": 3.0, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 850.0, + "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { "velocity": 0, - "rotation": -59.99999999999999 + "rotation": -53.42674645539572 }, "reversed": false, "folder": null, @@ -55,5 +61,5 @@ "velocity": 0, "rotation": 126.0 }, - "useDefaultConstraints": false + "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/ToCoralI.path b/src/main/deploy/pathplanner/paths/ToCoralI.path index 6a614b0..78189b1 100644 --- a/src/main/deploy/pathplanner/paths/ToCoralI.path +++ b/src/main/deploy/pathplanner/paths/ToCoralI.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 7.204610655737704, - "y": 5.523463114754098 + "x": 7.0651512016684315, + "y": 5.185588254766949 }, "prevControl": null, "nextControl": { - "x": 5.449850400727928, - "y": 5.466020022053859 + "x": 6.511291297007415, + "y": 5.217154396186441 }, "isLocked": false, "linkedName": null @@ -20,8 +20,8 @@ "y": 5.05 }, "prevControl": { - "x": 5.694159836065573, - "y": 5.367622950819673 + "x": 5.380760163897091, + "y": 5.286935257517975 }, "nextControl": null, "isLocked": false, @@ -30,7 +30,7 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.551597941321499, + "waypointRelativePos": 0.8743980935534592, "rotationDegrees": -119.99999999999999 } ], @@ -39,9 +39,9 @@ "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, - "maxAcceleration": 2.1, + "maxAcceleration": 3.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, + "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, "unlimited": false }, @@ -50,10 +50,10 @@ "rotation": -119.99999999999999 }, "reversed": false, - "folder": "Right", + "folder": null, "idealStartingState": { "velocity": 0, - "rotation": 180.0 + "rotation": -162.15984638114017 }, - "useDefaultConstraints": false + "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path b/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path index 4c57c5f..d1050af 100644 --- a/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path +++ b/src/main/deploy/pathplanner/paths/TopSourceToCenterL2.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 0.7955190248842581, - "y": 7.684127965856481 + "x": 1.674854158100329, + "y": 7.406091629831415 }, "prevControl": null, "nextControl": { - "x": 1.845663013315091, - "y": 6.388384571359108 + "x": 2.724998146531161, + "y": 6.110348235334041 }, "isLocked": false, "linkedName": "Source" diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index fe265aa..9ed4f8e 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -11,17 +11,17 @@ "defaultMaxVel": 3.0, "defaultMaxAccel": 3.0, "defaultMaxAngVel": 540.0, - "defaultMaxAngAccel": 720.0, + "defaultMaxAngAccel": 700.0, "defaultNominalVoltage": 12.0, - "robotMass": 75.0, - "robotMOI": 6.883, + "robotMass": 60.419, + "robotMOI": 7.9647, "robotTrackwidth": 0.5588, "driveWheelRadius": 0.05504, - "driveGearing": 7.363636, - "maxDriveSpeed": 4.7, - "driveMotorType": "krakenX60FOC", - "driveCurrentLimit": 120.0, - "wheelCOF": 1.7, + "driveGearing": 7.67, + "maxDriveSpeed": 4.16, + "driveMotorType": "krakenX60", + "driveCurrentLimit": 85.0, + "wheelCOF": 1.0, "flModuleX": 0.267, "flModuleY": 0.2667, "frModuleX": 0.267, @@ -32,5 +32,7 @@ "brModuleY": -0.267, "bumperOffsetX": 0.0, "bumperOffsetY": 0.0, - "robotFeatures": [] + "robotFeatures": [ + "{\"name\":\"Rectangle\",\"type\":\"rounded_rect\",\"data\":{\"center\":{\"x\":0.2,\"y\":0.0},\"size\":{\"width\":0.4,\"length\":0.1},\"borderRadius\":0.02,\"strokeWidth\":0.02,\"filled\":false}}" + ] } \ No newline at end of file diff --git a/src/main/java/frc/robot/generated/TunerConstants.java b/src/main/java/frc/robot/generated/TunerConstants.java index 9a22610..6aa4b11 100644 --- a/src/main/java/frc/robot/generated/TunerConstants.java +++ b/src/main/java/frc/robot/generated/TunerConstants.java @@ -76,11 +76,11 @@ public class TunerConstants { // This needs to be tuned to your individual robot public static final LinearVelocity kSpeedAt12Volts = MetersPerSecond.of(4.73); - // Every 1 rotation of the azimuth results in kCoupleRatio drive motor turns; + // Every 1 rotation of the azimuth results in kCoupleRatio drive motor turns;😍 // This may need to be tuned to your individual robot private static final double kCoupleRatio = 3.5; - private static final double kDriveGearRatio = 6.39; + private static final double kDriveGearRatio = 7.8; private static final double kSteerGearRatio = 12.1; private static final Distance kWheelRadius = Inches.of(2); diff --git a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java index 0241673..e29236c 100644 --- a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java +++ b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java @@ -328,7 +328,7 @@ public void addVisionMeasurement( // Update gyro yaw to match vision when we have high confidence measurements double rotationConfidence = visionMeasurementStdDevs.get(2, 0); - if (rotationConfidence < 0.1) { // Only update if rotation confidence is high + if (rotationConfidence < 0.06) { // Only update if rotation confidence is high // Calculate the difference between current and vision rotation Rotation2d currentRotation = getState().Pose.getRotation(); Rotation2d visionRotation = visionRobotPoseMeters.getRotation(); diff --git a/src/main/java/frc/robot/subsystems/Elevator.java b/src/main/java/frc/robot/subsystems/Elevator.java index 400a657..38f0f64 100644 --- a/src/main/java/frc/robot/subsystems/Elevator.java +++ b/src/main/java/frc/robot/subsystems/Elevator.java @@ -40,18 +40,18 @@ private void configureMotors() { // Configure Motion Magic MotionMagicConfigs mm = config.MotionMagic; - mm.withMotionMagicCruiseVelocity(39.27) - .withMotionMagicAcceleration(59.54) - .withMotionMagicJerk(100.08); + mm.withMotionMagicCruiseVelocity(84.27) + .withMotionMagicAcceleration(100.54) + .withMotionMagicJerk(140.08); // Configure PID values Slot0Configs slot0 = config.Slot0; - slot0.kS = 0.25; + slot0.kS = 0.4; slot0.kV = 0.02; - slot0.kA = 0.01; - slot0.kP = 12; + slot0.kA = 0.001; + slot0.kP = 30; slot0.kI = 0; - slot0.kD = 1.0; + slot0.kD = .5; // Set to brake mode config.MotorOutput.NeutralMode = NeutralModeValue.Brake; diff --git a/src/main/java/frc/robot/subsystems/Vision.java b/src/main/java/frc/robot/subsystems/Vision.java index f7ad45e..1317601 100644 --- a/src/main/java/frc/robot/subsystems/Vision.java +++ b/src/main/java/frc/robot/subsystems/Vision.java @@ -122,7 +122,7 @@ private boolean shouldRejectUpdate(PoseEstimate estimate, double maxDistance) { } if (estimate.tagCount == 1 && estimate.rawFiducials.length == 1) { - if (estimate.rawFiducials[0].ambiguity > 0.3) { + if (estimate.rawFiducials[0].ambiguity > 0.2) { return true; } if (estimate.rawFiducials[0].distToCamera > maxDistance) { From 45b6b1a6ff4fb6b244cb6c5bfa1b6588ade77888 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Mon, 15 Sep 2025 18:25:33 -0500 Subject: [PATCH 3/9] vision --- src/main/deploy/pathplanner/settings.json | 4 ++-- src/main/java/frc/robot/Telemetry.java | 3 ++- src/main/java/frc/robot/subsystems/Vision.java | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index 9ed4f8e..cd21742 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -1,6 +1,6 @@ { - "robotWidth": 0.8636, - "robotLength": 0.9144, + "robotWidth": 0.864, + "robotLength": 0.914, "holonomicMode": true, "pathFolders": [ "Blue Right" diff --git a/src/main/java/frc/robot/Telemetry.java b/src/main/java/frc/robot/Telemetry.java index 3e6ccce..88e4415 100644 --- a/src/main/java/frc/robot/Telemetry.java +++ b/src/main/java/frc/robot/Telemetry.java @@ -11,6 +11,7 @@ import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.networktables.StringPublisher; + import edu.wpi.first.networktables.StructArrayPublisher; import edu.wpi.first.networktables.StructPublisher; import edu.wpi.first.wpilibj.smartdashboard.Mechanism2d; @@ -52,7 +53,7 @@ public Telemetry(double maxSpeed) { /* Mechanisms to represent the swerve module states */ private final Mechanism2d[] m_moduleMechanisms = new Mechanism2d[] { - new Mechanism2d(1, 1), + new Mechanism2d(2, 1), new Mechanism2d(1, 1), new Mechanism2d(1, 1), new Mechanism2d(1, 1), diff --git a/src/main/java/frc/robot/subsystems/Vision.java b/src/main/java/frc/robot/subsystems/Vision.java index 1317601..b9b171d 100644 --- a/src/main/java/frc/robot/subsystems/Vision.java +++ b/src/main/java/frc/robot/subsystems/Vision.java @@ -64,7 +64,11 @@ private void updatePoseEstimates() { double[] stdDevs = calculateStdDevs(fright); drivetrain.addVisionMeasurement( - fright.pose, + new Pose2d( + fright.pose.getX(), + fright.pose.getY(), + fright.pose.getRotation() + ), fright.timestampSeconds, VecBuilder.fill(stdDevs[0], stdDevs[1], stdDevs[2]) ); @@ -78,8 +82,8 @@ private double[] calculateStdDevs(PoseEstimate estimate) { if (estimate.tagCount >= 2) { // Multiple tags give us much better confidence - xyStdDev = 0.1; - thetaStdDev = 0.05; + xyStdDev = 0.3; + thetaStdDev = 0.2; // Still adjust for distance to closest tag double minDist = Double.POSITIVE_INFINITY; From a194328a19357d3048eda57309dc71c8a1692af9 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Mon, 13 Oct 2025 13:20:07 -0500 Subject: [PATCH 4/9] GRC-CompCode --- .../frc/robot/constants/ClimbConstants.java | 10 +++ src/main/java/frc/robot/subsystems/Climb.java | 88 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 src/main/java/frc/robot/constants/ClimbConstants.java create mode 100644 src/main/java/frc/robot/subsystems/Climb.java diff --git a/src/main/java/frc/robot/constants/ClimbConstants.java b/src/main/java/frc/robot/constants/ClimbConstants.java new file mode 100644 index 0000000..0c12cab --- /dev/null +++ b/src/main/java/frc/robot/constants/ClimbConstants.java @@ -0,0 +1,10 @@ +package frc.robot.constants; + +public class ClimbConstants { + public static double climbTargetRise = 0.56; + public static double climbTargetRest = 0.29; + public static double climbTargetClimb = 0.36; + + //Motor configuartion + public static final int CLIMB_CAN_ID = 21; +} diff --git a/src/main/java/frc/robot/subsystems/Climb.java b/src/main/java/frc/robot/subsystems/Climb.java new file mode 100644 index 0000000..100e2e9 --- /dev/null +++ b/src/main/java/frc/robot/subsystems/Climb.java @@ -0,0 +1,88 @@ +package frc.robot.subsystems; + +import com.revrobotics.spark.SparkAbsoluteEncoder; +import com.revrobotics.spark.SparkBase.ControlType; +import com.revrobotics.spark.SparkBase.PersistMode; +import com.revrobotics.spark.SparkBase.ResetMode; +import com.revrobotics.spark.SparkClosedLoopController; +import com.revrobotics.spark.SparkLowLevel.MotorType; +import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.ClosedLoopConfig.FeedbackSensor; +import com.revrobotics.spark.config.SparkBaseConfig.IdleMode; +import com.revrobotics.spark.config.SparkMaxConfig; + +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; +import edu.wpi.first.wpilibj2.command.Command; +import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.constants.ClimbConstants; + +public class Climb extends SubsystemBase { + private final SparkMax climbMotor; + private final SparkClosedLoopController closedLoopController; + private final SparkAbsoluteEncoder absoluteEncoder; + private double targetLocation = 0; + + + public Climb() { + climbMotor = new SparkMax(ClimbConstants.CLIMB_CAN_ID, MotorType.kBrushless); + closedLoopController = climbMotor.getClosedLoopController(); + + absoluteEncoder = climbMotor.getAbsoluteEncoder(); + + // Get the absolute encoder + + // Config + SparkMaxConfig config = new SparkMaxConfig(); + config.inverted(false); + config.idleMode(IdleMode.kBrake) + .smartCurrentLimit(50) + .voltageCompensation(12); + config.softLimit + .reverseSoftLimit(0.260); + config.softLimit + .forwardSoftLimit(0.590); + + // Tell Spark to use absolute encoder + config.closedLoop + .feedbackSensor(FeedbackSensor.kAbsoluteEncoder) + .p(4) + .i(0.0) + .d(0.0) + .outputRange(-1.0, 1.0) + .maxMotion + .maxVelocity(5000) + .maxAcceleration(8000) + .allowedClosedLoopError(0.01); + + climbMotor.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters); + } + + public void setTargetLocation(double target) { + this.targetLocation = target; + closedLoopController.setReference(this.targetLocation, ControlType.kMAXMotionPositionControl); + } + + // === Preset Commands === + public Command goToRise() { + return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetRise)); + } + public Command goToRest() { + return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetRest)); + } + public Command manualClimb(){ + return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetClimb)); + // return this.startEnd( + // () -> climbMotor.set(-0.1), + // () -> climbMotor.set(0.0)); + } + + @Override + public void periodic() { + SmartDashboard.putNumber("Climb Absolute Encoder", absoluteEncoder.getPosition()); + SmartDashboard.putNumber("Climb Target Location", targetLocation); + } + + public double getCurrentAngle() { + return absoluteEncoder.getPosition(); + } +} From 691a5f25d63bd072cbdb98c4870729d25217b098 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Mon, 13 Oct 2025 13:21:20 -0500 Subject: [PATCH 5/9] GRC-CompCode new auto, climb --- .../deploy/pathplanner/paths/CoralIToSource.path | 8 ++++---- .../deploy/pathplanner/paths/CoralKToSource.path | 8 ++++---- .../deploy/pathplanner/paths/CoralLToSource.path | 8 ++++---- .../deploy/pathplanner/paths/SourceToCoralK.path | 8 ++++---- .../deploy/pathplanner/paths/SourceToCoralL.path | 8 ++++---- src/main/deploy/pathplanner/paths/ToCoralI.path | 15 +++++---------- src/main/java/frc/robot/RobotContainer.java | 12 ++++++++++++ 7 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/main/deploy/pathplanner/paths/CoralIToSource.path b/src/main/deploy/pathplanner/paths/CoralIToSource.path index 08abd48..5747809 100644 --- a/src/main/deploy/pathplanner/paths/CoralIToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralIToSource.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 5.301, - "y": 5.05 + "x": 5.315, + "y": 5.12 }, "prevControl": null, "nextControl": { - "x": 4.721805898271478, - "y": 6.379917760037189 + "x": 4.735805898271483, + "y": 6.449917760037189 }, "isLocked": false, "linkedName": "CoralI" diff --git a/src/main/deploy/pathplanner/paths/CoralKToSource.path b/src/main/deploy/pathplanner/paths/CoralKToSource.path index 37c60a6..f661abb 100644 --- a/src/main/deploy/pathplanner/paths/CoralKToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralKToSource.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 4.00389344262295, - "y": 5.2597336065573765 + "x": 3.9605479600694435, + "y": 5.287121672453703 }, "prevControl": null, "nextControl": { - "x": 2.925, - "y": 6.038934426229508 + "x": 2.881654517446493, + "y": 6.066322492125835 }, "isLocked": false, "linkedName": "CoralK" diff --git a/src/main/deploy/pathplanner/paths/CoralLToSource.path b/src/main/deploy/pathplanner/paths/CoralLToSource.path index 65a8fb3..79098e5 100644 --- a/src/main/deploy/pathplanner/paths/CoralLToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralLToSource.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 3.668237704918033, - "y": 5.067930327868853 + "x": 3.6332837818287027, + "y": 5.095130570023148 }, "prevControl": null, "nextControl": { - "x": 3.4806958709673737, - "y": 5.233242337470162 + "x": 3.4457419478780436, + "y": 5.260442579624457 }, "isLocked": false, "linkedName": "CoralL" diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralK.path b/src/main/deploy/pathplanner/paths/SourceToCoralK.path index 386895d..00c9fc3 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralK.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralK.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 4.00389344262295, - "y": 5.2597336065573765 + "x": 3.9605479600694435, + "y": 5.287121672453703 }, "prevControl": { - "x": 3.9306689931289513, - "y": 5.502597209740501 + "x": 3.8873235105754445, + "y": 5.529985275636828 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralL.path b/src/main/deploy/pathplanner/paths/SourceToCoralL.path index 232bb71..5d43e65 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralL.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralL.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 3.668237704918033, - "y": 5.067930327868853 + "x": 3.6332837818287027, + "y": 5.095130570023148 }, "prevControl": { - "x": 3.492042439736339, - "y": 5.24528654717777 + "x": 3.457088516647009, + "y": 5.272486789332065 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/ToCoralI.path b/src/main/deploy/pathplanner/paths/ToCoralI.path index 78189b1..7b8149c 100644 --- a/src/main/deploy/pathplanner/paths/ToCoralI.path +++ b/src/main/deploy/pathplanner/paths/ToCoralI.path @@ -16,24 +16,19 @@ }, { "anchor": { - "x": 5.301, - "y": 5.05 + "x": 5.3215, + "y": 5.12 }, "prevControl": { - "x": 5.380760163897091, - "y": 5.286935257517975 + "x": 5.401260163897093, + "y": 5.356935257517975 }, "nextControl": null, "isLocked": false, "linkedName": "CoralI" } ], - "rotationTargets": [ - { - "waypointRelativePos": 0.8743980935534592, - "rotationDegrees": -119.99999999999999 - } - ], + "rotationTargets": [], "constraintZones": [], "pointTowardsZones": [], "eventMarkers": [], diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 0410c5c..a6dbd51 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -30,6 +30,7 @@ import frc.robot.subsystems.LEDSubsystem; import frc.robot.subsystems.Vision; import frc.robot.subsystems.Wrist; +import frc.robot.subsystems.Climb; public class RobotContainer { private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond); // kSpeedAt12Volts desired top speed @@ -58,6 +59,7 @@ public class RobotContainer { private final Intake intake = new Intake(); private final Wrist wrist = new Wrist(); private final Elevator elevator = new Elevator(); + private final Climb climber = new Climb(); private final ArmCommands armCommands; private final SendableChooser autoLocationChooser; @@ -165,6 +167,16 @@ private void configureBindings() { operatorController.rightBumper().onTrue( intake.stopIntakeCommand().alongWith(armCommands.goToRest()) ); + joystick.y().onTrue( + climber.goToRise() + ); + + joystick.a().onTrue( + climber.goToRest() + ); + joystick.rightBumper().onTrue( + climber.manualClimb() + ); drivetrain.registerTelemetry(logger::telemeterize); } From 2041e200245df8f94b52d1fb784610f724067666 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Tue, 14 Oct 2025 19:54:26 -0500 Subject: [PATCH 6/9] RedAutoAlign-WristEncoder --- src/main/java/frc/robot/RobotContainer.java | 2 +- .../frc/robot/commands/AlignToTarget.java | 32 +++++++++++++++---- src/main/java/frc/robot/subsystems/Wrist.java | 15 +++++++-- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index a6dbd51..c07d44c 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -125,7 +125,7 @@ private void configureBindings() { operatorController.back().onTrue(wrist.toggleManualControlCommand()); // Zero encoder when start button is pressed - operatorController.start().onTrue(wrist.zeroEncoderCommand()); + operatorController.start().onTrue(wrist.zeroEncoderAbsCommand()); joystick.a().whileTrue(drivetrain.applyRequest(() -> brake)); diff --git a/src/main/java/frc/robot/commands/AlignToTarget.java b/src/main/java/frc/robot/commands/AlignToTarget.java index deb7846..64dc6b1 100644 --- a/src/main/java/frc/robot/commands/AlignToTarget.java +++ b/src/main/java/frc/robot/commands/AlignToTarget.java @@ -3,6 +3,9 @@ import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.controller.PIDController; import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.wpilibj.DriverStation; +import edu.wpi.first.wpilibj.DriverStation.Alliance; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.constants.AlignmentConstants; import frc.robot.subsystems.CommandSwerveDrivetrain; @@ -19,11 +22,12 @@ public class AlignToTarget extends Command { private final PIDController rotationController; private final SwerveRequest.FieldCentric fieldCentric = new SwerveRequest.FieldCentric(); private static final double ACTIVATION_DISTANCE_METERS = 1; - private static final double SLOW_DOWN_DISTANCE_METERS = 0.127; // 5 inches in meters - private static final double MAX_SPEED_FAR = 6.0; // Increased from 4.0 to 6.0 m/s - private static final double MAX_SPEED_NEAR = 3.0; // Increased from 2.0 to 3.0 m/s + private static final double SLOW_DOWN_DISTANCE_METERS = 0.15048; // 12 inches in meters + private static final double MAX_SPEED_FAR = 3.0; // Increased from 4.0 to 6.0 m/s + private static final double MAX_SPEED_NEAR = 0.25; // Increased from 2.0 to 3.0 m/s private static final double MAX_ROTATION_SPEED_FAR = 8.0; // Increased from 4.0 to 8.0 rad/s private static final double MAX_ROTATION_SPEED_NEAR = 4.0; // Increased from 2.0 to 4.0 rad/s + private boolean isRedAlliance; public AlignToTarget(CommandSwerveDrivetrain drivetrain, Supplier targetPoseSupplier) { this.drivetrain = drivetrain; @@ -57,6 +61,11 @@ public AlignToTarget(CommandSwerveDrivetrain drivetrain, Supplier target @Override public void initialize() { targetPose = targetPoseSupplier.get(); + isRedAlliance = DriverStation.getAlliance().isPresent() && + DriverStation.getAlliance().get() == Alliance.Red; + + // If on red alliance, invert X and Y coordinates + xController.setSetpoint(targetPose.getX()); yController.setSetpoint(targetPose.getY()); rotationController.setSetpoint(targetPose.getRotation().getRadians()); @@ -71,8 +80,10 @@ public boolean isFinished() { currentPose.getX(), currentPose.getY() ).getDistance( + new Translation2d( - targetPose.getX(), + + targetPose.getX(), targetPose.getY() ) ); @@ -105,12 +116,19 @@ public void execute() { // Only run alignment if we're within activation distance if (distance <= ACTIVATION_DISTANCE_METERS) { - double xSpeed = xController.calculate(currentPose.getX()); - double ySpeed = yController.calculate(currentPose.getY()); + double xSpeed = xController.calculate(currentPose.getX(), targetPose.getX()); + double ySpeed = yController.calculate(currentPose.getY(), targetPose.getY()); double rotationSpeed = rotationController.calculate( - currentPose.getRotation().getRadians() + currentPose.getRotation().getRadians(), + targetPose.getRotation().getRadians() ); + // Invert X and Y speeds if on red alliance since we're using field-oriented control + if (isRedAlliance) { + xSpeed = -xSpeed; + ySpeed = -ySpeed; + } + // Calculate speed limits based on distance double speedScale; double rotationScale; diff --git a/src/main/java/frc/robot/subsystems/Wrist.java b/src/main/java/frc/robot/subsystems/Wrist.java index a008a91..085e309 100644 --- a/src/main/java/frc/robot/subsystems/Wrist.java +++ b/src/main/java/frc/robot/subsystems/Wrist.java @@ -4,8 +4,6 @@ import com.revrobotics.spark.SparkBase.PersistMode; import com.revrobotics.spark.SparkBase.ResetMode; import com.revrobotics.spark.SparkClosedLoopController; -import com.revrobotics.spark.SparkLimitSwitch; -import com.revrobotics.spark.SparkLowLevel; import com.revrobotics.spark.SparkLowLevel.MotorType; import com.revrobotics.spark.SparkMax; import com.revrobotics.spark.config.ClosedLoopConfig.FeedbackSensor; @@ -63,7 +61,7 @@ public void setManualControl(double speed) { speed = 0; } // Limit the speed to 30% for safety - speed = speed * 0.3; + speed = speed * 0.2; wristMotor.set(speed); } } @@ -119,10 +117,21 @@ public Command toggleManualControlCommand() { return this.runOnce(this::toggleManualControl); } + public Command zeroEncoderAbsCommand() { + return this.toggleManualControlCommand() + .andThen(this.runOnce(this::toggleManualControl)) + .andThen(this.run(() -> wristMotor.set(-0.3)) + .until(() -> wristMotor.getAbsoluteEncoder().getPosition() > 0.9)) + .andThen(this.runOnce(() -> wristMotor.getEncoder().setPosition(0))) + .andThen(this.runOnce(() -> wristMotor.set(0))); // stop motor + + } + @Override public void periodic() { resume(); SmartDashboard.putNumber("Wrist Encoder Reading", wristMotor.getEncoder().getPosition()); + SmartDashboard.putNumber("Wrist Abs Encoder Reading", wristMotor.getAbsoluteEncoder().getPosition()); SmartDashboard.putNumber("Wrist Target Location", targetLocation); SmartDashboard.putBoolean("Wrist Manual Control", isManualControl); } From 4f2700f1cf2682cbb66d454ae6b6ec951e0b688e Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Tue, 14 Oct 2025 21:09:49 -0500 Subject: [PATCH 7/9] Update10/14 --- src/main/java/frc/robot/commands/AlignToTarget.java | 12 ++++++------ .../java/frc/robot/commands/LEDDefaultCommand.java | 2 +- .../java/frc/robot/constants/AlignmentConstants.java | 6 +++--- .../java/frc/robot/generated/TunerConstants.java | 2 +- src/main/java/frc/robot/subsystems/Wrist.java | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/frc/robot/commands/AlignToTarget.java b/src/main/java/frc/robot/commands/AlignToTarget.java index 64dc6b1..1b0f9ce 100644 --- a/src/main/java/frc/robot/commands/AlignToTarget.java +++ b/src/main/java/frc/robot/commands/AlignToTarget.java @@ -21,10 +21,10 @@ public class AlignToTarget extends Command { private final PIDController yController; private final PIDController rotationController; private final SwerveRequest.FieldCentric fieldCentric = new SwerveRequest.FieldCentric(); - private static final double ACTIVATION_DISTANCE_METERS = 1; - private static final double SLOW_DOWN_DISTANCE_METERS = 0.15048; // 12 inches in meters - private static final double MAX_SPEED_FAR = 3.0; // Increased from 4.0 to 6.0 m/s - private static final double MAX_SPEED_NEAR = 0.25; // Increased from 2.0 to 3.0 m/s + private static final double ACTIVATION_DISTANCE_METERS = 3; + private static final double SLOW_DOWN_DISTANCE_METERS = 0.05048; // 12 inches in meters + private static final double MAX_SPEED_FAR = 5.0; // Increased from 4.0 to 6.0 m/s + private static final double MAX_SPEED_NEAR = 0.4; // Increased from 2.0 to 3.0 m/s private static final double MAX_ROTATION_SPEED_FAR = 8.0; // Increased from 4.0 to 8.0 rad/s private static final double MAX_ROTATION_SPEED_NEAR = 4.0; // Increased from 2.0 to 4.0 rad/s private boolean isRedAlliance; @@ -135,9 +135,9 @@ public void execute() { if (distance > SLOW_DOWN_DISTANCE_METERS) { // Far from target - use linear interpolation between max and min speeds speedScale = MathUtil.interpolate(MAX_SPEED_NEAR, MAX_SPEED_FAR, - Math.min(distance / ACTIVATION_DISTANCE_METERS, 1.0)); + Math.min(distance / ACTIVATION_DISTANCE_METERS, 0.5)); rotationScale = MathUtil.interpolate(MAX_ROTATION_SPEED_NEAR, MAX_ROTATION_SPEED_FAR, - Math.min(distance / ACTIVATION_DISTANCE_METERS, 1.0)); + Math.min(distance / ACTIVATION_DISTANCE_METERS, 0.5)); } else { // Close to target - use precise control speedScale = MAX_SPEED_NEAR; diff --git a/src/main/java/frc/robot/commands/LEDDefaultCommand.java b/src/main/java/frc/robot/commands/LEDDefaultCommand.java index ff19233..c2ee8bb 100644 --- a/src/main/java/frc/robot/commands/LEDDefaultCommand.java +++ b/src/main/java/frc/robot/commands/LEDDefaultCommand.java @@ -13,7 +13,7 @@ public class LEDDefaultCommand extends Command { private final CommandSwerveDrivetrain drivetrain; private final CommandXboxController driverController; private final CommandXboxController operatorController; - private final double proximityThreshold = 1.0; // 1 meter threshold + private final double proximityThreshold = 3.0; // 1 meter threshold private final double rotationThreshold = 5.0; // 5 degrees threshold private final double translationThreshold = 0.1; // 10cm threshold for final alignment diff --git a/src/main/java/frc/robot/constants/AlignmentConstants.java b/src/main/java/frc/robot/constants/AlignmentConstants.java index a3f57f3..9fa0ea7 100644 --- a/src/main/java/frc/robot/constants/AlignmentConstants.java +++ b/src/main/java/frc/robot/constants/AlignmentConstants.java @@ -6,16 +6,16 @@ public final class AlignmentConstants { // PID Constants for alignment - Increased for faster response - public static final double XY_P = 3.0; // Increased from 1.0 to 3.0 + public static final double XY_P = 3.7; // Increased from 1.0 to 3.0 public static final double XY_I = 0.0; - public static final double XY_D = 0.1; // Added small derivative gain + public static final double XY_D = 0.13; // Added small derivative gain public static final double ROTATION_P = 3.0; // Increased from 1.0 to 3.0 public static final double ROTATION_I = 0.0; public static final double ROTATION_D = 0.1; // Added small derivative gain // Tolerance for considering alignment complete - public static final double POSITION_TOLERANCE_METERS = 0.05; // 5 cm + public static final double POSITION_TOLERANCE_METERS = 0.03; // 5 cm public static final double ROTATION_TOLERANCE_DEGREES = 2.0; // 2 degrees // Left Side Positions diff --git a/src/main/java/frc/robot/generated/TunerConstants.java b/src/main/java/frc/robot/generated/TunerConstants.java index 6aa4b11..8793e74 100644 --- a/src/main/java/frc/robot/generated/TunerConstants.java +++ b/src/main/java/frc/robot/generated/TunerConstants.java @@ -24,7 +24,7 @@ public class TunerConstants { // The steer motor uses any SwerveModule.SteerRequestType control request with the // output type specified by SwerveModuleConstants.SteerMotorClosedLoopOutput private static final Slot0Configs steerGains = new Slot0Configs() - .withKP(80).withKI(0.001).withKD(0.55) + .withKP(70).withKI(0.001).withKD(0.55) .withKS(0.1).withKV(1.66).withKA(0) .withStaticFeedforwardSign(StaticFeedforwardSignValue.UseClosedLoopSign); // When using closed-loop control, the drive motor uses the control diff --git a/src/main/java/frc/robot/subsystems/Wrist.java b/src/main/java/frc/robot/subsystems/Wrist.java index 085e309..022190e 100644 --- a/src/main/java/frc/robot/subsystems/Wrist.java +++ b/src/main/java/frc/robot/subsystems/Wrist.java @@ -121,7 +121,7 @@ public Command zeroEncoderAbsCommand() { return this.toggleManualControlCommand() .andThen(this.runOnce(this::toggleManualControl)) .andThen(this.run(() -> wristMotor.set(-0.3)) - .until(() -> wristMotor.getAbsoluteEncoder().getPosition() > 0.9)) + .until(() -> wristMotor.getAbsoluteEncoder().getPosition() > 0.953)) .andThen(this.runOnce(() -> wristMotor.getEncoder().setPosition(0))) .andThen(this.runOnce(() -> wristMotor.set(0))); // stop motor From c95fdc8d7f55e43bb29033043d28b5406c5f57d9 Mon Sep 17 00:00:00 2001 From: TimothyTofte Date: Sat, 25 Oct 2025 08:52:53 -0500 Subject: [PATCH 8/9] Updated Code 10/25 --- .../deploy/pathplanner/autos/NOSide 3xL4.auto | 12 ++++++++--- .../deploy/pathplanner/autos/Side 3xL4.auto | 4 ++-- .../pathplanner/paths/CoralIToSource.path | 8 ++++---- .../pathplanner/paths/SourceToCoralK.path | 20 ++++++++++++++++--- .../pathplanner/paths/SourceToCoralL.path | 4 ++-- .../deploy/pathplanner/paths/ToCoralI.path | 8 ++++---- src/main/java/frc/robot/Robot.java | 4 ++-- .../frc/robot/constants/ClimbConstants.java | 2 +- .../frc/robot/constants/WristConstants.java | 2 +- .../subsystems/CommandSwerveDrivetrain.java | 2 +- 10 files changed, 43 insertions(+), 23 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto index 634b69b..cb9ad3c 100644 --- a/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto +++ b/src/main/deploy/pathplanner/autos/NOSide 3xL4.auto @@ -97,7 +97,7 @@ { "type": "wait", "data": { - "waitTime": 1.4 + "waitTime": 1.8 } }, { @@ -173,13 +173,13 @@ { "type": "wait", "data": { - "waitTime": 0.2 + "waitTime": 1.4 } }, { "type": "named", "data": { - "name": "Go To L2" + "name": "Go To L4" } } ] @@ -199,6 +199,12 @@ "data": { "waitTime": 0.7 } + }, + { + "type": "named", + "data": { + "name": "Go To Source" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/Side 3xL4.auto b/src/main/deploy/pathplanner/autos/Side 3xL4.auto index 2ca3a25..0dba4ce 100644 --- a/src/main/deploy/pathplanner/autos/Side 3xL4.auto +++ b/src/main/deploy/pathplanner/autos/Side 3xL4.auto @@ -108,7 +108,7 @@ { "type": "wait", "data": { - "waitTime": 0.1 + "waitTime": 0.25 } }, { @@ -190,7 +190,7 @@ { "type": "wait", "data": { - "waitTime": 0.1 + "waitTime": 0.14 } }, { diff --git a/src/main/deploy/pathplanner/paths/CoralIToSource.path b/src/main/deploy/pathplanner/paths/CoralIToSource.path index 5747809..52c1165 100644 --- a/src/main/deploy/pathplanner/paths/CoralIToSource.path +++ b/src/main/deploy/pathplanner/paths/CoralIToSource.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 5.315, - "y": 5.12 + "x": 5.335, + "y": 5.09 }, "prevControl": null, "nextControl": { - "x": 4.735805898271483, - "y": 6.449917760037189 + "x": 4.755805898271482, + "y": 6.419917760037189 }, "isLocked": false, "linkedName": "CoralI" diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralK.path b/src/main/deploy/pathplanner/paths/SourceToCoralK.path index 00c9fc3..28bd078 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralK.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralK.path @@ -34,12 +34,26 @@ "rotationDegrees": -38.0 } ], - "constraintZones": [], + "constraintZones": [ + { + "name": "Constraints Zone", + "minWaypointRelativePos": 0.7398774587563451, + "maxWaypointRelativePos": 1.0, + "constraints": { + "maxVelocity": 1.0, + "maxAcceleration": 4.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 700.0, + "nominalVoltage": 12.0, + "unlimited": false + } + } + ], "pointTowardsZones": [], "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxAcceleration": 2.5, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, @@ -55,5 +69,5 @@ "velocity": 0, "rotation": 126.0 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/SourceToCoralL.path b/src/main/deploy/pathplanner/paths/SourceToCoralL.path index 5d43e65..82d6e30 100644 --- a/src/main/deploy/pathplanner/paths/SourceToCoralL.path +++ b/src/main/deploy/pathplanner/paths/SourceToCoralL.path @@ -45,7 +45,7 @@ "eventMarkers": [], "globalConstraints": { "maxVelocity": 3.0, - "maxAcceleration": 3.0, + "maxAcceleration": 3.2, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 700.0, "nominalVoltage": 12.0, @@ -61,5 +61,5 @@ "velocity": 0, "rotation": 126.0 }, - "useDefaultConstraints": true + "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/ToCoralI.path b/src/main/deploy/pathplanner/paths/ToCoralI.path index 7b8149c..a435e85 100644 --- a/src/main/deploy/pathplanner/paths/ToCoralI.path +++ b/src/main/deploy/pathplanner/paths/ToCoralI.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 5.3215, - "y": 5.12 + "x": 5.335, + "y": 5.09 }, "prevControl": { - "x": 5.401260163897093, - "y": 5.356935257517975 + "x": 5.5736334971823345, + "y": 5.291496792663609 }, "nextControl": null, "isLocked": false, diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 2d1bde7..902f092 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -38,10 +38,10 @@ public void robotPeriodic() { double omegaRps = Units.radiansToRotations(driveState.Speeds.omegaRadiansPerSecond); var llMeasurement = LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2("limelight-fleft"); var llRMeasurement = LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2("limelight-fright"); - if (llMeasurement != null && llMeasurement.tagCount > 2 && llMeasurement.tagCount != 12 && llMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { + if (llMeasurement != null && llMeasurement.tagCount != 2 && llRMeasurement.tagCount != 1 && llMeasurement.tagCount != 12 && llMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { m_robotContainer.drivetrain.addVisionMeasurement(llMeasurement.pose, llMeasurement.timestampSeconds); } - if (llRMeasurement != null && llRMeasurement.tagCount > 2 && llRMeasurement.tagCount != 12 && llRMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { + if (llRMeasurement != null && llRMeasurement.tagCount != 2 && llRMeasurement.tagCount != 1 && llRMeasurement.tagCount != 12 && llRMeasurement.tagCount != 13 && Math.abs(omegaRps) < 2.0) { m_robotContainer.drivetrain.addVisionMeasurement(llRMeasurement.pose, llRMeasurement.timestampSeconds); } } diff --git a/src/main/java/frc/robot/constants/ClimbConstants.java b/src/main/java/frc/robot/constants/ClimbConstants.java index 0c12cab..ba2e442 100644 --- a/src/main/java/frc/robot/constants/ClimbConstants.java +++ b/src/main/java/frc/robot/constants/ClimbConstants.java @@ -3,7 +3,7 @@ public class ClimbConstants { public static double climbTargetRise = 0.56; public static double climbTargetRest = 0.29; - public static double climbTargetClimb = 0.36; + public static double climbTargetClimb = 0.37; //Motor configuartion public static final int CLIMB_CAN_ID = 21; diff --git a/src/main/java/frc/robot/constants/WristConstants.java b/src/main/java/frc/robot/constants/WristConstants.java index 7f496c7..7575e5b 100644 --- a/src/main/java/frc/robot/constants/WristConstants.java +++ b/src/main/java/frc/robot/constants/WristConstants.java @@ -1,7 +1,7 @@ package frc.robot.constants; public final class WristConstants { - public static final double L4_Angle = 8.2; + public static final double L4_Angle = 8.4; public static final double L3_Angle = 7.2; public static final double Source_Angle = 4.2; public static final double Rest_Angle = 0; diff --git a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java index e29236c..84ba700 100644 --- a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java +++ b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java @@ -211,7 +211,7 @@ private void configureAutoBuilder() { ), new PPHolonomicDriveController( // PID constants for translation - new PIDConstants(10, 0, 0), + new PIDConstants(8, 0, 0), // PID constants for rotation new PIDConstants(7, 0, 0) ), From 6a608f0eef8ec3f984a81596cbc1ff1ddc9e5ed6 Mon Sep 17 00:00:00 2001 From: VIk <147778091+VikhyathC@users.noreply.github.com> Date: Mon, 8 Dec 2025 21:22:53 -0600 Subject: [PATCH 9/9] fixing-elevator --- src/main/java/frc/robot/RobotContainer.java | 17 +- .../java/frc/robot/commands/ArmCommands.java | 3 + .../frc/robot/constants/ClimbConstants.java | 10 -- .../robot/constants/ElevatorConstants.java | 3 +- src/main/java/frc/robot/subsystems/Climb.java | 88 --------- .../java/frc/robot/subsystems/Elevator.java | 169 ++++++++---------- ...rLib.json => PathplannerLib-2025.2.7.json} | 8 +- vendordeps/Phoenix6-frc2025-latest.json | 90 ++++++---- .../{REVLib-2025.0.2.json => REVLib.json} | 12 +- 9 files changed, 154 insertions(+), 246 deletions(-) delete mode 100644 src/main/java/frc/robot/constants/ClimbConstants.java delete mode 100644 src/main/java/frc/robot/subsystems/Climb.java rename vendordeps/{PathplannerLib.json => PathplannerLib-2025.2.7.json} (87%) rename vendordeps/{REVLib-2025.0.2.json => REVLib.json} (90%) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index c07d44c..088e377 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -30,7 +30,6 @@ import frc.robot.subsystems.LEDSubsystem; import frc.robot.subsystems.Vision; import frc.robot.subsystems.Wrist; -import frc.robot.subsystems.Climb; public class RobotContainer { private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond); // kSpeedAt12Volts desired top speed @@ -58,8 +57,7 @@ public class RobotContainer { private final Intake intake = new Intake(); private final Wrist wrist = new Wrist(); - private final Elevator elevator = new Elevator(); - private final Climb climber = new Climb(); + private final Elevator elevator = new Elevator(wrist); private final ArmCommands armCommands; private final SendableChooser autoLocationChooser; @@ -160,6 +158,8 @@ private void configureBindings() { operatorController.x().onTrue(armCommands.goToSource()); // Source position + intake on X joystick.leftBumper().onTrue(armCommands.goToRest()); // Rest position on driver left bumper + + // Stop intake operatorController.leftBumper().onTrue(intake.reverseIntakeCommand()); @@ -167,17 +167,6 @@ private void configureBindings() { operatorController.rightBumper().onTrue( intake.stopIntakeCommand().alongWith(armCommands.goToRest()) ); - joystick.y().onTrue( - climber.goToRise() - ); - - joystick.a().onTrue( - climber.goToRest() - ); - joystick.rightBumper().onTrue( - climber.manualClimb() - ); - drivetrain.registerTelemetry(logger::telemeterize); } diff --git a/src/main/java/frc/robot/commands/ArmCommands.java b/src/main/java/frc/robot/commands/ArmCommands.java index 94c2b36..9ceb42b 100644 --- a/src/main/java/frc/robot/commands/ArmCommands.java +++ b/src/main/java/frc/robot/commands/ArmCommands.java @@ -18,16 +18,19 @@ public ArmCommands(Elevator elevator, Wrist wrist, Intake intake) { // L2 Position Command public Command goToL2() { + System.out.println("works super duper amazing"); return elevator.goToL2Command().alongWith(wrist.goToL3Command()); } // L3 Position Command public Command goToL3() { + System.out.println("works amazing"); return elevator.goToL3Command().alongWith(wrist.goToL3Command()); } // L4 Position Command public Command goToL4() { + System.out.println("works super amazing"); return elevator.goToL4Command().alongWith(wrist.goToL4Command()); } diff --git a/src/main/java/frc/robot/constants/ClimbConstants.java b/src/main/java/frc/robot/constants/ClimbConstants.java deleted file mode 100644 index ba2e442..0000000 --- a/src/main/java/frc/robot/constants/ClimbConstants.java +++ /dev/null @@ -1,10 +0,0 @@ -package frc.robot.constants; - -public class ClimbConstants { - public static double climbTargetRise = 0.56; - public static double climbTargetRest = 0.29; - public static double climbTargetClimb = 0.37; - - //Motor configuartion - public static final int CLIMB_CAN_ID = 21; -} diff --git a/src/main/java/frc/robot/constants/ElevatorConstants.java b/src/main/java/frc/robot/constants/ElevatorConstants.java index 63f725d..9e3eb6e 100644 --- a/src/main/java/frc/robot/constants/ElevatorConstants.java +++ b/src/main/java/frc/robot/constants/ElevatorConstants.java @@ -9,6 +9,5 @@ public final class ElevatorConstants { public static final double resetPos = 0.0; // Home position // Motor configuration - public static final int LEADER_MOTOR_ID = 14; - public static final int FOLLOWER_MOTOR_ID = 15; + public static final int ELEVATOR_MOTOR_ID = 21; } \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/Climb.java b/src/main/java/frc/robot/subsystems/Climb.java deleted file mode 100644 index 100e2e9..0000000 --- a/src/main/java/frc/robot/subsystems/Climb.java +++ /dev/null @@ -1,88 +0,0 @@ -package frc.robot.subsystems; - -import com.revrobotics.spark.SparkAbsoluteEncoder; -import com.revrobotics.spark.SparkBase.ControlType; -import com.revrobotics.spark.SparkBase.PersistMode; -import com.revrobotics.spark.SparkBase.ResetMode; -import com.revrobotics.spark.SparkClosedLoopController; -import com.revrobotics.spark.SparkLowLevel.MotorType; -import com.revrobotics.spark.SparkMax; -import com.revrobotics.spark.config.ClosedLoopConfig.FeedbackSensor; -import com.revrobotics.spark.config.SparkBaseConfig.IdleMode; -import com.revrobotics.spark.config.SparkMaxConfig; - -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; -import edu.wpi.first.wpilibj2.command.Command; -import edu.wpi.first.wpilibj2.command.SubsystemBase; -import frc.robot.constants.ClimbConstants; - -public class Climb extends SubsystemBase { - private final SparkMax climbMotor; - private final SparkClosedLoopController closedLoopController; - private final SparkAbsoluteEncoder absoluteEncoder; - private double targetLocation = 0; - - - public Climb() { - climbMotor = new SparkMax(ClimbConstants.CLIMB_CAN_ID, MotorType.kBrushless); - closedLoopController = climbMotor.getClosedLoopController(); - - absoluteEncoder = climbMotor.getAbsoluteEncoder(); - - // Get the absolute encoder - - // Config - SparkMaxConfig config = new SparkMaxConfig(); - config.inverted(false); - config.idleMode(IdleMode.kBrake) - .smartCurrentLimit(50) - .voltageCompensation(12); - config.softLimit - .reverseSoftLimit(0.260); - config.softLimit - .forwardSoftLimit(0.590); - - // Tell Spark to use absolute encoder - config.closedLoop - .feedbackSensor(FeedbackSensor.kAbsoluteEncoder) - .p(4) - .i(0.0) - .d(0.0) - .outputRange(-1.0, 1.0) - .maxMotion - .maxVelocity(5000) - .maxAcceleration(8000) - .allowedClosedLoopError(0.01); - - climbMotor.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters); - } - - public void setTargetLocation(double target) { - this.targetLocation = target; - closedLoopController.setReference(this.targetLocation, ControlType.kMAXMotionPositionControl); - } - - // === Preset Commands === - public Command goToRise() { - return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetRise)); - } - public Command goToRest() { - return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetRest)); - } - public Command manualClimb(){ - return this.runOnce(() -> setTargetLocation(ClimbConstants.climbTargetClimb)); - // return this.startEnd( - // () -> climbMotor.set(-0.1), - // () -> climbMotor.set(0.0)); - } - - @Override - public void periodic() { - SmartDashboard.putNumber("Climb Absolute Encoder", absoluteEncoder.getPosition()); - SmartDashboard.putNumber("Climb Target Location", targetLocation); - } - - public double getCurrentAngle() { - return absoluteEncoder.getPosition(); - } -} diff --git a/src/main/java/frc/robot/subsystems/Elevator.java b/src/main/java/frc/robot/subsystems/Elevator.java index 38f0f64..aade0de 100644 --- a/src/main/java/frc/robot/subsystems/Elevator.java +++ b/src/main/java/frc/robot/subsystems/Elevator.java @@ -1,129 +1,114 @@ package frc.robot.subsystems; -import com.ctre.phoenix6.StatusCode; -import com.ctre.phoenix6.configs.FeedbackConfigs; -import com.ctre.phoenix6.configs.MotionMagicConfigs; -import com.ctre.phoenix6.configs.Slot0Configs; -import com.ctre.phoenix6.configs.TalonFXConfiguration; -import com.ctre.phoenix6.controls.MotionMagicVoltage; -import com.ctre.phoenix6.controls.StrictFollower; -import com.ctre.phoenix6.hardware.TalonFX; -import com.ctre.phoenix6.signals.InvertedValue; -import com.ctre.phoenix6.signals.NeutralModeValue; +import com.revrobotics.spark.SparkBase.ControlType; +import com.revrobotics.spark.SparkBase.PersistMode; +import com.revrobotics.spark.SparkBase.ResetMode; +import com.revrobotics.spark.SparkClosedLoopController; +import com.revrobotics.spark.SparkLimitSwitch; +import com.revrobotics.spark.SparkLowLevel.MotorType; +import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.ClosedLoopConfig.FeedbackSensor; +import com.revrobotics.spark.config.LimitSwitchConfig.Type; +import com.revrobotics.spark.config.SparkBaseConfig.IdleMode; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.constants.ElevatorConstants; +import frc.robot.constants.WristConstants; + public class Elevator extends SubsystemBase { - private final TalonFX leaderMotor; - private final TalonFX followerMotor; - private final MotionMagicVoltage motionMagicRequest; - private double targetPosition = 0; - private static final double METERS_PER_ROTATION = 0.1595; // π * 0.0508m (circumference of 2-inch sprocket) - - public Elevator() { - leaderMotor = new TalonFX(ElevatorConstants.LEADER_MOTOR_ID); - followerMotor = new TalonFX(ElevatorConstants.FOLLOWER_MOTOR_ID); - motionMagicRequest = new MotionMagicVoltage(0); - - configureMotors(); + private final SparkMax elevatorMotor; + private final SparkClosedLoopController closedLoopController; + private double targetLocation = 0; + private final Wrist wrist; + + public Elevator(Wrist wrist) { + this.wrist = wrist; + elevatorMotor = new SparkMax(ElevatorConstants.ELEVATOR_MOTOR_ID, MotorType.kBrushless); + + closedLoopController = elevatorMotor.getClosedLoopController(); + + // Configure the main elevator motor + SparkMaxConfig config = new SparkMaxConfig(); + config.inverted(true); // Main motor is inverted + config.idleMode(IdleMode.kBrake) + .smartCurrentLimit(40) + .voltageCompensation(12); + + // config.limitSwitch + // .reverseLimitSwitchEnabled(true) + // .reverseLimitSwitchType(Type.kNormallyOpen) + // .forwardLimitSwitchEnabled(true) + // .forwardLimitSwitchType(Type.kNormallyOpen); + + config.closedLoop + .feedbackSensor(FeedbackSensor.kPrimaryEncoder) + .p(0.6) + // .d(0.001) + .i(0.002) + + .maxMotion + .maxVelocity(6000) + .maxAcceleration(5000) + .allowedClosedLoopError(0.5); + + elevatorMotor.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters); } - private void configureMotors() { - TalonFXConfiguration config = new TalonFXConfiguration(); - - // Configure gear ratio and mechanical conversion - FeedbackConfigs feedback = config.Feedback; - feedback.SensorToMechanismRatio = 5.0; // 5:1 gear reduction - - // Configure Motion Magic - MotionMagicConfigs mm = config.MotionMagic; - mm.withMotionMagicCruiseVelocity(84.27) - .withMotionMagicAcceleration(100.54) - .withMotionMagicJerk(140.08); - - // Configure PID values - Slot0Configs slot0 = config.Slot0; - slot0.kS = 0.4; - slot0.kV = 0.02; - slot0.kA = 0.001; - slot0.kP = 30; - slot0.kI = 0; - slot0.kD = .5; - - // Set to brake mode - config.MotorOutput.NeutralMode = NeutralModeValue.Brake; - - // Configure leader motor - config.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; - StatusCode status = StatusCode.StatusCodeNotInitialized; - for (int i = 0; i < 5; ++i) { - status = leaderMotor.getConfigurator().apply(config); - if (status.isOK()) break; - } - if (!status.isOK()) { - System.out.println("Could not configure leader motor. Error: " + status.toString()); - } - - // Configure follower motor - config.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive; - status = StatusCode.StatusCodeNotInitialized; - for (int i = 0; i < 5; ++i) { - status = followerMotor.getConfigurator().apply(config); - if (status.isOK()) break; - } - if (!status.isOK()) { - System.out.println("Could not configure follower motor. Error: " + status.toString()); - } - - // Set follower to follow leader - followerMotor.setControl(new StrictFollower(ElevatorConstants.LEADER_MOTOR_ID)); + public void setTargetLocation(double targetLocation) { + this.targetLocation = targetLocation; } - public void setTargetPosition(double positionMeters) { - targetPosition = positionMeters; - leaderMotor.setControl(motionMagicRequest.withPosition(positionMeters / METERS_PER_ROTATION).withSlot(0)); + public void zeroEncoder() { + elevatorMotor.getEncoder().setPosition(0); } - // Command wrappers for preset positions + // Command wrappers for the preset positions public Command goToL4Command() { - return this.runOnce(() -> setTargetPosition(ElevatorConstants.L4_Distance)); + return this.runOnce(() -> setTargetLocation(ElevatorConstants.L4_Distance)); } public Command goToL3Command() { - return this.runOnce(() -> setTargetPosition(ElevatorConstants.L3_Distance)); + System.out.println("works"); + return this.runOnce(() -> setTargetLocation(ElevatorConstants.L3_Distance)); + } public Command goToL2Command() { - return this.runOnce(() -> setTargetPosition(ElevatorConstants.L2_Distance)); + return this.runOnce(() -> setTargetLocation(ElevatorConstants.L2_Distance)); } public Command goToSourceCommand() { - return this.runOnce(() -> setTargetPosition(ElevatorConstants.Source_Distance)); + return this.runOnce(() -> setTargetLocation(ElevatorConstants.Source_Distance)); } public Command goToRestCommand() { - return this.runOnce(() -> setTargetPosition(ElevatorConstants.resetPos)); + return this.runOnce(() -> setTargetLocation(ElevatorConstants.resetPos)); } - @Override - public void periodic() { - updateDashboard(); + public void elevatorMoveToDesired(){ + closedLoopController.setReference(this.targetLocation, ControlType.kMAXMotionPositionControl); } - private void updateDashboard() { - SmartDashboard.putNumber("Elevator Position (m)", getPositionMeters()); - SmartDashboard.putNumber("Elevator Target (m)", targetPosition); - SmartDashboard.putNumber("Elevator Velocity (m/s)", getVelocityMetersPerSecond()); + public void elevatorMoveToL2(){ + closedLoopController.setReference(ElevatorConstants.L2_Distance, ControlType.kMAXMotionPositionControl); + } + + /* Motion Planning Logic: */ + @Override + public void periodic() { + } - public double getPositionMeters() { - return leaderMotor.getRotorPosition().getValueAsDouble() * METERS_PER_ROTATION; + public void printDashboard() { + SmartDashboard.putNumber("Elevator/ Position", elevatorMotor.getEncoder().getPosition()); + SmartDashboard.putNumber("Elevator/ Target", targetLocation); } - public double getVelocityMetersPerSecond() { - return leaderMotor.getRotorVelocity().getValueAsDouble() * METERS_PER_ROTATION; + public double getPosition() { + return elevatorMotor.getEncoder().getPosition(); } -} \ No newline at end of file +} diff --git a/vendordeps/PathplannerLib.json b/vendordeps/PathplannerLib-2025.2.7.json similarity index 87% rename from vendordeps/PathplannerLib.json rename to vendordeps/PathplannerLib-2025.2.7.json index 7dbcb1f..d3f84e5 100644 --- a/vendordeps/PathplannerLib.json +++ b/vendordeps/PathplannerLib-2025.2.7.json @@ -1,7 +1,7 @@ { - "fileName": "PathplannerLib.json", + "fileName": "PathplannerLib-2025.2.7.json", "name": "PathplannerLib", - "version": "2025.2.1", + "version": "2025.2.7", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2025", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2025.2.1" + "version": "2025.2.7" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2025.2.1", + "version": "2025.2.7", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false, diff --git a/vendordeps/Phoenix6-frc2025-latest.json b/vendordeps/Phoenix6-frc2025-latest.json index e2ee54c..6f40c84 100644 --- a/vendordeps/Phoenix6-frc2025-latest.json +++ b/vendordeps/Phoenix6-frc2025-latest.json @@ -1,7 +1,7 @@ { "fileName": "Phoenix6-frc2025-latest.json", "name": "CTRE-Phoenix (v6)", - "version": "25.3.0", + "version": "25.4.0", "frcYear": "2025", "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", "mavenUrls": [ @@ -19,14 +19,14 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-java", - "version": "25.3.0" + "version": "25.4.0" } ], "jniDependencies": [ { "groupId": "com.ctre.phoenix6", "artifactId": "api-cpp", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -40,7 +40,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -54,7 +54,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "api-cpp-sim", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -68,7 +68,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -82,7 +82,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -96,7 +96,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -110,7 +110,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -124,7 +124,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -138,7 +138,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -152,7 +152,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -166,7 +166,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -180,7 +180,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -194,7 +194,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "25.3.0", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -208,7 +208,21 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdi", - "version": "25.3.0", + "version": "25.4.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "25.4.0", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -224,7 +238,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-cpp", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_Phoenix6_WPI", "headerClassifier": "headers", "sharedLibrary": true, @@ -240,7 +254,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_PhoenixTools", "headerClassifier": "headers", "sharedLibrary": true, @@ -256,7 +270,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "wpiapi-cpp-sim", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_Phoenix6_WPISim", "headerClassifier": "headers", "sharedLibrary": true, @@ -272,7 +286,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_PhoenixTools_Sim", "headerClassifier": "headers", "sharedLibrary": true, @@ -288,7 +302,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimTalonSRX", "headerClassifier": "headers", "sharedLibrary": true, @@ -304,7 +318,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimVictorSPX", "headerClassifier": "headers", "sharedLibrary": true, @@ -320,7 +334,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimPigeonIMU", "headerClassifier": "headers", "sharedLibrary": true, @@ -336,7 +350,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimCANCoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -352,7 +366,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProTalonFX", "headerClassifier": "headers", "sharedLibrary": true, @@ -368,7 +382,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProTalonFXS", "headerClassifier": "headers", "sharedLibrary": true, @@ -384,7 +398,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProCANcoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -400,7 +414,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProPigeon2", "headerClassifier": "headers", "sharedLibrary": true, @@ -416,7 +430,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProCANrange", "headerClassifier": "headers", "sharedLibrary": true, @@ -432,7 +446,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANdi", - "version": "25.3.0", + "version": "25.4.0", "libName": "CTRE_SimProCANdi", "headerClassifier": "headers", "sharedLibrary": true, @@ -444,6 +458,22 @@ "osxuniversal" ], "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "25.4.0", + "libName": "CTRE_SimProCANdle", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" } ] } \ No newline at end of file diff --git a/vendordeps/REVLib-2025.0.2.json b/vendordeps/REVLib.json similarity index 90% rename from vendordeps/REVLib-2025.0.2.json rename to vendordeps/REVLib.json index c29aefa..ac62be8 100644 --- a/vendordeps/REVLib-2025.0.2.json +++ b/vendordeps/REVLib.json @@ -1,7 +1,7 @@ { - "fileName": "REVLib-2025.0.2.json", + "fileName": "REVLib.json", "name": "REVLib", - "version": "2025.0.2", + "version": "2025.0.3", "frcYear": "2025", "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", "mavenUrls": [ @@ -12,14 +12,14 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-java", - "version": "2025.0.2" + "version": "2025.0.3" } ], "jniDependencies": [ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.2", + "version": "2025.0.3", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -36,7 +36,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-cpp", - "version": "2025.0.2", + "version": "2025.0.3", "libName": "REVLib", "headerClassifier": "headers", "sharedLibrary": false, @@ -53,7 +53,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.2", + "version": "2025.0.3", "libName": "REVLibDriver", "headerClassifier": "headers", "sharedLibrary": false,