From 55ad4f60ce120a131ca787f7a232b30be70e626e Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Mon, 19 Feb 2024 19:01:52 -0500 Subject: [PATCH] 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);