From 0542700d4dbd1b32e17766ef44fdac91df40bdc1 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Tue, 23 Jan 2024 19:53:48 -0500 Subject: [PATCH 1/2] mode auto --- .pathplanner/settings.json | 8 +++- src/main/deploy/pathplanner/autos/4.auto | 19 +++++++-- src/main/deploy/pathplanner/autos/5.auto | 31 ++++++++++++++ src/main/deploy/pathplanner/autos/6.auto | 31 ++++++++++++++ src/main/deploy/pathplanner/paths/4.1.path | 32 ++++---------- src/main/deploy/pathplanner/paths/4.2.path | 49 ++++++++++++++++++++++ src/main/deploy/pathplanner/paths/5.1.path | 49 ++++++++++++++++++++++ src/main/deploy/pathplanner/paths/5.2.path | 49 ++++++++++++++++++++++ src/main/deploy/pathplanner/paths/6.1.path | 49 ++++++++++++++++++++++ src/main/deploy/pathplanner/paths/6.2.path | 49 ++++++++++++++++++++++ 10 files changed, 337 insertions(+), 29 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/5.auto create mode 100644 src/main/deploy/pathplanner/autos/6.auto create mode 100644 src/main/deploy/pathplanner/paths/4.2.path create mode 100644 src/main/deploy/pathplanner/paths/5.1.path create mode 100644 src/main/deploy/pathplanner/paths/5.2.path create mode 100644 src/main/deploy/pathplanner/paths/6.1.path create mode 100644 src/main/deploy/pathplanner/paths/6.2.path diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 6aafa9f..6bd2033 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -6,15 +6,19 @@ "1", "2", "3", + "4", + "5", "7", - "4" + "6" ], "autoFolders": [ "1", "2", "3", + "4", + "5", "7", - "4" + "6" ], "defaultMaxVel": 3.0, "defaultMaxAccel": 3.0, diff --git a/src/main/deploy/pathplanner/autos/4.auto b/src/main/deploy/pathplanner/autos/4.auto index d585e63..1eb4acc 100644 --- a/src/main/deploy/pathplanner/autos/4.auto +++ b/src/main/deploy/pathplanner/autos/4.auto @@ -2,15 +2,28 @@ "version": 1.0, "startingPose": { "position": { - "x": 2, - "y": 2 + "x": 15.2, + "y": 5.55 }, "rotation": 0 }, "command": { "type": "sequential", "data": { - "commands": [] + "commands": [ + { + "type": "path", + "data": { + "pathName": "4.1" + } + }, + { + "type": "path", + "data": { + "pathName": "4.2" + } + } + ] } }, "folder": "4", diff --git a/src/main/deploy/pathplanner/autos/5.auto b/src/main/deploy/pathplanner/autos/5.auto new file mode 100644 index 0000000..0ba9482 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.auto @@ -0,0 +1,31 @@ +{ + "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.auto b/src/main/deploy/pathplanner/autos/6.auto new file mode 100644 index 0000000..4624edd --- /dev/null +++ b/src/main/deploy/pathplanner/autos/6.auto @@ -0,0 +1,31 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.8, + "y": 6.65 + }, + "rotation": -60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "6.1" + } + }, + { + "type": "path", + "data": { + "pathName": "6.2" + } + } + ] + } + }, + "folder": "6", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/4.1.path b/src/main/deploy/pathplanner/paths/4.1.path index ca790f1..9aad3ce 100644 --- a/src/main/deploy/pathplanner/paths/4.1.path +++ b/src/main/deploy/pathplanner/paths/4.1.path @@ -3,41 +3,25 @@ "waypoints": [ { "anchor": { - "x": 2.0, - "y": 7.0 + "x": 15.2, + "y": 5.55 }, "prevControl": null, "nextControl": { - "x": 3.0, - "y": 6.5 + "x": 15.2104492025505, + "y": 5.55 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 5.0, - "y": 5.0 + "x": 14.0, + "y": 5.55 }, "prevControl": { - "x": 4.0, - "y": 6.0 - }, - "nextControl": { - "x": 6.0, - "y": 4.0 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.0, - "y": 1.0 - }, - "prevControl": { - "x": 6.75, - "y": 2.5 + "x": 13.969168557398792, + "y": 5.55 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/4.2.path b/src/main/deploy/pathplanner/paths/4.2.path new file mode 100644 index 0000000..e666b95 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/4.2.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 14.0, + "y": 5.55 + }, + "prevControl": null, + "nextControl": { + "x": 15.118033988749895, + "y": 5.55 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 15.2, + "y": 5.55 + }, + "prevControl": { + "x": 15.192584874480913, + "y": 5.547612425391122 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": "4", + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/5.1.path b/src/main/deploy/pathplanner/paths/5.1.path new file mode 100644 index 0000000..51aaa81 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/5.1.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 15.85, + "y": 4.4 + }, + "prevControl": null, + "nextControl": { + "x": 15.85312975966851, + "y": 4.40542090276134 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 14.0, + "y": 4.1 + }, + "prevControl": { + "x": 13.990250241783144, + "y": 4.090250241783143 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": "5", + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/5.2.path b/src/main/deploy/pathplanner/paths/5.2.path new file mode 100644 index 0000000..aa123ab --- /dev/null +++ b/src/main/deploy/pathplanner/paths/5.2.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 14.0, + "y": 4.1 + }, + "prevControl": null, + "nextControl": { + "x": 14.002432289858724, + "y": 4.1 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 15.85, + "y": 4.4 + }, + "prevControl": { + "x": 15.82771353771501, + "y": 4.361398715001432 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 60.38412103232163, + "rotateFast": false + }, + "reversed": false, + "folder": "5", + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/6.1.path b/src/main/deploy/pathplanner/paths/6.1.path new file mode 100644 index 0000000..8e88e49 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/6.1.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 15.8, + "y": 6.65 + }, + "prevControl": null, + "nextControl": { + "x": 15.810493547475788, + "y": 6.65 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 14.0, + "y": 7.0 + }, + "prevControl": { + "x": 14.009749758216856, + "y": 6.990250241783143 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": "6", + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/6.2.path b/src/main/deploy/pathplanner/paths/6.2.path new file mode 100644 index 0000000..8a1d6d0 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/6.2.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 14.0, + "y": 7.0 + }, + "prevControl": null, + "nextControl": { + "x": 14.023088833925678, + "y": 7.0 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 15.8, + "y": 6.65 + }, + "prevControl": { + "x": 15.806819642142848, + "y": 6.668834620329574 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": -58.20379119767198, + "rotateFast": false + }, + "reversed": false, + "folder": "6", + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file From 370d4ca87ede30c2b1dbeb2aa0cd600636128ccb Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Tue, 23 Jan 2024 19:56:02 -0500 Subject: [PATCH 2/2] auto --- src/main/deploy/pathplanner/autos/1.1.auto | 25 ++++++++++++++++ src/main/deploy/pathplanner/autos/2.1.auto | 25 ++++++++++++++++ src/main/deploy/pathplanner/autos/3.1.auto | 25 ++++++++++++++++ src/main/deploy/pathplanner/autos/4.1.auto | 25 ++++++++++++++++ src/main/deploy/pathplanner/autos/5.1.auto | 25 ++++++++++++++++ src/main/java/frc/robot/command/Lancer.java | 32 +++++++++++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 src/main/deploy/pathplanner/autos/1.1.auto create mode 100644 src/main/deploy/pathplanner/autos/2.1.auto create mode 100644 src/main/deploy/pathplanner/autos/3.1.auto create mode 100644 src/main/deploy/pathplanner/autos/4.1.auto create mode 100644 src/main/deploy/pathplanner/autos/5.1.auto create mode 100644 src/main/java/frc/robot/command/Lancer.java diff --git a/src/main/deploy/pathplanner/autos/1.1.auto b/src/main/deploy/pathplanner/autos/1.1.auto new file mode 100644 index 0000000..3be6cd9 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/1.1.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3, + "y": 5.55 + }, + "rotation": 180.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "1.1" + } + } + ] + } + }, + "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 new file mode 100644 index 0000000..5f0cce7 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/2.1.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 4.4 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "2.1" + } + } + ] + } + }, + "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 new file mode 100644 index 0000000..d9f0551 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/3.1.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.7, + "y": 6.7 + }, + "rotation": -120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "3.1" + } + } + ] + } + }, + "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 new file mode 100644 index 0000000..a7fa3fa --- /dev/null +++ b/src/main/deploy/pathplanner/autos/4.1.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.2, + "y": 5.55 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "4.1" + } + } + ] + } + }, + "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 new file mode 100644 index 0000000..e839fb2 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/5.1.auto @@ -0,0 +1,25 @@ +{ + "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" + } + } + ] + } + }, + "folder": "5", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/java/frc/robot/command/Lancer.java b/src/main/java/frc/robot/command/Lancer.java new file mode 100644 index 0000000..feea8c0 --- /dev/null +++ b/src/main/java/frc/robot/command/Lancer.java @@ -0,0 +1,32 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc.robot.command; + +import edu.wpi.first.wpilibj2.command.Command; + +public class Lancer extends Command { + /** Creates a new Lanceur. */ + public Lancer() { + // Use addRequirements() here to declare subsystem dependencies. + } + + // Called when the command is initially scheduled. + @Override + public void initialize() {} + + // Called every time the scheduler runs while the command is scheduled. + @Override + public void execute() {} + + // Called once the command ends or is interrupted. + @Override + public void end(boolean interrupted) {} + + // Returns true when the command should end. + @Override + public boolean isFinished() { + return false; + } +}