From d59c35b4db112f4135f1f252d9375f8945239bac Mon Sep 17 00:00:00 2001 From: Jack Lingle Date: Tue, 15 Oct 2024 15:21:06 -0400 Subject: [PATCH 1/5] Auto + Alignment (#23) * add PhoenixDriveConstants * add drive constants file and PhoenixDrive empty class * add very basic PhoenixDrive example; * fix format * add startSimThread method * add pathplanner method * move drive into separate folder; add DriveWithJoysticks and chassisSpeed methods and commands to be able to drive robot * fix files * add telemetry class * try fixing sim not working * fix sim * move sim loop period to constants and remove print statements * add partially filtered joystick inputs * sim works better now, updated filtering * add sys id routines based on phoenix 6 example * only configure sys id under test mode * add default and break statements to setSysIdRoutine * add button bindings for setting sys id type and log type * move commands folder out of subsystems folder * add auto path example * add basic example auto to test functionality of drive * add align to target command for autos * align to target command will be for teleop; pathplanner override rotation for auto * add named command to align to speaker * switch to using align to target command for auto again * fix all merging issues * use pathplanner override rotation so bot can rotate while moving * fix path flipping to be correct * migrate finding pose and heading to the ALignToTarget Command, add strafing to command, and update commands in RobotContainer to reflect changes * add intake named command that intakes until note is registered then stops * add description to command * fix errors form merge and confirm working * add shoot note named command and isDriveAligned method in drive subsystem * refactor drive to have the alignment logic * pid gains need tuning but FieldCentricFacingAngle swerve request works great * update button bindings for targets and add comand for setting aligning to true * fix formatting from merge * fix applyGoalSpeeds conditional * add alignment check to idle * remove drive aligned supplier on this branch --- .../deploy/pathplanner/autos/Example.auto | 37 ++++ src/main/deploy/pathplanner/navgrid.json | 1 + .../pathplanner/paths/Example Path.path | 49 +++++ .../pathplanner/paths/Go To Speaker.path | 49 +++++ src/main/java/frc/robot/BuildConstants.java | 12 +- src/main/java/frc/robot/Robot.java | 4 +- src/main/java/frc/robot/RobotContainer.java | 39 +++- .../constants/PhoenixDriveConstants.java | 5 + .../robot/subsystems/drive/PhoenixDrive.java | 187 +++++++++++++++--- 9 files changed, 342 insertions(+), 41 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Example.auto create mode 100644 src/main/deploy/pathplanner/navgrid.json create mode 100644 src/main/deploy/pathplanner/paths/Example Path.path create mode 100644 src/main/deploy/pathplanner/paths/Go To Speaker.path diff --git a/src/main/deploy/pathplanner/autos/Example.auto b/src/main/deploy/pathplanner/autos/Example.auto new file mode 100644 index 0000000..af8c35c --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Example.auto @@ -0,0 +1,37 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 15.610759508556056, + "y": 7.131113651116192 + }, + "rotation": 0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Example Path" + } + }, + { + "type": "named", + "data": { + "name": "alignToSpeaker" + } + }, + { + "type": "path", + "data": { + "pathName": "Go To Speaker" + } + } + ] + } + }, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/navgrid.json b/src/main/deploy/pathplanner/navgrid.json new file mode 100644 index 0000000..bab0da9 --- /dev/null +++ b/src/main/deploy/pathplanner/navgrid.json @@ -0,0 +1 @@ +{"field_size":{"x":16.54,"y":8.21},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,true,true,true],[true,true,true,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,true,true,true,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true],[true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Example Path.path b/src/main/deploy/pathplanner/paths/Example Path.path new file mode 100644 index 0000000..b404d50 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Example Path.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 15.610759508556056, + "y": 7.131113651116192 + }, + "prevControl": null, + "nextControl": { + "x": 14.342487347011732, + "y": 7.091266733459394 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 12.805500874890638, + "y": 1.2715976867138918 + }, + "prevControl": { + "x": 14.728901494840027, + "y": 2.562079605640691 + }, + "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": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Go To Speaker.path b/src/main/deploy/pathplanner/paths/Go To Speaker.path new file mode 100644 index 0000000..1acb69d --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Go To Speaker.path @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 13.23425608425291, + "y": 1.6226781296155184 + }, + "prevControl": null, + "nextControl": { + "x": 14.23425608425291, + "y": 1.1226781296155184 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 14.616189945342853, + "y": 4.381320026528942 + }, + "prevControl": { + "x": 14.366189945342853, + "y": 5.881320026528945 + }, + "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": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/java/frc/robot/BuildConstants.java b/src/main/java/frc/robot/BuildConstants.java index 524169b..09f3bc7 100644 --- a/src/main/java/frc/robot/BuildConstants.java +++ b/src/main/java/frc/robot/BuildConstants.java @@ -5,12 +5,12 @@ public final class BuildConstants { public static final String MAVEN_GROUP = ""; public static final String MAVEN_NAME = "high-key-2024"; public static final String VERSION = "unspecified"; - public static final int GIT_REVISION = 13; - public static final String GIT_SHA = "fdfd3fb1fa28dd5bd223aa8e7107557322718d32"; - public static final String GIT_DATE = "2024-10-12 10:39:59 EDT"; - public static final String GIT_BRANCH = "real-sensor-integration"; - public static final String BUILD_DATE = "2024-10-12 11:33:56 EDT"; - public static final long BUILD_UNIX_TIME = 1728747236082L; + public static final int GIT_REVISION = 60; + public static final String GIT_SHA = "379a074db10514aa268aefd9240aca7956a2af90"; + public static final String GIT_DATE = "2024-10-15 09:08:31 EDT"; + public static final String GIT_BRANCH = "auto"; + public static final String BUILD_DATE = "2024-10-15 09:25:29 EDT"; + public static final long BUILD_UNIX_TIME = 1728998729381L; public static final int DIRTY = 1; private BuildConstants() {} diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 14b932c..a74819e 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -73,11 +73,11 @@ public void disabledExit() {} @Override public void autonomousInit() { - /*m_autonomousCommand = m_robotContainer.getAutonomousCommand(); + m_autonomousCommand = m_robotContainer.getAutonomousCommand(); if (m_autonomousCommand != null) { m_autonomousCommand.schedule(); - }*/ + } } @Override diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index d547832..cf41b35 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -1,10 +1,12 @@ package frc.robot; +import com.pathplanner.lib.auto.NamedCommands; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +import edu.wpi.first.wpilibj2.command.FunctionalCommand; import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.button.CommandJoystick; @@ -59,11 +61,31 @@ public class RobotContainer { public RobotContainer() { configureSubsystems(); - configureModes(); + configureNamedCommands(); configureBindings(); configureModes(); } + private void configureNamedCommands() { + NamedCommands.registerCommand( + "alignToSpeaker", + new InstantCommand(() -> drive.setAlignTarget(AlignTarget.SPEAKER))); + + NamedCommands.registerCommand( + "intakeNote", + // intakes to start, ends by setting action to NONE when intake subsystem has note + new FunctionalCommand( + () -> intakeSubsystem.run(IntakeAction.INTAKE), + () -> {}, + interrupted -> intakeSubsystem.run(IntakeAction.NONE), + () -> intakeSubsystem.hasNote(), + intakeSubsystem)); + + NamedCommands.registerCommand( + "shootNoteAtSpeaker", + new InstantCommand(() -> scoringSubsystem.setAction(ScoringAction.SHOOT))); + } + private void configureSubsystems() { if (FeatureFlags.runDrive) { initDrive(); @@ -315,19 +337,24 @@ private void configureBindings() { rightJoystick .povUp() - .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.UP))); + .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.SPEAKER))); rightJoystick .povDown() - .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.DOWN))); + .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.AMP))); rightJoystick .povLeft() - .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.LEFT))); + .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.SOURCE))); rightJoystick .povRight() - .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.RIGHT))); + .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.ENDGAME))); + + rightJoystick + .trigger() + .onTrue(new InstantCommand(() -> drive.setAligning(true))) + .onFalse(new InstantCommand(() -> drive.setAligning(false))); } } // spotless:on @@ -337,7 +364,7 @@ public void enabledInit() { } public Command getAutonomousCommand() { - return Commands.print("No autonomous command configured"); + return drive.getAutoPath("Example"); } private void configureModes() { diff --git a/src/main/java/frc/robot/constants/PhoenixDriveConstants.java b/src/main/java/frc/robot/constants/PhoenixDriveConstants.java index 98d598a..a5d131d 100644 --- a/src/main/java/frc/robot/constants/PhoenixDriveConstants.java +++ b/src/main/java/frc/robot/constants/PhoenixDriveConstants.java @@ -46,6 +46,11 @@ public enum AlignTarget { .withKV(0.12) .withKA(0.01); + public static final double alignmentkP = 1.5; + public static final double alignmentkI = 0.01; + public static final double alignmentkD = 0.15; + public static final double alignToleranceRadians = 0.1; + // The closed-loop output type to use for the steer motors; // This affects the PID/FF gains for the steer motors private static final ClosedLoopOutputType steerClosedLoopOutput = ClosedLoopOutputType.Voltage; diff --git a/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java b/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java index 1730246..a81a457 100644 --- a/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java +++ b/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java @@ -10,11 +10,14 @@ import com.ctre.phoenix6.mechanisms.swerve.SwerveModuleConstants; import com.ctre.phoenix6.mechanisms.swerve.SwerveRequest; import com.pathplanner.lib.auto.AutoBuilder; +import com.pathplanner.lib.commands.PathPlannerAuto; +import com.pathplanner.lib.controllers.PPHolonomicDriveController; import com.pathplanner.lib.pathfinding.LocalADStar; import com.pathplanner.lib.pathfinding.Pathfinding; import com.pathplanner.lib.util.HolonomicPathFollowerConfig; import com.pathplanner.lib.util.PIDConstants; import com.pathplanner.lib.util.ReplanningConfig; +import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.wpilibj.DriverStation; @@ -25,8 +28,10 @@ import edu.wpi.first.wpilibj2.command.CommandScheduler; import edu.wpi.first.wpilibj2.command.Subsystem; import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine; +import frc.robot.constants.FieldConstants; import frc.robot.constants.PhoenixDriveConstants; import frc.robot.constants.PhoenixDriveConstants.AlignTarget; +import java.util.Optional; import org.littletonrobotics.junction.Logger; public class PhoenixDrive extends SwerveDrivetrain implements Subsystem { @@ -96,6 +101,10 @@ public enum SysIdRoutineType { private SysIdRoutine routineToApply = SysIdRoutineTranslation; private AlignTarget alignTarget = AlignTarget.NONE; + private boolean aligning = false; + + private ChassisSpeeds goalSpeeds = new ChassisSpeeds(); + private boolean fieldCentric = true; public PhoenixDrive( SwerveDrivetrainConstants driveConstants, @@ -146,8 +155,14 @@ private void configurePathPlanner() { PhoenixDriveConstants.kSpeedAt12VoltsMps, driveBaseRadius, new ReplanningConfig(false, false)), - () -> DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Red, + () -> DriverStation.getAlliance().orElse(Alliance.Red) == Alliance.Blue, this); + + PPHolonomicDriveController.setRotationTargetOverride(this::getAlignment); + } + + public Command getAutoPath(String pathName) { + return new PathPlannerAuto(pathName); } private void startSimThread() { @@ -170,6 +185,11 @@ public ChassisSpeeds getCurrentSpeeds() { } public void setGoalSpeeds(ChassisSpeeds goalSpeeds, boolean fieldCentric) { + this.goalSpeeds = goalSpeeds; + this.fieldCentric = fieldCentric; + } + + public void applyGoalSpeeds() { SwerveRequest request; Logger.recordOutput("Drive/goalSpeeds", goalSpeeds); @@ -182,17 +202,37 @@ public void setGoalSpeeds(ChassisSpeeds goalSpeeds, boolean fieldCentric) { < 1e-10 && Math.abs(goalSpeeds.omegaRadiansPerSecond) < 1e-10; Logger.recordOutput("Drive/idling", idling); - if (idling) { + + // sticks zeroed out will cause false idle when wanting alignment + if (idling && !aligning) { request = new SwerveRequest.Idle(); } else if (fieldCentric) { - request = - new SwerveRequest.FieldCentric() - .withVelocityX(goalSpeeds.vxMetersPerSecond) - .withVelocityY(goalSpeeds.vyMetersPerSecond) - .withRotationalRate(goalSpeeds.omegaRadiansPerSecond) - .withDeadband(0.0) - .withRotationalDeadband(0.0) - .withDriveRequestType(DriveRequestType.Velocity); + if (aligning) { + SwerveRequest.FieldCentricFacingAngle alignRequest = + new SwerveRequest.FieldCentricFacingAngle() + .withVelocityX(goalSpeeds.vxMetersPerSecond) + .withVelocityY(goalSpeeds.vyMetersPerSecond) + .withTargetDirection(this.getAlignment().get()) + .withDeadband(0.0) + .withRotationalDeadband(0.0) + .withDriveRequestType(DriveRequestType.Velocity); + + alignRequest.HeadingController.setPID( + PhoenixDriveConstants.alignmentkP, + PhoenixDriveConstants.alignmentkI, + PhoenixDriveConstants.alignmentkD); + + request = alignRequest; + } else { + request = + new SwerveRequest.FieldCentric() + .withVelocityX(goalSpeeds.vxMetersPerSecond) + .withVelocityY(goalSpeeds.vyMetersPerSecond) + .withRotationalRate(goalSpeeds.omegaRadiansPerSecond) + .withDeadband(0.0) + .withRotationalDeadband(0.0) + .withDriveRequestType(DriveRequestType.Velocity); + } } else { request = new SwerveRequest.RobotCentric() @@ -235,6 +275,113 @@ public Command sysIdDynamic(SysIdRoutine.Direction direction) { return routineToApply.dynamic(direction); } + public void setAlignTarget(AlignTarget alignTarget) { + this.alignTarget = alignTarget; + } + + public AlignTarget getAlignTarget() { + return alignTarget; + } + + public void setAligning(boolean aligning) { + this.aligning = aligning; + } + + public boolean isAligning() { + return aligning; + } + + // for scoring subsystem in auto + public boolean isDriveAligned() { + if (alignTarget != null && aligning) { + double desiredHeading = this.getAlignment().get().getRadians(); + double currentHeading = this.getState().Pose.getRotation().getRadians(); + + if (Math.abs(desiredHeading - currentHeading) + < PhoenixDriveConstants.alignToleranceRadians) { + return true; + } else { + return false; + } + } else { + return false; + } + } + + private Rotation2d getTargetHeading(Pose2d desiredTargetPose) { + Pose2d currentPose = this.getState().Pose; + + double targetVectorX = desiredTargetPose.getX() - currentPose.getX(); + double targetVectorY = desiredTargetPose.getY() - currentPose.getY(); + + Rotation2d desiredRotation = new Rotation2d(targetVectorX, targetVectorY); + return desiredRotation; + } + + public Optional getAlignment() { + switch (alignTarget) { + case SPEAKER: + if (!DriverStation.getAlliance().isEmpty() + && DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of( + getTargetHeading( + new Pose2d( + FieldConstants.fieldToBlueSpeaker, new Rotation2d()))); + } else { + return Optional.of( + getTargetHeading( + new Pose2d( + FieldConstants.fieldToRedSpeaker, new Rotation2d()))); + } + case AMP: + return Optional.of(FieldConstants.ampHeading); + case SOURCE: + if (DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of(FieldConstants.blueSourceHeading); + } else { + return Optional.of(FieldConstants.redSourceHeading); + } + case UP: + if (DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of(FieldConstants.blueUpHeading); + } else { + return Optional.of(FieldConstants.redUpHeading); + } + case DOWN: + if (DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of(FieldConstants.blueDownHeading); + } else { + return Optional.of(FieldConstants.redDownHeading); + } + case LEFT: + if (DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of(FieldConstants.blueLeftHeading); + } else { + return Optional.of(FieldConstants.redLeftHeading); + } + case RIGHT: + if (DriverStation.getAlliance().get() == Alliance.Blue) { + return Optional.of(FieldConstants.blueRightHeading); + } else { + return Optional.of(FieldConstants.redRightHeading); + } + default: + // no pose to align to so set target to none + this.setAlignTarget(AlignTarget.NONE); + return Optional.empty(); + } + } + + public void logDrivetrainData() { + SwerveDriveState state = getState(); + if (state.ModuleStates != null && state.ModuleTargets != null) { + for (int i = 0; i < 4; i++) { + Logger.recordOutput("Drive/module" + i + "/state", state.ModuleStates[i]); + Logger.recordOutput("Drive/module" + i + "/target", state.ModuleTargets[i]); + } + } + } + @Override public void periodic() { logDrivetrainData(); @@ -249,23 +396,9 @@ public void periodic() { }); hasAppliedOperatorPerspective = true; } - } - - public void logDrivetrainData() { - SwerveDriveState state = getState(); - if (state.ModuleStates != null && state.ModuleTargets != null) { - for (int i = 0; i < 4; i++) { - Logger.recordOutput("Drive/module" + i + "/state", state.ModuleStates[i]); - Logger.recordOutput("Drive/module" + i + "/target", state.ModuleTargets[i]); - } + if (DriverStation.isTeleop()) { + // sets request with velocity and rotational rate (alignment or right joystick) + applyGoalSpeeds(); } } - - public void setAlignTarget(AlignTarget alignTarget) { - this.alignTarget = alignTarget; - } - - public AlignTarget getAlignTarget() { - return alignTarget; - } } From 0689379a77e2ee48b488300416e770ffd139e5b0 Mon Sep 17 00:00:00 2001 From: aidnem <99768676+aidnem@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:54:04 -0400 Subject: [PATCH 2/5] Move align to driver left joystick trigger to match 2024 comp/A bot --- src/main/java/frc/robot/RobotContainer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index dfeb2d1..222806e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -376,6 +376,11 @@ private void configureBindings() { masher.povDown() .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.ENDGAME))); + leftJoystick + .trigger() + .onTrue(new InstantCommand(() -> drive.setAligning(true))) + .onFalse(new InstantCommand(() -> drive.setAligning(false))); + rightJoystick .povUp() .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.SPEAKER))); @@ -391,11 +396,6 @@ private void configureBindings() { rightJoystick .povRight() .onTrue(new InstantCommand(() -> drive.setAlignTarget(AlignTarget.ENDGAME))); - - rightJoystick - .trigger() - .onTrue(new InstantCommand(() -> drive.setAligning(true))) - .onFalse(new InstantCommand(() -> drive.setAligning(false))); } } // spotless:on From b788e1a32ab1e87596e632d656675549f8ac597d Mon Sep 17 00:00:00 2001 From: aidnem <99768676+aidnem@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:23:21 -0400 Subject: [PATCH 3/5] Update amping code to hopefully allow amping. We should either not use this or test it in the pits first. --- .../subsystems/scoring/ScoringSubsystem.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/scoring/ScoringSubsystem.java b/src/main/java/frc/robot/subsystems/scoring/ScoringSubsystem.java index 4f4597f..02d4510 100644 --- a/src/main/java/frc/robot/subsystems/scoring/ScoringSubsystem.java +++ b/src/main/java/frc/robot/subsystems/scoring/ScoringSubsystem.java @@ -291,8 +291,11 @@ private void prime() { } private void ampPrime() { - shooterIo.setShooterVelocityRPM(ScoringConstants.shooterAmpVelocityRPM); - aimerIo.setAimAngleRad(1.65); + // shooterIo.setShooterVelocityRPM(ScoringConstants.shooterAmpVelocityRPM); + // TODO: Test this out + aimerIo.setAimAngleRad( + 0.25); // This is actually in rotations and not radians, I really need to rename all + // of the aimer IO functions if (action != ScoringAction.SHOOT && action != ScoringAction.AMP_AIM) { state = ScoringState.IDLE; } else if (action == ScoringAction.SHOOT) { @@ -321,13 +324,17 @@ private void shoot() { } private void ampShoot() { - shooterIo.setKickerVolts(10); + shooterIo.setKickerVolts(-12); // TODO: Test if this kicks note forward or backward - if (shootTimer.get() > 1.0) { // TODO: Tune time - state = ScoringState.AMP_PRIME; + // I see no reason why amp should not shoot within 1 second but if it takes longer than + // that, we should probably let it + + // Therefore this is all commented out for now + /* if (shootTimer.get() > 1.0) { // TODO: Tune time + state = ScoringState.AMP_PRIME; shootTimer.stop(); - } + } */ } private void endgame() { From 25e47e3732202f32aea6befef08631586c3a3e1a Mon Sep 17 00:00:00 2001 From: Jack Lingle Date: Fri, 18 Oct 2024 14:30:34 -0400 Subject: [PATCH 4/5] remove untested paths and autos --- .../deploy/pathplanner/autos/Example.auto | 37 ----- .../deploy/pathplanner/paths/C1-E1-Slow.path | 49 ------- src/main/deploy/pathplanner/paths/C1-E1.path | 49 ------- .../deploy/pathplanner/paths/C2-E1-Close.path | 49 ------- .../deploy/pathplanner/paths/C2-E1-Slow.path | 49 ------- src/main/deploy/pathplanner/paths/C2-E1.path | 49 ------- .../pathplanner/paths/C3-E1-From-Stage.path | 70 --------- src/main/deploy/pathplanner/paths/C3-E1.path | 70 --------- .../deploy/pathplanner/paths/C3-E1_fast.path | 70 --------- src/main/deploy/pathplanner/paths/C3-E2.path | 67 --------- src/main/deploy/pathplanner/paths/C4-C3.path | 87 ------------ src/main/deploy/pathplanner/paths/C4-E1.path | 52 ------- src/main/deploy/pathplanner/paths/C4-E2.path | 73 ---------- .../deploy/pathplanner/paths/C4-E2_fast.path | 67 --------- src/main/deploy/pathplanner/paths/C5-E2.path | 49 ------- .../deploy/pathplanner/paths/C5-E2_fast.path | 67 --------- src/main/deploy/pathplanner/paths/E1-C1.path | 67 --------- src/main/deploy/pathplanner/paths/E1-C2.path | 73 ---------- .../deploy/pathplanner/paths/E1-C3-Stage.path | 70 --------- src/main/deploy/pathplanner/paths/E1-C3.path | 67 --------- src/main/deploy/pathplanner/paths/E2-C3.path | 67 --------- .../deploy/pathplanner/paths/E2-C3_fast.path | 67 --------- .../pathplanner/paths/E2-C4-No-Stage.path | 76 ---------- src/main/deploy/pathplanner/paths/E2-C4.path | 86 ----------- .../deploy/pathplanner/paths/E2-C4_fast.path | 70 --------- .../pathplanner/paths/Example Path.path | 49 ------- .../deploy/pathplanner/paths/FarEndgame.path | 52 ------- .../pathplanner/paths/Go To Speaker.path | 49 ------- .../deploy/pathplanner/paths/LeftEndgame.path | 52 ------- .../deploy/pathplanner/paths/New Path.path | 58 -------- .../pathplanner/paths/RightEndgame.path | 52 ------- src/main/deploy/pathplanner/paths/S1-W1.path | 55 ------- src/main/deploy/pathplanner/paths/S2-C1.path | 100 ------------- src/main/deploy/pathplanner/paths/S2-C2.path | 134 ------------------ src/main/deploy/pathplanner/paths/S2-W2.path | 49 ------- src/main/deploy/pathplanner/paths/S2-W3.path | 49 ------- src/main/deploy/pathplanner/paths/S3-C5.path | 76 ---------- src/main/deploy/pathplanner/paths/S3-W3.path | 84 ----------- .../deploy/pathplanner/paths/S4-C5_fast.path | 70 --------- src/main/deploy/pathplanner/paths/W1-C1.path | 67 --------- src/main/deploy/pathplanner/paths/W1-W2.path | 49 ------- src/main/deploy/pathplanner/paths/W2-C1.path | 70 --------- src/main/deploy/pathplanner/paths/W2-W1.path | 65 --------- src/main/deploy/pathplanner/paths/W2-W3.path | 49 ------- src/main/deploy/pathplanner/paths/W3-C5.path | 67 --------- src/main/deploy/pathplanner/paths/W3-W2.path | 65 --------- .../deploy/pathplanner/paths/rightSource.path | 55 ------- .../deploy/pathplanner/paths/shopSource.path | 49 ------- .../deploy/pathplanner/paths/speaker.path | 52 ------- 49 files changed, 3114 deletions(-) delete mode 100644 src/main/deploy/pathplanner/autos/Example.auto delete mode 100644 src/main/deploy/pathplanner/paths/C1-E1-Slow.path delete mode 100644 src/main/deploy/pathplanner/paths/C1-E1.path delete mode 100644 src/main/deploy/pathplanner/paths/C2-E1-Close.path delete mode 100644 src/main/deploy/pathplanner/paths/C2-E1-Slow.path delete mode 100644 src/main/deploy/pathplanner/paths/C2-E1.path delete mode 100644 src/main/deploy/pathplanner/paths/C3-E1-From-Stage.path delete mode 100644 src/main/deploy/pathplanner/paths/C3-E1.path delete mode 100644 src/main/deploy/pathplanner/paths/C3-E1_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/C3-E2.path delete mode 100644 src/main/deploy/pathplanner/paths/C4-C3.path delete mode 100644 src/main/deploy/pathplanner/paths/C4-E1.path delete mode 100644 src/main/deploy/pathplanner/paths/C4-E2.path delete mode 100644 src/main/deploy/pathplanner/paths/C4-E2_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/C5-E2.path delete mode 100644 src/main/deploy/pathplanner/paths/C5-E2_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/E1-C1.path delete mode 100644 src/main/deploy/pathplanner/paths/E1-C2.path delete mode 100644 src/main/deploy/pathplanner/paths/E1-C3-Stage.path delete mode 100644 src/main/deploy/pathplanner/paths/E1-C3.path delete mode 100644 src/main/deploy/pathplanner/paths/E2-C3.path delete mode 100644 src/main/deploy/pathplanner/paths/E2-C3_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/E2-C4-No-Stage.path delete mode 100644 src/main/deploy/pathplanner/paths/E2-C4.path delete mode 100644 src/main/deploy/pathplanner/paths/E2-C4_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/Example Path.path delete mode 100644 src/main/deploy/pathplanner/paths/FarEndgame.path delete mode 100644 src/main/deploy/pathplanner/paths/Go To Speaker.path delete mode 100644 src/main/deploy/pathplanner/paths/LeftEndgame.path delete mode 100644 src/main/deploy/pathplanner/paths/New Path.path delete mode 100644 src/main/deploy/pathplanner/paths/RightEndgame.path delete mode 100644 src/main/deploy/pathplanner/paths/S1-W1.path delete mode 100644 src/main/deploy/pathplanner/paths/S2-C1.path delete mode 100644 src/main/deploy/pathplanner/paths/S2-C2.path delete mode 100644 src/main/deploy/pathplanner/paths/S2-W2.path delete mode 100644 src/main/deploy/pathplanner/paths/S2-W3.path delete mode 100644 src/main/deploy/pathplanner/paths/S3-C5.path delete mode 100644 src/main/deploy/pathplanner/paths/S3-W3.path delete mode 100644 src/main/deploy/pathplanner/paths/S4-C5_fast.path delete mode 100644 src/main/deploy/pathplanner/paths/W1-C1.path delete mode 100644 src/main/deploy/pathplanner/paths/W1-W2.path delete mode 100644 src/main/deploy/pathplanner/paths/W2-C1.path delete mode 100644 src/main/deploy/pathplanner/paths/W2-W1.path delete mode 100644 src/main/deploy/pathplanner/paths/W2-W3.path delete mode 100644 src/main/deploy/pathplanner/paths/W3-C5.path delete mode 100644 src/main/deploy/pathplanner/paths/W3-W2.path delete mode 100644 src/main/deploy/pathplanner/paths/rightSource.path delete mode 100644 src/main/deploy/pathplanner/paths/shopSource.path delete mode 100644 src/main/deploy/pathplanner/paths/speaker.path diff --git a/src/main/deploy/pathplanner/autos/Example.auto b/src/main/deploy/pathplanner/autos/Example.auto deleted file mode 100644 index af8c35c..0000000 --- a/src/main/deploy/pathplanner/autos/Example.auto +++ /dev/null @@ -1,37 +0,0 @@ -{ - "version": 1.0, - "startingPose": { - "position": { - "x": 15.610759508556056, - "y": 7.131113651116192 - }, - "rotation": 0 - }, - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Example Path" - } - }, - { - "type": "named", - "data": { - "name": "alignToSpeaker" - } - }, - { - "type": "path", - "data": { - "pathName": "Go To Speaker" - } - } - ] - } - }, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C1-E1-Slow.path b/src/main/deploy/pathplanner/paths/C1-E1-Slow.path deleted file mode 100644 index a14f52b..0000000 --- a/src/main/deploy/pathplanner/paths/C1-E1-Slow.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.4, - "y": 7.4 - }, - "prevControl": null, - "nextControl": { - "x": 7.544635146413151, - "y": 7.268064878986901 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.049466479347272, - "y": 6.596627581202432 - }, - "prevControl": { - "x": 5.0040216723521675, - "y": 6.846338307933009 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -158.1103952440019, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C1-E1.path b/src/main/deploy/pathplanner/paths/C1-E1.path deleted file mode 100644 index d25ba8a..0000000 --- a/src/main/deploy/pathplanner/paths/C1-E1.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.40219166152618, - "y": 7.403026234623898 - }, - "prevControl": null, - "nextControl": { - "x": 7.546826807939331, - "y": 7.271091113610798 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.049466479347272, - "y": 6.596627581202432 - }, - "prevControl": { - "x": 5.0040216723521675, - "y": 6.846338307933009 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -158.1103952440019, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C2-E1-Close.path b/src/main/deploy/pathplanner/paths/C2-E1-Close.path deleted file mode 100644 index 04e944d..0000000 --- a/src/main/deploy/pathplanner/paths/C2-E1-Close.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.4, - "y": 5.64 - }, - "prevControl": null, - "nextControl": { - "x": 6.484941064269051, - "y": 6.748911975789437 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.4253549759335664, - "y": 6.461700222148208 - }, - "prevControl": { - "x": 3.2330675037020917, - "y": 6.696671139317234 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -165.7110262931496, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C2-E1-Slow.path b/src/main/deploy/pathplanner/paths/C2-E1-Slow.path deleted file mode 100644 index 0e83806..0000000 --- a/src/main/deploy/pathplanner/paths/C2-E1-Slow.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.4, - "y": 5.64 - }, - "prevControl": null, - "nextControl": { - "x": 6.484941064269051, - "y": 6.748911975789437 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.05, - "y": 6.6 - }, - "prevControl": { - "x": 4.687229864922945, - "y": 6.853888803145454 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -165.7110262931496, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C2-E1.path b/src/main/deploy/pathplanner/paths/C2-E1.path deleted file mode 100644 index 4d0bda0..0000000 --- a/src/main/deploy/pathplanner/paths/C2-E1.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.40219166152618, - "y": 5.6438912877825755 - }, - "prevControl": null, - "nextControl": { - "x": 6.48713272579523, - "y": 6.752803263572013 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.05, - "y": 6.6 - }, - "prevControl": { - "x": 4.687229864922945, - "y": 6.853888803145454 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -165.7110262931496, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C3-E1-From-Stage.path b/src/main/deploy/pathplanner/paths/C3-E1-From-Stage.path deleted file mode 100644 index 139e1b0..0000000 --- a/src/main/deploy/pathplanner/paths/C3-E1-From-Stage.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.55, - "y": 4.07 - }, - "prevControl": null, - "nextControl": { - "x": 5.466006712156538, - "y": 4.099371364646128 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.629580926424823, - "y": 5.742101788318067 - }, - "prevControl": { - "x": 5.186263252669619, - "y": 3.128050334812656 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Enable auto align", - "waypointRelativePos": 0.2, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Enable Auto-Align" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -177.47298332078435, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 170.0377243673309, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C3-E1.path b/src/main/deploy/pathplanner/paths/C3-E1.path deleted file mode 100644 index aab72b6..0000000 --- a/src/main/deploy/pathplanner/paths/C3-E1.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.24, - "y": 4.22 - }, - "prevControl": null, - "nextControl": { - "x": 5.147792009869734, - "y": 4.119307667186764 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.629580926424823, - "y": 5.742101788318067 - }, - "prevControl": { - "x": 5.186263252669619, - "y": 3.128050334812656 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Enable auto align", - "waypointRelativePos": 0.2, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Enable Auto-Align" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -177.67218491095886, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 168.75629449633743, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C3-E1_fast.path b/src/main/deploy/pathplanner/paths/C3-E1_fast.path deleted file mode 100644 index 35051b8..0000000 --- a/src/main/deploy/pathplanner/paths/C3-E1_fast.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 7.110087636991016, - "y": 4.126676732781015 - }, - "prevControl": null, - "nextControl": { - "x": 4.848492559239144, - "y": 4.229476509042464 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.8939232082399773, - "y": 5.609930647410491 - }, - "prevControl": { - "x": 4.672264371362375, - "y": 4.655361296411323 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.6, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": -178.6028189727036, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C3-E2.path b/src/main/deploy/pathplanner/paths/C3-E2.path deleted file mode 100644 index 9feddac..0000000 --- a/src/main/deploy/pathplanner/paths/C3-E2.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.26, - "y": 4.1 - }, - "prevControl": null, - "nextControl": { - "x": 4.7818569788991425, - "y": 4.66670511952135 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": { - "x": 3.8698741286371465, - "y": 3.347378620683168 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Shoot", - "waypointRelativePos": 0.65, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C4-C3.path b/src/main/deploy/pathplanner/paths/C4-C3.path deleted file mode 100644 index 8bc4ea4..0000000 --- a/src/main/deploy/pathplanner/paths/C4-C3.path +++ /dev/null @@ -1,87 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.284709527165534, - "y": 2.428101757611967 - }, - "prevControl": null, - "nextControl": { - "x": 4.863178241562208, - "y": 0.058742729292257656 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.284709527165534, - "y": 4.097305368134887 - }, - "prevControl": { - "x": 0.5309019562582962, - "y": 4.156048097427144 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Shoot", - "waypointRelativePos": 0.25, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - }, - { - "name": "Prime", - "waypointRelativePos": 0.65, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 180.0, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C4-E1.path b/src/main/deploy/pathplanner/paths/C4-E1.path deleted file mode 100644 index 17264d0..0000000 --- a/src/main/deploy/pathplanner/paths/C4-E1.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.302816605633211, - "y": 2.4278048556097116 - }, - "prevControl": null, - "nextControl": { - "x": 6.6316384061339555, - "y": 3.7471560657407035 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.629580926424823, - "y": 5.742101788318067 - }, - "prevControl": { - "x": 5.411662251895932, - "y": 3.782140135708843 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 8.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -176.82686391614783, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 158.93614050717628, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C4-E2.path b/src/main/deploy/pathplanner/paths/C4-E2.path deleted file mode 100644 index a044be4..0000000 --- a/src/main/deploy/pathplanner/paths/C4-E2.path +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.3, - "y": 2.43 - }, - "prevControl": null, - "nextControl": { - "x": 6.17351739714632, - "y": 1.1563200708557553 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.94, - "y": 2.213864650777629 - }, - "prevControl": { - "x": 4.64631686988281, - "y": 0.968714502484767 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Shoot", - "waypointRelativePos": 0.15, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - }, - { - "type": "named", - "data": { - "name": "Enable Auto-Align" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 130.68658788979673, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C4-E2_fast.path b/src/main/deploy/pathplanner/paths/C4-E2_fast.path deleted file mode 100644 index 7258516..0000000 --- a/src/main/deploy/pathplanner/paths/C4-E2_fast.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.284709527165534, - "y": 2.428101757611967 - }, - "prevControl": null, - "nextControl": { - "x": 6.087855555992801, - "y": 1.5175635985074791 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": { - "x": 5.1773173968883155, - "y": 1.532016585159931 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Shoot", - "waypointRelativePos": 0.55, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C5-E2.path b/src/main/deploy/pathplanner/paths/C5-E2.path deleted file mode 100644 index e4ee247..0000000 --- a/src/main/deploy/pathplanner/paths/C5-E2.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.3, - "y": 0.81 - }, - "prevControl": null, - "nextControl": { - "x": 6.86384516653521, - "y": 1.1164849451958043 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.711165136615988, - "y": 2.4774483834681957 - }, - "prevControl": { - "x": 4.634710983707682, - "y": 1.627199825828224 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 138.85462497651486, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/C5-E2_fast.path b/src/main/deploy/pathplanner/paths/C5-E2_fast.path deleted file mode 100644 index b892712..0000000 --- a/src/main/deploy/pathplanner/paths/C5-E2_fast.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.005914258697928, - "y": 0.7636554807993345 - }, - "prevControl": null, - "nextControl": { - "x": 6.72825989659135, - "y": 1.2042259504912576 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": { - "x": 5.039406429438982, - "y": 1.6301107378601176 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "shoot", - "waypointRelativePos": 0.55, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E1-C1.path b/src/main/deploy/pathplanner/paths/E1-C1.path deleted file mode 100644 index 16f4b67..0000000 --- a/src/main/deploy/pathplanner/paths/E1-C1.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.05, - "y": 6.6 - }, - "prevControl": null, - "nextControl": { - "x": 4.877991396688921, - "y": 6.818460324355748 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.4, - "y": 7.4 - }, - "prevControl": { - "x": 6.579341239263995, - "y": 7.073655505151094 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.15, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 179.5231067005846, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E1-C2.path b/src/main/deploy/pathplanner/paths/E1-C2.path deleted file mode 100644 index efb2d3f..0000000 --- a/src/main/deploy/pathplanner/paths/E1-C2.path +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.05, - "y": 6.6 - }, - "prevControl": null, - "nextControl": { - "x": 6.067404192053465, - "y": 6.5938713630557855 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.4, - "y": 5.64 - }, - "prevControl": { - "x": 5.3747494414487935, - "y": 6.902968679783514 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.4, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Disable Auto-Align" - } - }, - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 154.13364320590549, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E1-C3-Stage.path b/src/main/deploy/pathplanner/paths/E1-C3-Stage.path deleted file mode 100644 index 24b7293..0000000 --- a/src/main/deploy/pathplanner/paths/E1-C3-Stage.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.63, - "y": 5.74 - }, - "prevControl": null, - "nextControl": { - "x": 4.5760731521463045, - "y": 4.104648209296419 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.26, - "y": 4.1 - }, - "prevControl": { - "x": 4.706064877818486, - "y": 3.9825145414154868 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.5, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 8.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 170.13419305691565, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": -176.18872596696895, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E1-C3.path b/src/main/deploy/pathplanner/paths/E1-C3.path deleted file mode 100644 index c3a491d..0000000 --- a/src/main/deploy/pathplanner/paths/E1-C3.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.05, - "y": 6.6 - }, - "prevControl": null, - "nextControl": { - "x": 6.7870026258836065, - "y": 7.6365548079933365 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.240937624732393, - "y": 4.2219238724191746 - }, - "prevControl": { - "x": 6.072994413229262, - "y": 6.740518390824668 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Un-Override Shoot", - "waypointRelativePos": 0.5, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 8.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 138.42874387888028, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E2-C3.path b/src/main/deploy/pathplanner/paths/E2-C3.path deleted file mode 100644 index dac2f91..0000000 --- a/src/main/deploy/pathplanner/paths/E2-C3.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": null, - "nextControl": { - "x": 4.569464595100926, - "y": 4.596618567119067 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.279995578509675, - "y": 4.093483946227152 - }, - "prevControl": { - "x": 7.506601059713748, - "y": 4.126676732781015 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.2, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E2-C3_fast.path b/src/main/deploy/pathplanner/paths/E2-C3_fast.path deleted file mode 100644 index fcb2702..0000000 --- a/src/main/deploy/pathplanner/paths/E2-C3_fast.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": null, - "nextControl": { - "x": 4.569464595100926, - "y": 4.596618567119067 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.279995578509675, - "y": 4.093483946227152 - }, - "prevControl": { - "x": 7.506601059713748, - "y": 4.126676732781015 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.2, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E2-C4-No-Stage.path b/src/main/deploy/pathplanner/paths/E2-C4-No-Stage.path deleted file mode 100644 index 1541586..0000000 --- a/src/main/deploy/pathplanner/paths/E2-C4-No-Stage.path +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.71, - "y": 2.48 - }, - "prevControl": null, - "nextControl": { - "x": 5.889736047462169, - "y": 1.2110845065362585 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.3, - "y": 2.43 - }, - "prevControl": { - "x": 6.863479012814106, - "y": 1.3868235188083289 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.25, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - }, - { - "type": "named", - "data": { - "name": "Disable Auto-Align" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 4.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -143.7320219277392, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 139.80073116079663, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E2-C4.path b/src/main/deploy/pathplanner/paths/E2-C4.path deleted file mode 100644 index 05dbe9e..0000000 --- a/src/main/deploy/pathplanner/paths/E2-C4.path +++ /dev/null @@ -1,86 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.71, - "y": 2.48 - }, - "prevControl": null, - "nextControl": { - "x": 4.506992323337165, - "y": 4.030275398680295 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.488713423470013, - "y": 4.208770144158994 - }, - "prevControl": { - "x": 4.63846486583004, - "y": 4.282067433610717 - }, - "nextControl": { - "x": 5.912266769865396, - "y": 4.172256924642151 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.3, - "y": 2.43 - }, - "prevControl": { - "x": 7.130654261308522, - "y": 3.53484706969414 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.5, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 4.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 158.71136721217746, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 139.80073116079663, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/E2-C4_fast.path b/src/main/deploy/pathplanner/paths/E2-C4_fast.path deleted file mode 100644 index 083ccf5..0000000 --- a/src/main/deploy/pathplanner/paths/E2-C4_fast.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.9379802552091694, - "y": 2.0413098429059118 - }, - "prevControl": null, - "nextControl": { - "x": 5.538719628423157, - "y": 1.2776543621065786 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.284709527165534, - "y": 2.442554744264419 - }, - "prevControl": { - "x": 7.800314706175031, - "y": 2.276280760074938 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.4, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 180.0, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Example Path.path b/src/main/deploy/pathplanner/paths/Example Path.path deleted file mode 100644 index 2f33033..0000000 --- a/src/main/deploy/pathplanner/paths/Example Path.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 15.20189859699934, - "y": 7.328155479208991 - }, - "prevControl": null, - "nextControl": { - "x": 13.933626435455016, - "y": 7.288308561552193 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 15.70121179598352, - "y": 3.451135345920066 - }, - "prevControl": { - "x": 14.599785621753712, - "y": 4.376333332273104 - }, - "nextControl": null, - "isLocked": false, - "linkedName": "Arnit" - } - ], - "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": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/FarEndgame.path b/src/main/deploy/pathplanner/paths/FarEndgame.path deleted file mode 100644 index 193e594..0000000 --- a/src/main/deploy/pathplanner/paths/FarEndgame.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.804435512269952, - "y": 4.111991050457951 - }, - "prevControl": null, - "nextControl": { - "x": 5.231331903884351, - "y": 4.111991050457951 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 5.377177122869452, - "y": 4.111991050457951 - }, - "prevControl": { - "x": 5.1275205233773615, - "y": 4.111991050457951 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 180.0, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Go To Speaker.path b/src/main/deploy/pathplanner/paths/Go To Speaker.path deleted file mode 100644 index c40eba1..0000000 --- a/src/main/deploy/pathplanner/paths/Go To Speaker.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 15.70121179598352, - "y": 3.451135345920066 - }, - "prevControl": null, - "nextControl": { - "x": 14.10047242277507, - "y": 3.994505591870171 - }, - "isLocked": false, - "linkedName": "Arnit" - }, - { - "anchor": { - "x": 15.128470185376864, - "y": 7.342841161527443 - }, - "prevControl": { - "x": 14.467614480838979, - "y": 6.608557045374237 - }, - "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": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/LeftEndgame.path b/src/main/deploy/pathplanner/paths/LeftEndgame.path deleted file mode 100644 index 9d71432..0000000 --- a/src/main/deploy/pathplanner/paths/LeftEndgame.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.863178241562208, - "y": 4.111991050457951 - }, - "prevControl": null, - "nextControl": { - "x": 4.769143993136157, - "y": 4.274863146383425 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.613521642070118, - "y": 4.479133108534554 - }, - "prevControl": { - "x": 4.708978577170035, - "y": 4.313796847006692 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -60.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": -55.30484646876609, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/New Path.path b/src/main/deploy/pathplanner/paths/New Path.path deleted file mode 100644 index a077b13..0000000 --- a/src/main/deploy/pathplanner/paths/New Path.path +++ /dev/null @@ -1,58 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.8175927319320395, - "y": 7.543619911726125 - }, - "prevControl": null, - "nextControl": { - "x": 3.924497587865042, - "y": 7.873410648362394 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.0, - "y": 6.0 - }, - "prevControl": { - "x": 3.0, - "y": 6.0 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0, - "rotationDegrees": 0, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 89.69981140519788, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/RightEndgame.path b/src/main/deploy/pathplanner/paths/RightEndgame.path deleted file mode 100644 index a6e0d04..0000000 --- a/src/main/deploy/pathplanner/paths/RightEndgame.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 4.980663700146722, - "y": 4.156048097427144 - }, - "prevControl": null, - "nextControl": { - "x": 4.801402102115242, - "y": 3.845557901790632 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.657578689039311, - "y": 3.6714205807660276 - }, - "prevControl": { - "x": 4.873538126480276, - "y": 4.045473298787772 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 60.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 59.036243467926546, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S1-W1.path b/src/main/deploy/pathplanner/paths/S1-W1.path deleted file mode 100644 index 959f5d6..0000000 --- a/src/main/deploy/pathplanner/paths/S1-W1.path +++ /dev/null @@ -1,55 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.1477006138269887, - "y": 6.990384785778517 - }, - "prevControl": null, - "nextControl": { - "x": 2.3225551996721174, - "y": 6.93164205648626 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.968725221886938, - "y": 7.093184562039965 - }, - "prevControl": { - "x": 2.1903840587645407, - "y": 7.137241609009157 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 1.0, - "rotationDegrees": 180.0, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -178.5855767885979, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S2-C1.path b/src/main/deploy/pathplanner/paths/S2-C1.path deleted file mode 100644 index 89ce3f6..0000000 --- a/src/main/deploy/pathplanner/paths/S2-C1.path +++ /dev/null @@ -1,100 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.441414260288271, - "y": 5.463073824179848 - }, - "prevControl": null, - "nextControl": { - "x": 2.4987833875488867, - "y": 6.1826722580099895 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.703009338040144, - "y": 6.212043622656119 - }, - "prevControl": { - "x": 3.320378639784465, - "y": 6.135517483004984 - }, - "nextControl": { - "x": 4.070151396116747, - "y": 6.285472034271439 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.4, - "y": 7.4 - }, - "prevControl": { - "x": 5.741891499525398, - "y": 6.709772930815987 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Override Shoot", - "waypointRelativePos": 0.25, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Override Shoot" - } - } - ] - } - } - }, - { - "name": "Un-Override Shoot", - "waypointRelativePos": 0.45, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -167.5675236059489, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S2-C2.path b/src/main/deploy/pathplanner/paths/S2-C2.path deleted file mode 100644 index bc7c1e6..0000000 --- a/src/main/deploy/pathplanner/paths/S2-C2.path +++ /dev/null @@ -1,134 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.441414260288271, - "y": 5.463073824179848 - }, - "prevControl": null, - "nextControl": { - "x": 2.4987833875488867, - "y": 6.1826722580099895 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.826463318554882, - "y": 6.577995959730237 - }, - "prevControl": { - "x": 4.437295442303506, - "y": 6.549520261467942 - }, - "nextControl": { - "x": 5.4503465166432665, - "y": 6.623645949834264 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.262648208829075, - "y": 5.7784811797774465 - }, - "prevControl": { - "x": 5.964932040259665, - "y": 6.524097684809906 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Aim", - "waypointRelativePos": 1.2, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - }, - { - "name": "Override Shoot", - "waypointRelativePos": 0.45, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Override Shoot" - } - } - ] - } - } - }, - { - "name": "Un-Override Shoot", - "waypointRelativePos": 1.0, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - }, - { - "name": "Shoot", - "waypointRelativePos": 0.0, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 5.0, - "maxAcceleration": 5.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 172.8105813338725, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S2-W2.path b/src/main/deploy/pathplanner/paths/S2-W2.path deleted file mode 100644 index 18de9d2..0000000 --- a/src/main/deploy/pathplanner/paths/S2-W2.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.441414260288271, - "y": 5.463073824179848 - }, - "prevControl": null, - "nextControl": { - "x": 2.5428404345180757, - "y": 5.507130871149041 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.196353297894432, - "y": 5.580559282764361 - }, - "prevControl": { - "x": 2.2858409938644573, - "y": 5.521816553472107 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S2-W3.path b/src/main/deploy/pathplanner/paths/S2-W3.path deleted file mode 100644 index 0400490..0000000 --- a/src/main/deploy/pathplanner/paths/S2-W3.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.441414260288271, - "y": 5.463073824179848 - }, - "prevControl": null, - "nextControl": { - "x": 2.1331186088298106, - "y": 4.763696036651333 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.671259842519685, - "y": 4.095384246324048 - }, - "prevControl": { - "x": 2.2354378921720803, - "y": 4.644511589949107 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S3-C5.path b/src/main/deploy/pathplanner/paths/S3-C5.path deleted file mode 100644 index 80f2eb5..0000000 --- a/src/main/deploy/pathplanner/paths/S3-C5.path +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.6679855613232356, - "y": 4.350348982388106 - }, - "prevControl": null, - "nextControl": { - "x": 4.451979136516414, - "y": 0.9545693509991673 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.29957545629377, - "y": 0.8062701839689397 - }, - "prevControl": { - "x": 5.801173811199409, - "y": 1.2804194012861174 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0, - "rotationDegrees": 120.0, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.25, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 150.671742867078, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 118.61045966596524, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S3-W3.path b/src/main/deploy/pathplanner/paths/S3-W3.path deleted file mode 100644 index 30e268e..0000000 --- a/src/main/deploy/pathplanner/paths/S3-W3.path +++ /dev/null @@ -1,84 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.7071301441350655, - "y": 4.376333332273105 - }, - "prevControl": null, - "nextControl": { - "x": 1.309243119380694, - "y": 4.2147908267194 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.557526116841143, - "y": 4.229476509042464 - }, - "prevControl": { - "x": 1.8085563183648736, - "y": 3.979819909550374 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "OverrideShoot", - "waypointRelativePos": 0.6, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Override Shoot" - } - } - ] - } - } - }, - { - "name": "UnOverrideShoot", - "waypointRelativePos": 0.9, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 2.5, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 161.5291041528196, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/S4-C5_fast.path b/src/main/deploy/pathplanner/paths/S4-C5_fast.path deleted file mode 100644 index 18facb3..0000000 --- a/src/main/deploy/pathplanner/paths/S4-C5_fast.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.5234556947987139, - "y": 2.0523241046482106 - }, - "prevControl": null, - "nextControl": { - "x": 1.8820364401292187, - "y": 1.8066233315565234 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.313615500470437, - "y": 0.7515553059275135 - }, - "prevControl": { - "x": 7.666918970062451, - "y": 0.8200090780118965 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.65, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.5, - "maxAcceleration": 3.5, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 178.4088597288054, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 180.0, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W1-C1.path b/src/main/deploy/pathplanner/paths/W1-C1.path deleted file mode 100644 index 2d1d4f6..0000000 --- a/src/main/deploy/pathplanner/paths/W1-C1.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.22, - "y": 7.05 - }, - "prevControl": null, - "nextControl": { - "x": 3.822112975245628, - "y": 7.079371364646127 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.4, - "y": 7.4 - }, - "prevControl": { - "x": 6.727287860729569, - "y": 7.165984338301414 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.15, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -167.2935601656709, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W1-W2.path b/src/main/deploy/pathplanner/paths/W1-W2.path deleted file mode 100644 index 25886fc..0000000 --- a/src/main/deploy/pathplanner/paths/W1-W2.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.6750115754256556, - "y": 6.916956374163195 - }, - "prevControl": null, - "nextControl": { - "x": 2.4106692936105016, - "y": 6.652614092348042 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8659254456254897, - "y": 5.668673376702747 - }, - "prevControl": { - "x": 1.3386144840268228, - "y": 5.448388141856785 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W2-C1.path b/src/main/deploy/pathplanner/paths/W2-C1.path deleted file mode 100644 index d842387..0000000 --- a/src/main/deploy/pathplanner/paths/W2-C1.path +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.2, - "y": 5.58 - }, - "prevControl": null, - "nextControl": { - "x": 4.672264371362375, - "y": 6.123929528717735 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.4, - "y": 7.4 - }, - "prevControl": { - "x": 4.649370441598027, - "y": 6.670053340106681 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 0.5, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Un-Override Shoot" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 6.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -167.95279739073942, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 179.98962167166312, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W2-W1.path b/src/main/deploy/pathplanner/paths/W2-W1.path deleted file mode 100644 index 3915f03..0000000 --- a/src/main/deploy/pathplanner/paths/W2-W1.path +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.0, - "y": 5.56 - }, - "prevControl": null, - "nextControl": { - "x": 2.5868974814872714, - "y": 5.551187918118234 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0582129178569635, - "y": 6.1679865756869265 - }, - "prevControl": { - "x": 2.014036907546088, - "y": 5.8406793888811395 - }, - "nextControl": { - "x": 2.102388928167839, - "y": 6.495293762492714 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.2183818213790283, - "y": 7.049127515070773 - }, - "prevControl": { - "x": 2.6896972577487204, - "y": 6.784785233255618 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 2.5, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -152.01275102505227, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W2-W3.path b/src/main/deploy/pathplanner/paths/W2-W3.path deleted file mode 100644 index 0b0fbb1..0000000 --- a/src/main/deploy/pathplanner/paths/W2-W3.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.704382940071784, - "y": 5.53650223579517 - }, - "prevControl": null, - "nextControl": { - "x": 2.263812470379861, - "y": 5.1399888130724385 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.9246681749177457, - "y": 4.111991050457951 - }, - "prevControl": { - "x": 2.249126788056797, - "y": 4.244162191365528 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W3-C5.path b/src/main/deploy/pathplanner/paths/W3-C5.path deleted file mode 100644 index d93a4c3..0000000 --- a/src/main/deploy/pathplanner/paths/W3-C5.path +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.6603258931025917, - "y": 4.2001051443963355 - }, - "prevControl": null, - "nextControl": { - "x": 1.5735854011958479, - "y": 2.4965659949208994 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.064656987990183, - "y": 0.7783411631223989 - }, - "prevControl": { - "x": 6.808976168936239, - "y": 0.7329105141215662 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Prime", - "waypointRelativePos": 0.7, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/W3-W2.path b/src/main/deploy/pathplanner/paths/W3-W2.path deleted file mode 100644 index 124adbe..0000000 --- a/src/main/deploy/pathplanner/paths/W3-W2.path +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.56, - "y": 4.23 - }, - "prevControl": null, - "nextControl": { - "x": 2.2050697410876046, - "y": 4.361647649950041 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.014155870887771, - "y": 4.846275166611156 - }, - "prevControl": { - "x": 1.9407274592724504, - "y": 4.46444742621149 - }, - "nextControl": { - "x": 2.1025353545127814, - "y": 5.305848481461211 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.0, - "y": 5.55593454044051 - }, - "prevControl": { - "x": 2.381297928964374, - "y": 5.345588365595336 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 2.5, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/rightSource.path b/src/main/deploy/pathplanner/paths/rightSource.path deleted file mode 100644 index 7058e6a..0000000 --- a/src/main/deploy/pathplanner/paths/rightSource.path +++ /dev/null @@ -1,55 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 5.432455267688313, - "y": 1.0401173811606885 - }, - "prevControl": null, - "nextControl": { - "x": 4.699058199042324, - "y": 1.5593743826376547 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.3367740994741248, - "y": 1.6330703957704211 - }, - "prevControl": { - "x": 1.5714611614408416, - "y": 2.8244991721464925 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 0.5, - "rotationDegrees": -49.42789973843088, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 12.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -118.51259584088376, - "rotateFast": false - }, - "reversed": false, - "folder": "Source", - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/shopSource.path b/src/main/deploy/pathplanner/paths/shopSource.path deleted file mode 100644 index bc43320..0000000 --- a/src/main/deploy/pathplanner/paths/shopSource.path +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 6.965564788272434, - "y": 6.4355020138611705 - }, - "prevControl": null, - "nextControl": { - "x": 7.595921477557241, - "y": 6.391523640190138 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.29957545629377, - "y": 6.801988461119779 - }, - "prevControl": { - "x": 7.874451177473783, - "y": 6.582096592764614 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 12.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -150.461217740442, - "rotateFast": false - }, - "reversed": false, - "folder": "Source", - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/speaker.path b/src/main/deploy/pathplanner/paths/speaker.path deleted file mode 100644 index 45bd153..0000000 --- a/src/main/deploy/pathplanner/paths/speaker.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.226278166842048, - "y": 6.420842555970826 - }, - "prevControl": null, - "nextControl": { - "x": 6.24725135164556, - "y": 8.179977502812148 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.6588410319677789, - "y": 5.541275082550166 - }, - "prevControl": { - "x": 0.6588410319677789, - "y": 5.541275082550166 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -177.13759477388828, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": -135.88140399658215, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file From c9a5a9e7cf83f5ab9dc3ed200be2eaa8281d02f2 Mon Sep 17 00:00:00 2001 From: Jack Lingle Date: Fri, 18 Oct 2024 14:37:53 -0400 Subject: [PATCH 5/5] add configurable autos + rename auto to accurate name --- .../{4 Note.auto => Amp Side - 2 Note.auto} | 0 src/main/deploy/pathplanner/paths/C1-C2.path | 104 ------------------ src/main/java/frc/robot/RobotContainer.java | 2 +- .../robot/subsystems/drive/PhoenixDrive.java | 10 +- 4 files changed, 9 insertions(+), 107 deletions(-) rename src/main/deploy/pathplanner/autos/{4 Note.auto => Amp Side - 2 Note.auto} (100%) delete mode 100644 src/main/deploy/pathplanner/paths/C1-C2.path diff --git a/src/main/deploy/pathplanner/autos/4 Note.auto b/src/main/deploy/pathplanner/autos/Amp Side - 2 Note.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/4 Note.auto rename to src/main/deploy/pathplanner/autos/Amp Side - 2 Note.auto diff --git a/src/main/deploy/pathplanner/paths/C1-C2.path b/src/main/deploy/pathplanner/paths/C1-C2.path deleted file mode 100644 index f4dd2da..0000000 --- a/src/main/deploy/pathplanner/paths/C1-C2.path +++ /dev/null @@ -1,104 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.284942222836145, - "y": 7.4309552554704394 - }, - "prevControl": null, - "nextControl": { - "x": 5.259691664284939, - "y": 7.6218691256702735 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.284942222836145, - "y": 5.771473152964195 - }, - "prevControl": { - "x": 3.335867279963541, - "y": 6.417643175179016 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ - { - "name": "Shoot", - "waypointRelativePos": 0.3, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Shoot Scoring" - } - } - ] - } - } - }, - { - "name": "Aim", - "waypointRelativePos": 0.8, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Aim Scoring" - } - } - ] - } - } - }, - { - "name": "Stop", - "waypointRelativePos": 0.6, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "wait", - "data": { - "waitTime": 0.2 - } - } - ] - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 2.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 180.0, - "rotateFast": false - }, - "reversed": false, - "folder": null, - "previewStartingState": { - "rotation": 179.24024151449308, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ 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 dfeb2d1..efabb55 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -409,7 +409,7 @@ public void onDSConnect() { } public Command getAutonomousCommand() { - return drive.getAutoPath("4 Note"); + return drive.getAutoPath(); } private void configureModes() { diff --git a/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java b/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java index df77ca5..4d70f53 100644 --- a/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java +++ b/src/main/java/frc/robot/subsystems/drive/PhoenixDrive.java @@ -23,8 +23,10 @@ import edu.wpi.first.wpilibj.DriverStation.Alliance; import edu.wpi.first.wpilibj.Notifier; import edu.wpi.first.wpilibj.RobotController; +import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; +import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.Subsystem; import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine; import frc.robot.constants.FieldConstants; @@ -52,6 +54,7 @@ public enum SysIdRoutineType { private final SwerveRequest.ApplyChassisSpeeds AutoRequest = new SwerveRequest.ApplyChassisSpeeds(); + private SendableChooser autoChooser = new SendableChooser(); private Rotation2d goalRotation = new Rotation2d(); @@ -153,10 +156,13 @@ public void configurePathPlanner() { new ReplanningConfig(false, false)), () -> DriverStation.getAlliance().get() == Alliance.Red, this); + + autoChooser.setDefaultOption("Default (nothing)", Commands.none()); + autoChooser.addOption("Amp Side - 2 Note", new PathPlannerAuto("Amp Side - 2 Note")); } - public Command getAutoPath(String pathName) { - return new PathPlannerAuto(pathName); + public Command getAutoPath() { + return autoChooser.getSelected(); } private void startSimThread() {