Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/main/java/frc/robot/BuildConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

/** Automatically generated file containing build version information. */
public final class BuildConstants {

public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "Rebuilt";
public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 3;
public static final String GIT_SHA = "c2ce782ddc4a2e3387dbdfd9c896ce84e806aabf";
public static final String GIT_DATE = "2026-01-20 14:12:18 EST";
public static final String GIT_BRANCH = "main";
public static final String BUILD_DATE = "2026-01-20 14:26:55 EST";
public static final long BUILD_UNIX_TIME = 1768937215602L;
public static final int GIT_REVISION = 18;
public static final String GIT_SHA = "a08c18aa3742a8182231092667a5c3ca832602aa";
public static final String GIT_DATE = "2026-01-22 13:45:30 EST";
public static final String GIT_BRANCH = "spindexer";
public static final String BUILD_DATE = "2026-01-30 12:59:27 EST";
public static final long BUILD_UNIX_TIME = 1769795967688L;
public static final int DIRTY = 1;

private BuildConstants() {}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import frc.robot.constants.Constants;
import frc.robot.constants.DriveConstants;
import frc.robot.subsystems.drivetrain.CommandSwerveDrivetrain;
import frc.robot.subsystems.spindexer.Spindexer;
import frc.robot.subsystems.spindexer.SpindexerIOSim;
import frc.robot.subsystems.spindexer.SpindexerIOTalonFX;
import frc.robot.util.Telemetry;
import frc.robot.util.TunerConstants;
import org.ironmaple.simulation.SimulatedArena;
Expand All @@ -32,16 +35,19 @@ public class RobotContainer {

// Subsystems
public static CommandSwerveDrivetrain drivetrain;
public static Spindexer spindexer;

public RobotContainer() {

switch (Constants.currentMode) {
case REAL:
spindexer = new Spindexer(new SpindexerIOTalonFX());
drivetrain = TunerConstants.createDrivetrain();

break;

case SIM:
spindexer = new Spindexer(new SpindexerIOSim());
drivetrain = TunerConstants.createDrivetrain();
driveSimulation = drivetrain.mapleSimSwerveDrivetrain.mapleSimDrive;

Expand Down
26 changes: 10 additions & 16 deletions src/main/java/frc/robot/constants/DriveConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@

public class DriveConstants {

public static final Distance bumperWidth = Inches.of(0); // TODO: set

public static final LinearVelocity MAX_SPEED = TunerConstants.kSpeedAt12Volts; // TODO: set
public static final LinearAcceleration MAX_ACCELERATION =
MetersPerSecondPerSecond.of(12); // TODO: set
public static final Distance bumperWidth = Inches.of(0); // TODO: set

public static final AngularVelocity MAX_ANGULAR_SPEED =
RotationsPerSecond.of(4); // TODO: set
public static final AngularAcceleration MAX_ANGULAR_ACCELERATION =
RotationsPerSecondPerSecond.of(9); // TODO: set
public static final LinearVelocity MAX_SPEED = TunerConstants.kSpeedAt12Volts; // TODO: set
public static final LinearAcceleration MAX_ACCELERATION =
MetersPerSecondPerSecond.of(12); // TODO: set

public static final PathConstraints DEFAULT_CONSTRAINTS =
new PathConstraints(
MAX_SPEED,
MAX_ACCELERATION,
MAX_ANGULAR_SPEED,
MAX_ANGULAR_ACCELERATION
);
public static final AngularVelocity MAX_ANGULAR_SPEED = RotationsPerSecond.of(4); // TODO: set
public static final AngularAcceleration MAX_ANGULAR_ACCELERATION =
RotationsPerSecondPerSecond.of(9); // TODO: set

public static final PathConstraints DEFAULT_CONSTRAINTS =
new PathConstraints(MAX_SPEED, MAX_ACCELERATION, MAX_ANGULAR_SPEED, MAX_ANGULAR_ACCELERATION);
}
13 changes: 13 additions & 0 deletions src/main/java/frc/robot/constants/SpindexerConstants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package frc.robot.constants;

import com.ctre.phoenix6.configs.Slot0Configs;

public class SpindexerConstants {
public static final int CAN_ID = 0;
public static final Slot0Configs SLOT0_CONFIGS =
new Slot0Configs().withKP(0).withKI(0).withKD(0).withKS(0).withKV(0).withKA(0).withKG(0);

public static final double MOMENT_OF_INERTIA = 0;
public static final double GEARING = 1;
public static final double SPIN_VOLTAGE = 0.0;
}
44 changes: 23 additions & 21 deletions src/main/java/frc/robot/constants/TurretConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@
import edu.wpi.first.units.measure.Angle;
import edu.wpi.first.units.measure.AngularAcceleration;
import edu.wpi.first.units.measure.AngularVelocity;
import edu.wpi.first.units.measure.ImmutableAngularAcceleration;
import edu.wpi.first.units.measure.ImmutableAngularVelocity;

public class TurretConstants {
// TODO: IMPLEMENT
public static final int CAN_ID = -1;
public static final Angle MAX_ANGLE = Rotations.of(1);
public static final double GEAR_RATIO = 0; // how many rotations of the output shaft per rotation of the turret
public static final double MOMENT_OF_INERTIA = 0;
public static final double LENGTH = 0;
public static final double SIM_KP = 0;
public static final double SIM_KI = 0;
public static final double SIM_KD = 0;
public static final double TALON_KS = 0;
public static final double TALON_KV = 0;
public static final double TALON_KA = 0;
public static final double TALON_KP = 0;
public static final double TALON_KI = 0;
public static final double TALON_KD = 0;
public static final AngularVelocity TURRET_CRUISE_VELOCITY = RotationsPerSecond.of(4); // target cruise velocity of the turret, 4 rps
public static final AngularAcceleration TURRET_ACCELERATION = RotationsPerSecondPerSecond.of(16);// target acceleration of the turret, 16 rps^2
public static final double TURRET_JERK = 160; // target jerk of the turret, _160 rps^3 -> there's no AngularJerk sadly
public static final Angle ANGLE_TOLERANCE = Rotations.of(0.001);
// TODO: IMPLEMENT
public static final int CAN_ID = -1;
public static final Angle MAX_ANGLE = Rotations.of(1);
public static final double GEAR_RATIO =
0; // how many rotations of the output shaft per rotation of the turret
public static final double MOMENT_OF_INERTIA = 0;
public static final double LENGTH = 0;
public static final double SIM_KP = 0;
public static final double SIM_KI = 0;
public static final double SIM_KD = 0;
public static final double TALON_KS = 0;
public static final double TALON_KV = 0;
public static final double TALON_KA = 0;
public static final double TALON_KP = 0;
public static final double TALON_KI = 0;
public static final double TALON_KD = 0;
public static final AngularVelocity TURRET_CRUISE_VELOCITY =
RotationsPerSecond.of(4); // target cruise velocity of the turret, 4 rps
public static final AngularAcceleration TURRET_ACCELERATION =
RotationsPerSecondPerSecond.of(16); // target acceleration of the turret, 16 rps^2
public static final double TURRET_JERK =
160; // target jerk of the turret, _160 rps^3 -> there's no AngularJerk sadly
public static final Angle ANGLE_TOLERANCE = Rotations.of(0.001);
}
Loading