From d075385e1f89df3c09f9527065bf0b15bd8e3b56 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 18:15:38 -0500 Subject: [PATCH 1/7] --- src/main/deploy/pathplanner/paths/1.1.path | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/deploy/pathplanner/paths/1.1.path b/src/main/deploy/pathplanner/paths/1.1.path index 605e51a..6ef850d 100644 --- a/src/main/deploy/pathplanner/paths/1.1.path +++ b/src/main/deploy/pathplanner/paths/1.1.path @@ -8,7 +8,7 @@ }, "prevControl": null, "nextControl": { - "x": 1.2733425960299216, + "x": 1.3266574039700785, "y": 5.55 }, "isLocked": false, @@ -39,7 +39,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -179.1243356864854, + "rotation": 0.3044999237387323, "rotateFast": false }, "reversed": false, From 1476b1eae3dc1dcdaf6a544cec32bcb734435da0 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 18:29:01 -0500 Subject: [PATCH 2/7] --- src/main/java/frc/robot/subsystem/Lanceur.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index 7730b2b..220202f 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -33,7 +33,18 @@ public class Lanceur extends SubsystemBase { final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless); final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless); public void pid(){ - lanceur1.getPIDController(); + lanceur1.getPIDController().setP(0.2); + lanceur1.getPIDController().setI(0.2); + lanceur1.getPIDController().setD(0.2); + lanceur2.getPIDController().setP(0.2); + lanceur1.getPIDController().setI(0.2); + lanceur2.getPIDController().setD(0.2); + lanceur3.getPIDController().setP(0.2); + lanceur3.getPIDController().setI(0.2); + lanceur3.getPIDController().setD(0.2); + lanceur4.getPIDController().setP(0.2); + lanceur4.getPIDController().setI(0.2); + lanceur4.getPIDController().setD(0.2); } public void lancer(double vitesse){ lanceur1.set(-vitesse); From 55ad4f60ce120a131ca787f7a232b30be70e626e Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 19:01:52 -0500 Subject: [PATCH 3/7] mode auto --- .../autos/{7.auto => B recule.auto} | 0 .../autos/{1.1.auto => B.C.1.auto} | 0 .../autos/{1.2.auto => B.C.2.auto} | 0 .../autos/{1.4.auto => B.C.3.auto} | 29 +++++++++----- .../autos/{1.3.auto => B.C.4.auto} | 35 +++++++++++----- .../autos/{1.5.auto => B.C.5.auto} | 29 +++++++++----- .../autos/{2.1.auto => B.D.1.auto} | 0 .../autos/{2.2.auto => B.D.2.auto} | 0 .../autos/{2.3.auto => B.D.3.auto} | 29 +++++++++----- .../autos/{2.4.auto => B.D.4.auto} | 29 +++++++++----- .../autos/{2.5.auto => B.D.5.auto} | 29 +++++++++----- .../autos/{3.1.auto => B.H.1.auto} | 0 .../autos/{3.2.auto => B.H.2.auto} | 0 .../autos/{3.3.auto => B.H.3.auto} | 30 +++++++++++++- .../autos/{3.4.auto => B.H.4.auto} | 29 +++++++++----- .../autos/{3.5.auto => B.H.5.auto} | 0 .../autos/{8.auto => R recule.auto} | 0 .../autos/{4.1.auto => R.C.1.auto} | 0 .../autos/{4.2.auto => R.C.2.auto} | 0 .../autos/{4.3.auto => R.C.3.auto} | 0 .../autos/{4.4.auto => R.C.4.auto} | 0 .../autos/{4.5.auto => R.C.5.auto} | 0 .../autos/{5.1.auto => R.D.1.auto} | 0 .../autos/{5.2.auto => R.D.2.auto} | 0 .../autos/{5.3.auto => R.D.3.auto} | 0 .../autos/{5.4.auto => R.D.4.auto} | 0 .../autos/{5.5.auto => R.D.5.auto} | 0 .../autos/{6.1.auto => R.H.1.auto} | 0 .../autos/{6.2.auto => R.H.2.auto} | 0 .../autos/{6.3.auto => R.H.3.auto} | 0 .../autos/{6.4.auto => R.H.4.auto} | 0 .../autos/{6.5.auto => R.H.5.auto} | 0 src/main/deploy/pathplanner/paths/1.1.path | 2 +- .../java/frc/robot/subsystem/Lanceur.java | 40 +++++++++++++------ 34 files changed, 188 insertions(+), 93 deletions(-) rename src/main/deploy/pathplanner/autos/{7.auto => B recule.auto} (100%) rename src/main/deploy/pathplanner/autos/{1.1.auto => B.C.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{1.2.auto => B.C.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{1.4.auto => B.C.3.auto} (65%) rename src/main/deploy/pathplanner/autos/{1.3.auto => B.C.4.auto} (63%) rename src/main/deploy/pathplanner/autos/{1.5.auto => B.C.5.auto} (72%) rename src/main/deploy/pathplanner/autos/{2.1.auto => B.D.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{2.2.auto => B.D.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{2.3.auto => B.D.3.auto} (62%) rename src/main/deploy/pathplanner/autos/{2.4.auto => B.D.4.auto} (65%) rename src/main/deploy/pathplanner/autos/{2.5.auto => B.D.5.auto} (72%) rename src/main/deploy/pathplanner/autos/{3.1.auto => B.H.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{3.2.auto => B.H.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{3.3.auto => B.H.3.auto} (60%) rename src/main/deploy/pathplanner/autos/{3.4.auto => B.H.4.auto} (65%) rename src/main/deploy/pathplanner/autos/{3.5.auto => B.H.5.auto} (100%) rename src/main/deploy/pathplanner/autos/{8.auto => R recule.auto} (100%) rename src/main/deploy/pathplanner/autos/{4.1.auto => R.C.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{4.2.auto => R.C.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{4.3.auto => R.C.3.auto} (100%) rename src/main/deploy/pathplanner/autos/{4.4.auto => R.C.4.auto} (100%) rename src/main/deploy/pathplanner/autos/{4.5.auto => R.C.5.auto} (100%) rename src/main/deploy/pathplanner/autos/{5.1.auto => R.D.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{5.2.auto => R.D.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{5.3.auto => R.D.3.auto} (100%) rename src/main/deploy/pathplanner/autos/{5.4.auto => R.D.4.auto} (100%) rename src/main/deploy/pathplanner/autos/{5.5.auto => R.D.5.auto} (100%) rename src/main/deploy/pathplanner/autos/{6.1.auto => R.H.1.auto} (100%) rename src/main/deploy/pathplanner/autos/{6.2.auto => R.H.2.auto} (100%) rename src/main/deploy/pathplanner/autos/{6.3.auto => R.H.3.auto} (100%) rename src/main/deploy/pathplanner/autos/{6.4.auto => R.H.4.auto} (100%) rename src/main/deploy/pathplanner/autos/{6.5.auto => R.H.5.auto} (100%) diff --git a/src/main/deploy/pathplanner/autos/7.auto b/src/main/deploy/pathplanner/autos/B recule.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/7.auto rename to src/main/deploy/pathplanner/autos/B recule.auto diff --git a/src/main/deploy/pathplanner/autos/1.1.auto b/src/main/deploy/pathplanner/autos/B.C.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/1.1.auto rename to src/main/deploy/pathplanner/autos/B.C.1.auto diff --git a/src/main/deploy/pathplanner/autos/1.2.auto b/src/main/deploy/pathplanner/autos/B.C.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/1.2.auto rename to src/main/deploy/pathplanner/autos/B.C.2.auto diff --git a/src/main/deploy/pathplanner/autos/1.4.auto b/src/main/deploy/pathplanner/autos/B.C.3.auto similarity index 65% rename from src/main/deploy/pathplanner/autos/1.4.auto rename to src/main/deploy/pathplanner/autos/B.C.3.auto index 6e06e00..d56a1aa 100644 --- a/src/main/deploy/pathplanner/autos/1.4.auto +++ b/src/main/deploy/pathplanner/autos/B.C.3.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "1.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "1.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/1.3.auto b/src/main/deploy/pathplanner/autos/B.C.4.auto similarity index 63% rename from src/main/deploy/pathplanner/autos/1.3.auto rename to src/main/deploy/pathplanner/autos/B.C.4.auto index e03567d..2f8fba6 100644 --- a/src/main/deploy/pathplanner/autos/1.3.auto +++ b/src/main/deploy/pathplanner/autos/B.C.4.auto @@ -31,29 +31,42 @@ } }, { - "type": "path", - "data": { - "pathName": "1.1" - } - }, - { - "type": "deadline", + "type": "sequential", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "1.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] } + }, + { + "type": "path", + "data": { + "pathName": "1.2" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/1.5.auto b/src/main/deploy/pathplanner/autos/B.C.5.auto similarity index 72% rename from src/main/deploy/pathplanner/autos/1.5.auto rename to src/main/deploy/pathplanner/autos/B.C.5.auto index 23f05cf..d5093f1 100644 --- a/src/main/deploy/pathplanner/autos/1.5.auto +++ b/src/main/deploy/pathplanner/autos/B.C.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "1.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "1.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/2.1.auto b/src/main/deploy/pathplanner/autos/B.D.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/2.1.auto rename to src/main/deploy/pathplanner/autos/B.D.1.auto diff --git a/src/main/deploy/pathplanner/autos/2.2.auto b/src/main/deploy/pathplanner/autos/B.D.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/2.2.auto rename to src/main/deploy/pathplanner/autos/B.D.2.auto diff --git a/src/main/deploy/pathplanner/autos/2.3.auto b/src/main/deploy/pathplanner/autos/B.D.3.auto similarity index 62% rename from src/main/deploy/pathplanner/autos/2.3.auto rename to src/main/deploy/pathplanner/autos/B.D.3.auto index 3cd5557..4a43031 100644 --- a/src/main/deploy/pathplanner/autos/2.3.auto +++ b/src/main/deploy/pathplanner/autos/B.D.3.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "2.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "2.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/2.4.auto b/src/main/deploy/pathplanner/autos/B.D.4.auto similarity index 65% rename from src/main/deploy/pathplanner/autos/2.4.auto rename to src/main/deploy/pathplanner/autos/B.D.4.auto index b2a1901..1f2f761 100644 --- a/src/main/deploy/pathplanner/autos/2.4.auto +++ b/src/main/deploy/pathplanner/autos/B.D.4.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "2.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "2.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/2.5.auto b/src/main/deploy/pathplanner/autos/B.D.5.auto similarity index 72% rename from src/main/deploy/pathplanner/autos/2.5.auto rename to src/main/deploy/pathplanner/autos/B.D.5.auto index 9a1589f..d6a5e2d 100644 --- a/src/main/deploy/pathplanner/autos/2.5.auto +++ b/src/main/deploy/pathplanner/autos/B.D.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "2.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "2.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/3.1.auto b/src/main/deploy/pathplanner/autos/B.H.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/3.1.auto rename to src/main/deploy/pathplanner/autos/B.H.1.auto diff --git a/src/main/deploy/pathplanner/autos/3.2.auto b/src/main/deploy/pathplanner/autos/B.H.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/3.2.auto rename to src/main/deploy/pathplanner/autos/B.H.2.auto diff --git a/src/main/deploy/pathplanner/autos/3.3.auto b/src/main/deploy/pathplanner/autos/B.H.3.auto similarity index 60% rename from src/main/deploy/pathplanner/autos/3.3.auto rename to src/main/deploy/pathplanner/autos/B.H.3.auto index ce4eab5..6c5a86c 100644 --- a/src/main/deploy/pathplanner/autos/3.3.auto +++ b/src/main/deploy/pathplanner/autos/B.H.3.auto @@ -31,9 +31,35 @@ } }, { - "type": "path", + "type": "sequential", "data": { - "pathName": "3.1" + "commands": [ + { + "type": "path", + "data": { + "pathName": "3.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] + } + } + ] } }, { diff --git a/src/main/deploy/pathplanner/autos/3.4.auto b/src/main/deploy/pathplanner/autos/B.H.4.auto similarity index 65% rename from src/main/deploy/pathplanner/autos/3.4.auto rename to src/main/deploy/pathplanner/autos/B.H.4.auto index 2485fff..28c6ece 100644 --- a/src/main/deploy/pathplanner/autos/3.4.auto +++ b/src/main/deploy/pathplanner/autos/B.H.4.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "3.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "3.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "lancer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/3.5.auto b/src/main/deploy/pathplanner/autos/B.H.5.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/3.5.auto rename to src/main/deploy/pathplanner/autos/B.H.5.auto diff --git a/src/main/deploy/pathplanner/autos/8.auto b/src/main/deploy/pathplanner/autos/R recule.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/8.auto rename to src/main/deploy/pathplanner/autos/R recule.auto diff --git a/src/main/deploy/pathplanner/autos/4.1.auto b/src/main/deploy/pathplanner/autos/R.C.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4.1.auto rename to src/main/deploy/pathplanner/autos/R.C.1.auto diff --git a/src/main/deploy/pathplanner/autos/4.2.auto b/src/main/deploy/pathplanner/autos/R.C.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4.2.auto rename to src/main/deploy/pathplanner/autos/R.C.2.auto diff --git a/src/main/deploy/pathplanner/autos/4.3.auto b/src/main/deploy/pathplanner/autos/R.C.3.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4.3.auto rename to src/main/deploy/pathplanner/autos/R.C.3.auto diff --git a/src/main/deploy/pathplanner/autos/4.4.auto b/src/main/deploy/pathplanner/autos/R.C.4.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4.4.auto rename to src/main/deploy/pathplanner/autos/R.C.4.auto diff --git a/src/main/deploy/pathplanner/autos/4.5.auto b/src/main/deploy/pathplanner/autos/R.C.5.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4.5.auto rename to src/main/deploy/pathplanner/autos/R.C.5.auto diff --git a/src/main/deploy/pathplanner/autos/5.1.auto b/src/main/deploy/pathplanner/autos/R.D.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/5.1.auto rename to src/main/deploy/pathplanner/autos/R.D.1.auto diff --git a/src/main/deploy/pathplanner/autos/5.2.auto b/src/main/deploy/pathplanner/autos/R.D.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/5.2.auto rename to src/main/deploy/pathplanner/autos/R.D.2.auto diff --git a/src/main/deploy/pathplanner/autos/5.3.auto b/src/main/deploy/pathplanner/autos/R.D.3.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/5.3.auto rename to src/main/deploy/pathplanner/autos/R.D.3.auto diff --git a/src/main/deploy/pathplanner/autos/5.4.auto b/src/main/deploy/pathplanner/autos/R.D.4.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/5.4.auto rename to src/main/deploy/pathplanner/autos/R.D.4.auto diff --git a/src/main/deploy/pathplanner/autos/5.5.auto b/src/main/deploy/pathplanner/autos/R.D.5.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/5.5.auto rename to src/main/deploy/pathplanner/autos/R.D.5.auto diff --git a/src/main/deploy/pathplanner/autos/6.1.auto b/src/main/deploy/pathplanner/autos/R.H.1.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/6.1.auto rename to src/main/deploy/pathplanner/autos/R.H.1.auto diff --git a/src/main/deploy/pathplanner/autos/6.2.auto b/src/main/deploy/pathplanner/autos/R.H.2.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/6.2.auto rename to src/main/deploy/pathplanner/autos/R.H.2.auto diff --git a/src/main/deploy/pathplanner/autos/6.3.auto b/src/main/deploy/pathplanner/autos/R.H.3.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/6.3.auto rename to src/main/deploy/pathplanner/autos/R.H.3.auto diff --git a/src/main/deploy/pathplanner/autos/6.4.auto b/src/main/deploy/pathplanner/autos/R.H.4.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/6.4.auto rename to src/main/deploy/pathplanner/autos/R.H.4.auto diff --git a/src/main/deploy/pathplanner/autos/6.5.auto b/src/main/deploy/pathplanner/autos/R.H.5.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/6.5.auto rename to src/main/deploy/pathplanner/autos/R.H.5.auto diff --git a/src/main/deploy/pathplanner/paths/1.1.path b/src/main/deploy/pathplanner/paths/1.1.path index 6ef850d..b5ef055 100644 --- a/src/main/deploy/pathplanner/paths/1.1.path +++ b/src/main/deploy/pathplanner/paths/1.1.path @@ -39,7 +39,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 0.3044999237387323, + "rotation": -179.69010821508004, "rotateFast": false }, "reversed": false, diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index 220202f..13967a0 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -32,19 +32,33 @@ public class Lanceur extends SubsystemBase { final CANSparkMax lanceur2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless); final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless); final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless); - public void pid(){ - lanceur1.getPIDController().setP(0.2); - lanceur1.getPIDController().setI(0.2); - lanceur1.getPIDController().setD(0.2); - lanceur2.getPIDController().setP(0.2); - lanceur1.getPIDController().setI(0.2); - lanceur2.getPIDController().setD(0.2); - lanceur3.getPIDController().setP(0.2); - lanceur3.getPIDController().setI(0.2); - lanceur3.getPIDController().setD(0.2); - lanceur4.getPIDController().setP(0.2); - lanceur4.getPIDController().setI(0.2); - lanceur4.getPIDController().setD(0.2); + public void pidspeaker(){ + lanceur1.getPIDController().setP(0.5); + lanceur1.getPIDController().setI(0.5); + lanceur1.getPIDController().setD(0.5); + lanceur2.getPIDController().setP(0.5); + lanceur1.getPIDController().setI(0.5); + lanceur2.getPIDController().setD(0.5); + lanceur3.getPIDController().setP(0.5); + lanceur3.getPIDController().setI(0.5); + lanceur3.getPIDController().setD(0.5); + lanceur4.getPIDController().setP(0.5); + lanceur4.getPIDController().setI(0.5); + lanceur4.getPIDController().setD(0.5); + } + public void pidampli(){ + lanceur1.getPIDController().setP(0.1); + lanceur1.getPIDController().setI(0.1); + lanceur1.getPIDController().setD(0.1); + lanceur2.getPIDController().setP(0.1); + lanceur1.getPIDController().setI(0.1); + lanceur2.getPIDController().setD(0.1); + lanceur3.getPIDController().setP(0.1); + lanceur3.getPIDController().setI(0.1); + lanceur3.getPIDController().setD(0.1); + lanceur4.getPIDController().setP(0.1); + lanceur4.getPIDController().setI(0.1); + lanceur4.getPIDController().setD(0.1); } public void lancer(double vitesse){ lanceur1.set(-vitesse); From 954b091f9d943191c6f3f51b0ef0e31dfa6d1b40 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 19:12:42 -0500 Subject: [PATCH 4/7] --- src/main/deploy/pathplanner/autos/B.H.5.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.C.3.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.C.4.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.C.5.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.D.3.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.D.4.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.D.5.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.H.3.auto | 23 ++-------------- 8 files changed, 128 insertions(+), 98 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/B.H.5.auto b/src/main/deploy/pathplanner/autos/B.H.5.auto index 7a0dc5f..0771143 100644 --- a/src/main/deploy/pathplanner/autos/B.H.5.auto +++ b/src/main/deploy/pathplanner/autos/B.H.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "3.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "3.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "lancer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.C.3.auto b/src/main/deploy/pathplanner/autos/R.C.3.auto index fcca443..9dcd3f2 100644 --- a/src/main/deploy/pathplanner/autos/R.C.3.auto +++ b/src/main/deploy/pathplanner/autos/R.C.3.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "4.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "4.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.C.4.auto b/src/main/deploy/pathplanner/autos/R.C.4.auto index 3b8f377..91cced1 100644 --- a/src/main/deploy/pathplanner/autos/R.C.4.auto +++ b/src/main/deploy/pathplanner/autos/R.C.4.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "4.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "4.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.C.5.auto b/src/main/deploy/pathplanner/autos/R.C.5.auto index 4e19546..621e3db 100644 --- a/src/main/deploy/pathplanner/autos/R.C.5.auto +++ b/src/main/deploy/pathplanner/autos/R.C.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "4.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "4.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.D.3.auto b/src/main/deploy/pathplanner/autos/R.D.3.auto index 902d99a..cec92fd 100644 --- a/src/main/deploy/pathplanner/autos/R.D.3.auto +++ b/src/main/deploy/pathplanner/autos/R.D.3.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "5.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "5.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.D.4.auto b/src/main/deploy/pathplanner/autos/R.D.4.auto index dd425d2..f43c6b0 100644 --- a/src/main/deploy/pathplanner/autos/R.D.4.auto +++ b/src/main/deploy/pathplanner/autos/R.D.4.auto @@ -38,25 +38,32 @@ } }, { - "type": "path", - "data": { - "pathName": "5.1" - } - }, - { - "type": "deadline", + "type": "sequential", "data": { "commands": [ { - "type": "named", + "type": "path", "data": { - "name": "balyer" + "pathName": "5.1" } }, { - "type": "wait", + "type": "deadline", "data": { - "waitTime": 3.0 + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.D.5.auto b/src/main/deploy/pathplanner/autos/R.D.5.auto index e7c6626..615fb4e 100644 --- a/src/main/deploy/pathplanner/autos/R.D.5.auto +++ b/src/main/deploy/pathplanner/autos/R.D.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "5.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "5.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.H.3.auto b/src/main/deploy/pathplanner/autos/R.H.3.auto index ce14187..eb497e4 100644 --- a/src/main/deploy/pathplanner/autos/R.H.3.auto +++ b/src/main/deploy/pathplanner/autos/R.H.3.auto @@ -31,28 +31,9 @@ } }, { - "type": "path", + "type": "parallel", "data": { - "pathName": "6.1" - } - }, - { - "type": "deadline", - "data": { - "commands": [ - { - "type": "wait", - "data": { - "waitTime": 3.0 - } - }, - { - "type": "named", - "data": { - "name": "balyer" - } - } - ] + "commands": [] } } ] From 0c5c171ec1eb8c1d59022cef342ae832a7a176bd Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 19 Feb 2024 19:13:50 -0500 Subject: [PATCH 5/7] --- src/main/java/frc/robot/subsystem/Lanceur.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index 0e2b6a7..60285a4 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -37,7 +37,7 @@ public class Lanceur extends SubsystemBase { lanceur1.getPIDController().setI(0.5); lanceur1.getPIDController().setD(0.5); lanceur2.getPIDController().setP(0.5); - lanceur1.getPIDController().setI(0.5); + lanceur2.getPIDController().setI(0.5); lanceur2.getPIDController().setD(0.5); lanceur3.getPIDController().setP(0.5); lanceur3.getPIDController().setI(0.5); From 355e1ff9032e8fc9ab8c6ecd2357c880adc7cece Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 19:14:19 -0500 Subject: [PATCH 6/7] --- src/main/deploy/pathplanner/autos/R.H.3.auto | 9 ++++++++- src/main/java/frc/robot/subsystem/Lanceur.java | 14 -------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/R.H.3.auto b/src/main/deploy/pathplanner/autos/R.H.3.auto index eb497e4..8d112a0 100644 --- a/src/main/deploy/pathplanner/autos/R.H.3.auto +++ b/src/main/deploy/pathplanner/autos/R.H.3.auto @@ -33,7 +33,14 @@ { "type": "parallel", "data": { - "commands": [] + "commands": [ + { + "type": "path", + "data": { + "pathName": "6.1" + } + } + ] } } ] diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index 13967a0..0e2b6a7 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -46,20 +46,6 @@ public class Lanceur extends SubsystemBase { lanceur4.getPIDController().setI(0.5); lanceur4.getPIDController().setD(0.5); } - public void pidampli(){ - lanceur1.getPIDController().setP(0.1); - lanceur1.getPIDController().setI(0.1); - lanceur1.getPIDController().setD(0.1); - lanceur2.getPIDController().setP(0.1); - lanceur1.getPIDController().setI(0.1); - lanceur2.getPIDController().setD(0.1); - lanceur3.getPIDController().setP(0.1); - lanceur3.getPIDController().setI(0.1); - lanceur3.getPIDController().setD(0.1); - lanceur4.getPIDController().setP(0.1); - lanceur4.getPIDController().setI(0.1); - lanceur4.getPIDController().setD(0.1); - } public void lancer(double vitesse){ lanceur1.set(-vitesse); lanceur2.set(-vitesse); From a34558bb58c08bc3cf516250398f15f2596a0f47 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 19:20:22 -0500 Subject: [PATCH 7/7] --- src/main/deploy/pathplanner/autos/9.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.H.3.auto | 19 +++++++++++++ src/main/deploy/pathplanner/autos/R.H.4.auto | 29 ++++++++++++-------- src/main/deploy/pathplanner/autos/R.H.5.auto | 29 ++++++++++++-------- 4 files changed, 73 insertions(+), 33 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/9.auto b/src/main/deploy/pathplanner/autos/9.auto index f1fd8c4..9bd7ff5 100644 --- a/src/main/deploy/pathplanner/autos/9.auto +++ b/src/main/deploy/pathplanner/autos/9.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "1.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "1.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.H.3.auto b/src/main/deploy/pathplanner/autos/R.H.3.auto index 8d112a0..051db29 100644 --- a/src/main/deploy/pathplanner/autos/R.H.3.auto +++ b/src/main/deploy/pathplanner/autos/R.H.3.auto @@ -39,6 +39,25 @@ "data": { "pathName": "6.1" } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] + } } ] } diff --git a/src/main/deploy/pathplanner/autos/R.H.4.auto b/src/main/deploy/pathplanner/autos/R.H.4.auto index 1cd567a..f58efd3 100644 --- a/src/main/deploy/pathplanner/autos/R.H.4.auto +++ b/src/main/deploy/pathplanner/autos/R.H.4.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "6.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "6.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/R.H.5.auto b/src/main/deploy/pathplanner/autos/R.H.5.auto index 2751b1b..cc8132b 100644 --- a/src/main/deploy/pathplanner/autos/R.H.5.auto +++ b/src/main/deploy/pathplanner/autos/R.H.5.auto @@ -31,25 +31,32 @@ } }, { - "type": "path", - "data": { - "pathName": "6.1" - } - }, - { - "type": "deadline", + "type": "parallel", "data": { "commands": [ { - "type": "wait", + "type": "path", "data": { - "waitTime": 3.0 + "pathName": "6.1" } }, { - "type": "named", + "type": "deadline", "data": { - "name": "balyer" + "commands": [ + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + }, + { + "type": "named", + "data": { + "name": "balyer" + } + } + ] } } ]