--- /dev/null
+{
+ "version": "2025.0",
+ "waypoints": [
+ {
+ "anchor": {
+ "x": 6.73143534994069,
+ "y": 6.514994068801898
+ },
+ "prevControl": null,
+ "nextControl": {
+ "x": 7.0757295373665485,
+ "y": 5.621981020166073
+ },
+ "isLocked": false,
+ "linkedName": null
+ },
+ {
+ "anchor": {
+ "x": 7.710521945432978,
+ "y": 4.8795966785290625
+ },
+ "prevControl": {
+ "x": 7.1295255041518395,
+ "y": 5.6112218268090155
+ },
+ "nextControl": null,
+ "isLocked": false,
+ "linkedName": null
+ }
+ ],
+ "rotationTargets": [],
+ "constraintZones": [],
+ "pointTowardsZones": [],
+ "eventMarkers": [
+ {
+ "name": "Index",
+ "waypointRelativePos": 0.5894263217097863,
+ "endWaypointRelativePos": 1.0,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Intake"
+ }
+ }
+ },
+ {
+ "name": "Index",
+ "waypointRelativePos": 0.589426321709788,
+ "endWaypointRelativePos": 1.0,
+ "command": {
+ "type": "named",
+ "data": {
+ "name": "Index"
+ }
+ }
+ }
+ ],
+ "globalConstraints": {
+ "maxVelocity": 3.0,
+ "maxAcceleration": 3.0,
+ "maxAngularVelocity": 540.0,
+ "maxAngularAcceleration": 720.0,
+ "nominalVoltage": 12.0,
+ "unlimited": false
+ },
+ "goalEndState": {
+ "velocity": 0,
+ "rotation": 0.0
+ },
+ "reversed": false,
+ "folder": null,
+ "idealStartingState": {
+ "velocity": 0,
+ "rotation": -6.7298911483521735
+ },
+ "useDefaultConstraints": true
+}
\ No newline at end of file
import org.littletonrobotics.junction.Logger;
import com.pathplanner.lib.auto.AutoBuilder;
+import com.pathplanner.lib.auto.NamedCommands;
import com.pathplanner.lib.commands.PathPlannerAuto;
import edu.wpi.first.math.geometry.Pose3d;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
+import edu.wpi.first.wpilibj2.command.InstantCommand;
import frc.robot.commands.DoNothing;
import frc.robot.commands.drive_comm.DefaultDriveCommand;
import frc.robot.commands.vision.ShutdownAllPis;
import frc.robot.controls.PS5ControllerDriverConfig;
import frc.robot.subsystems.drivetrain.Drivetrain;
import frc.robot.subsystems.drivetrain.GyroIOPigeon2;
+import frc.robot.subsystems.indexer.Spindexer;
import frc.robot.util.PathGroupLoader;
import frc.robot.util.Vision.DetectedObject;
import frc.robot.util.Vision.Vision;
private Drivetrain drive = null;
private Vision vision = null;
private Command auto = new DoNothing();
+ private Spindexer spindexer = null;
// Controllers are defined here
private BaseDriverConfig driver = null;
drive = new Drivetrain(vision, new GyroIOPigeon2());
driver = new PS5ControllerDriverConfig(drive);
operator = new Operator(drive);
+ // added indexer here for now
+ spindexer = new Spindexer();
// Detected objects need access to the drivetrain
DetectedObject.setDrive(drive);
}
public void registerCommands() {
-
+ NamedCommands.registerCommand("Index", new InstantCommand(() -> spindexer.run()));
}
public static BooleanSupplier getAllianceColorBooleanSupplier() {