From 76c55bf9847a0fe82c70c48b092e107d75b634b8 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Thu, 1 Feb 2024 19:20:32 -0500 Subject: [PATCH] mode auto --- src/main/deploy/pathplanner/autos/1.1.auto | 17 +++- .../pathplanner/autos/{1.auto => 1.2.auto} | 19 +++- src/main/deploy/pathplanner/autos/1.3.auto | 63 ++++++++++++ src/main/deploy/pathplanner/autos/1.4.auto | 69 ++++++++++++++ src/main/deploy/pathplanner/autos/1.5.auto | 88 +++++++++++++++++ src/main/deploy/pathplanner/autos/2.1.auto | 17 +++- .../pathplanner/autos/{2.auto => 2.2.auto} | 19 +++- src/main/deploy/pathplanner/autos/2.3.auto | 63 ++++++++++++ src/main/deploy/pathplanner/autos/2.4.auto | 69 ++++++++++++++ src/main/deploy/pathplanner/autos/2.5.auto | 88 +++++++++++++++++ src/main/deploy/pathplanner/autos/3.1.auto | 17 +++- .../pathplanner/autos/{3.auto => 3.2.auto} | 19 +++- src/main/deploy/pathplanner/autos/3.3.auto | 63 ++++++++++++ src/main/deploy/pathplanner/autos/3.4.auto | 69 ++++++++++++++ src/main/deploy/pathplanner/autos/3.5.auto | 88 +++++++++++++++++ src/main/deploy/pathplanner/autos/4.1.auto | 17 +++- .../pathplanner/autos/{4.auto => 4.2.auto} | 19 +++- src/main/deploy/pathplanner/autos/4.3.auto | 63 ++++++++++++ src/main/deploy/pathplanner/autos/4.4.auto | 69 ++++++++++++++ src/main/deploy/pathplanner/autos/4.5.auto | 88 +++++++++++++++++ src/main/deploy/pathplanner/autos/5.1.auto | 24 ++++- src/main/deploy/pathplanner/autos/5.2.auto | 51 ++++++++++ src/main/deploy/pathplanner/autos/5.3.auto | 70 ++++++++++++++ src/main/deploy/pathplanner/autos/5.4.auto | 76 +++++++++++++++ src/main/deploy/pathplanner/autos/5.5.auto | 95 +++++++++++++++++++ src/main/deploy/pathplanner/autos/5.auto | 31 ------ src/main/deploy/pathplanner/autos/6.1.auto | 17 +++- .../pathplanner/autos/{6.auto => 6.2.auto} | 19 +++- src/main/deploy/pathplanner/autos/6.3.auto | 63 ++++++++++++ src/main/deploy/pathplanner/autos/6.4.auto | 69 ++++++++++++++ src/main/deploy/pathplanner/autos/6.5.auto | 88 +++++++++++++++++ src/main/java/frc/robot/RobotContainer.java | 19 +++- src/main/java/frc/robot/command/Lancer.java | 2 +- .../java/frc/robot/command/Lancerampli.java | 2 +- 34 files changed, 1586 insertions(+), 64 deletions(-) rename src/main/deploy/pathplanner/autos/{1.auto => 1.2.auto} (53%) create mode 100644 src/main/deploy/pathplanner/autos/1.3.auto create mode 100644 src/main/deploy/pathplanner/autos/1.4.auto create mode 100644 src/main/deploy/pathplanner/autos/1.5.auto rename src/main/deploy/pathplanner/autos/{2.auto => 2.2.auto} (53%) create mode 100644 src/main/deploy/pathplanner/autos/2.3.auto create mode 100644 src/main/deploy/pathplanner/autos/2.4.auto create mode 100644 src/main/deploy/pathplanner/autos/2.5.auto rename src/main/deploy/pathplanner/autos/{3.auto => 3.2.auto} (53%) create mode 100644 src/main/deploy/pathplanner/autos/3.3.auto create mode 100644 src/main/deploy/pathplanner/autos/3.4.auto create mode 100644 src/main/deploy/pathplanner/autos/3.5.auto rename src/main/deploy/pathplanner/autos/{4.auto => 4.2.auto} (53%) create mode 100644 src/main/deploy/pathplanner/autos/4.3.auto create mode 100644 src/main/deploy/pathplanner/autos/4.4.auto create mode 100644 src/main/deploy/pathplanner/autos/4.5.auto create mode 100644 src/main/deploy/pathplanner/autos/5.2.auto create mode 100644 src/main/deploy/pathplanner/autos/5.3.auto create mode 100644 src/main/deploy/pathplanner/autos/5.4.auto create mode 100644 src/main/deploy/pathplanner/autos/5.5.auto delete mode 100644 src/main/deploy/pathplanner/autos/5.auto rename src/main/deploy/pathplanner/autos/{6.auto => 6.2.auto} (54%) create mode 100644 src/main/deploy/pathplanner/autos/6.3.auto create mode 100644 src/main/deploy/pathplanner/autos/6.4.auto create mode 100644 src/main/deploy/pathplanner/autos/6.5.auto diff --git a/src/main/deploy/pathplanner/autos/1.1.auto b/src/main/deploy/pathplanner/autos/1.1.auto index 3be6cd9..819cf26 100644 --- a/src/main/deploy/pathplanner/autos/1.1.auto +++ b/src/main/deploy/pathplanner/autos/1.1.auto @@ -12,9 +12,22 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "1.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/1.auto b/src/main/deploy/pathplanner/autos/1.2.auto similarity index 53% rename from src/main/deploy/pathplanner/autos/1.auto rename to src/main/deploy/pathplanner/autos/1.2.auto index 8375003..a557e76 100644 --- a/src/main/deploy/pathplanner/autos/1.auto +++ b/src/main/deploy/pathplanner/autos/1.2.auto @@ -12,15 +12,28 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "1.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } }, { "type": "path", "data": { - "pathName": "1.2" + "pathName": "1.1" } } ] diff --git a/src/main/deploy/pathplanner/autos/1.3.auto b/src/main/deploy/pathplanner/autos/1.3.auto new file mode 100644 index 0000000..f749089 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/1.3.auto @@ -0,0 +1,63 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3, + "y": 5.55 + }, + "rotation": 180.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "1.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "1", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/1.4.auto b/src/main/deploy/pathplanner/autos/1.4.auto new file mode 100644 index 0000000..fa1607d --- /dev/null +++ b/src/main/deploy/pathplanner/autos/1.4.auto @@ -0,0 +1,69 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3, + "y": 5.55 + }, + "rotation": 180.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "1.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "1.2" + } + } + ] + } + }, + "folder": "1", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/1.5.auto b/src/main/deploy/pathplanner/autos/1.5.auto new file mode 100644 index 0000000..8eb44dc --- /dev/null +++ b/src/main/deploy/pathplanner/autos/1.5.auto @@ -0,0 +1,88 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3, + "y": 5.55 + }, + "rotation": 180.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "1.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "1.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "1", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/2.1.auto b/src/main/deploy/pathplanner/autos/2.1.auto index 5f0cce7..f1871dc 100644 --- a/src/main/deploy/pathplanner/autos/2.1.auto +++ b/src/main/deploy/pathplanner/autos/2.1.auto @@ -12,9 +12,22 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "2.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/2.auto b/src/main/deploy/pathplanner/autos/2.2.auto similarity index 53% rename from src/main/deploy/pathplanner/autos/2.auto rename to src/main/deploy/pathplanner/autos/2.2.auto index 87988db..8cc5cf1 100644 --- a/src/main/deploy/pathplanner/autos/2.auto +++ b/src/main/deploy/pathplanner/autos/2.2.auto @@ -12,15 +12,28 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "2.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } }, { "type": "path", "data": { - "pathName": "2.2" + "pathName": "2.1" } } ] diff --git a/src/main/deploy/pathplanner/autos/2.3.auto b/src/main/deploy/pathplanner/autos/2.3.auto new file mode 100644 index 0000000..9664be9 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/2.3.auto @@ -0,0 +1,63 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 4.4 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "2.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "2", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/2.4.auto b/src/main/deploy/pathplanner/autos/2.4.auto new file mode 100644 index 0000000..4bd326d --- /dev/null +++ b/src/main/deploy/pathplanner/autos/2.4.auto @@ -0,0 +1,69 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 4.4 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "2.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "2.2" + } + } + ] + } + }, + "folder": "2", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/2.5.auto b/src/main/deploy/pathplanner/autos/2.5.auto new file mode 100644 index 0000000..4db4968 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/2.5.auto @@ -0,0 +1,88 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 4.4 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "2.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "2.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "2", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/3.1.auto b/src/main/deploy/pathplanner/autos/3.1.auto index d9f0551..60135e2 100644 --- a/src/main/deploy/pathplanner/autos/3.1.auto +++ b/src/main/deploy/pathplanner/autos/3.1.auto @@ -12,9 +12,22 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "3.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/3.auto b/src/main/deploy/pathplanner/autos/3.2.auto similarity index 53% rename from src/main/deploy/pathplanner/autos/3.auto rename to src/main/deploy/pathplanner/autos/3.2.auto index 93406f2..fab233e 100644 --- a/src/main/deploy/pathplanner/autos/3.auto +++ b/src/main/deploy/pathplanner/autos/3.2.auto @@ -12,15 +12,28 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "3.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } }, { "type": "path", "data": { - "pathName": "3.2" + "pathName": "3.1" } } ] diff --git a/src/main/deploy/pathplanner/autos/3.3.auto b/src/main/deploy/pathplanner/autos/3.3.auto new file mode 100644 index 0000000..e899dae --- /dev/null +++ b/src/main/deploy/pathplanner/autos/3.3.auto @@ -0,0 +1,63 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 6.7 + }, + "rotation": -120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "3.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "3", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/3.4.auto b/src/main/deploy/pathplanner/autos/3.4.auto new file mode 100644 index 0000000..ee52ad4 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/3.4.auto @@ -0,0 +1,69 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 6.7 + }, + "rotation": -120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "3.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "3.2" + } + } + ] + } + }, + "folder": "3", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/3.5.auto b/src/main/deploy/pathplanner/autos/3.5.auto new file mode 100644 index 0000000..a22e873 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/3.5.auto @@ -0,0 +1,88 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 6.7 + }, + "rotation": -120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "3.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "3.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "3", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/4.1.auto b/src/main/deploy/pathplanner/autos/4.1.auto index a7fa3fa..c55e797 100644 --- a/src/main/deploy/pathplanner/autos/4.1.auto +++ b/src/main/deploy/pathplanner/autos/4.1.auto @@ -12,9 +12,22 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "4.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/4.auto b/src/main/deploy/pathplanner/autos/4.2.auto similarity index 53% rename from src/main/deploy/pathplanner/autos/4.auto rename to src/main/deploy/pathplanner/autos/4.2.auto index 1eb4acc..873f45d 100644 --- a/src/main/deploy/pathplanner/autos/4.auto +++ b/src/main/deploy/pathplanner/autos/4.2.auto @@ -12,15 +12,28 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "4.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } }, { "type": "path", "data": { - "pathName": "4.2" + "pathName": "4.1" } } ] diff --git a/src/main/deploy/pathplanner/autos/4.3.auto b/src/main/deploy/pathplanner/autos/4.3.auto new file mode 100644 index 0000000..309d666 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/4.3.auto @@ -0,0 +1,63 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.2, + "y": 5.55 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "4.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "4", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/4.4.auto b/src/main/deploy/pathplanner/autos/4.4.auto new file mode 100644 index 0000000..1921381 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/4.4.auto @@ -0,0 +1,69 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.2, + "y": 5.55 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "4.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "4.2" + } + } + ] + } + }, + "folder": "4", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/4.5.auto b/src/main/deploy/pathplanner/autos/4.5.auto new file mode 100644 index 0000000..3e57efa --- /dev/null +++ b/src/main/deploy/pathplanner/autos/4.5.auto @@ -0,0 +1,88 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.2, + "y": 5.55 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "4.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "4.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "4", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/5.1.auto b/src/main/deploy/pathplanner/autos/5.1.auto index e839fb2..bc613d0 100644 --- a/src/main/deploy/pathplanner/autos/5.1.auto +++ b/src/main/deploy/pathplanner/autos/5.1.auto @@ -12,9 +12,29 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "5.1" + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/5.2.auto b/src/main/deploy/pathplanner/autos/5.2.auto new file mode 100644 index 0000000..209d455 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.2.auto @@ -0,0 +1,51 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.85, + "y": 4.4 + }, + "rotation": 60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.1" + } + } + ] + } + }, + "folder": "5", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/5.3.auto b/src/main/deploy/pathplanner/autos/5.3.auto new file mode 100644 index 0000000..9cd6456 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.3.auto @@ -0,0 +1,70 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.85, + "y": 4.4 + }, + "rotation": 60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "5", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/5.4.auto b/src/main/deploy/pathplanner/autos/5.4.auto new file mode 100644 index 0000000..dd425d2 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.4.auto @@ -0,0 +1,76 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.85, + "y": 4.4 + }, + "rotation": 60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.2" + } + } + ] + } + }, + "folder": "5", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/5.5.auto b/src/main/deploy/pathplanner/autos/5.5.auto new file mode 100644 index 0000000..a1412af --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.5.auto @@ -0,0 +1,95 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.85, + "y": 4.4 + }, + "rotation": 60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + } + ] + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "5.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "5", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/5.auto b/src/main/deploy/pathplanner/autos/5.auto deleted file mode 100644 index 0ba9482..0000000 --- a/src/main/deploy/pathplanner/autos/5.auto +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": 1.0, - "startingPose": { - "position": { - "x": 15.85, - "y": 4.4 - }, - "rotation": 60.0 - }, - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "5.1" - } - }, - { - "type": "path", - "data": { - "pathName": "5.2" - } - } - ] - } - }, - "folder": "5", - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/6.1.auto b/src/main/deploy/pathplanner/autos/6.1.auto index 94fe39d..1733bae 100644 --- a/src/main/deploy/pathplanner/autos/6.1.auto +++ b/src/main/deploy/pathplanner/autos/6.1.auto @@ -12,9 +12,22 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "6.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } } ] diff --git a/src/main/deploy/pathplanner/autos/6.auto b/src/main/deploy/pathplanner/autos/6.2.auto similarity index 54% rename from src/main/deploy/pathplanner/autos/6.auto rename to src/main/deploy/pathplanner/autos/6.2.auto index 4624edd..adc3a77 100644 --- a/src/main/deploy/pathplanner/autos/6.auto +++ b/src/main/deploy/pathplanner/autos/6.2.auto @@ -12,15 +12,28 @@ "data": { "commands": [ { - "type": "path", + "type": "deadline", "data": { - "pathName": "6.1" + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] } }, { "type": "path", "data": { - "pathName": "6.2" + "pathName": "6.1" } } ] diff --git a/src/main/deploy/pathplanner/autos/6.3.auto b/src/main/deploy/pathplanner/autos/6.3.auto new file mode 100644 index 0000000..ca3fe4a --- /dev/null +++ b/src/main/deploy/pathplanner/autos/6.3.auto @@ -0,0 +1,63 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.8, + "y": 6.65 + }, + "rotation": -60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "6.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "6", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/6.4.auto b/src/main/deploy/pathplanner/autos/6.4.auto new file mode 100644 index 0000000..8716b08 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/6.4.auto @@ -0,0 +1,69 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.8, + "y": 6.65 + }, + "rotation": -60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "6.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "6.2" + } + } + ] + } + }, + "folder": "6", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/6.5.auto b/src/main/deploy/pathplanner/autos/6.5.auto new file mode 100644 index 0000000..52cf9b4 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/6.5.auto @@ -0,0 +1,88 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.8, + "y": 6.65 + }, + "rotation": -60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "6.1" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "balyer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "6.2" + } + }, + { + "type": "deadline", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "lancer" + } + }, + { + "type": "wait", + "data": { + "waitTime": 3.0 + } + } + ] + } + } + ] + } + }, + "folder": "6", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 1f1e0ef..79ac84d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,8 +4,13 @@ package frc.robot; +import com.pathplanner.lib.auto.AutoBuilder; +import com.pathplanner.lib.auto.NamedCommands; +import com.pathplanner.lib.commands.PathPlannerAuto; + import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.math.MathUtil; +import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; @@ -19,7 +24,9 @@ import edu.wpi.first.wpilibj2.command.button.CommandXboxController; import frc.robot.command.Balayer; import frc.robot.command.GuiderBas; import frc.robot.command.GuiderHaut; - +import frc.robot.command.Lancer; +import frc.robot.command.LancerNote; +import frc.robot.command.Lancerampli; // Subsystems import frc.robot.subsystem.Accumulateur; import frc.robot.subsystem.Balayeuse; @@ -30,7 +37,7 @@ import frc.robot.subsystem.Lanceur; public class RobotContainer { - + private final SendableChooser autoChooser; Drive drive = new Drive(); Accumulateur accumulateur = new Accumulateur(); Balayeuse balayeuse = new Balayeuse(); @@ -40,11 +47,13 @@ public class RobotContainer { Balayer balayer = new Balayer(balayeuse, accumulateur); GuiderHaut guiderHaut = new GuiderHaut(guideur); GuiderBas guiderBas = new GuiderBas(guideur); - + LancerNote lancernote = new LancerNote(lanceur, accumulateur); + Lancerampli lancerampli = new Lancerampli(lanceur); CommandJoystick joystick = new CommandJoystick(0); CommandXboxController manette = new CommandXboxController(1); public RobotContainer() { + autoChooser = AutoBuilder.buildAutoChooser(); CameraServer.startAutomaticCapture(); manette.a().onTrue(guiderBas); @@ -53,6 +62,8 @@ public class RobotContainer { drive.setDefaultCommand(new RunCommand(()->{ drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); },drive)); + NamedCommands.registerCommand("balayer",balayer); + NamedCommands.registerCommand("lancer", lancernote); } private void configureBindings() { @@ -62,6 +73,6 @@ public class RobotContainer { } public Command getAutonomousCommand() { - return new SequentialCommandGroup(null); + return null; } } diff --git a/src/main/java/frc/robot/command/Lancer.java b/src/main/java/frc/robot/command/Lancer.java index 2d62c50..20e58e1 100644 --- a/src/main/java/frc/robot/command/Lancer.java +++ b/src/main/java/frc/robot/command/Lancer.java @@ -13,7 +13,7 @@ import frc.robot.subsystem.Lanceur; public class Lancer extends Command { /** Creates a new Lanceur. */ private Lanceur lanceur; - public Lancer() { + public Lancer(Lanceur lanceur) { this.lanceur = lanceur; // Use addRequirements() here to declare subsystem dependencies. addRequirements(lanceur); diff --git a/src/main/java/frc/robot/command/Lancerampli.java b/src/main/java/frc/robot/command/Lancerampli.java index ef4ed14..81701e7 100644 --- a/src/main/java/frc/robot/command/Lancerampli.java +++ b/src/main/java/frc/robot/command/Lancerampli.java @@ -15,7 +15,7 @@ public class Lancerampli extends Command { private Lanceur lanceur; - public Lancerampli() { + public Lancerampli(Lanceur lanceur) { // Use addRequirements() here to declare subsystem dependencies. addRequirements(lanceur); this.lanceur = lanceur;