mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
RobotMap intake and shooter
This commit is contained in:
@@ -20,6 +20,12 @@ import edu.wpi.first.wpilibj.DigitalInput;
|
||||
//import frc4388.robot.constants.Constants.ElevatorConstants;
|
||||
import frc4388.robot.constants.Constants.SimConstants;
|
||||
import frc4388.robot.constants.Constants.VisionConstants;
|
||||
import frc4388.robot.subsystems.intake.IntakeConstants;
|
||||
import frc4388.robot.subsystems.intake.IntakeIO;
|
||||
import frc4388.robot.subsystems.intake.IntakeReal;
|
||||
import frc4388.robot.subsystems.shooter.ShooterConstants;
|
||||
import frc4388.robot.subsystems.shooter.ShooterIO;
|
||||
import frc4388.robot.subsystems.shooter.ShooterReal;
|
||||
// import frc4388.robot.subsystems.elevator.ElevatorIO;
|
||||
// import frc4388.robot.subsystems.elevator.ElevatorReal;
|
||||
import frc4388.robot.subsystems.swerve.SwerveDriveConstants;
|
||||
@@ -56,7 +62,8 @@ public class RobotMap {
|
||||
public final SwerveIO swerveDrivetrain;
|
||||
|
||||
// /* Elevator Subsystem */
|
||||
// public final ElevatorIO elevatorIO;
|
||||
public final ShooterIO shooterIO;
|
||||
public final IntakeIO intakeIO;
|
||||
|
||||
public RobotMap(SimConstants.Mode mode) {
|
||||
switch (mode) {
|
||||
@@ -84,25 +91,33 @@ public class RobotMap {
|
||||
|
||||
swerveDrivetrain = new SwerveReal(swerveDrivetrainReal);
|
||||
|
||||
// Configure elevator
|
||||
// Configure Shooter
|
||||
|
||||
// TalonFX elevator = new TalonFX(ElevatorConstants.ELEVATOR_ID.id);
|
||||
// TalonFX endeffector = new TalonFX(ElevatorConstants.ENDEFFECTOR_ID.id);
|
||||
TalonFX shooter1 = new TalonFX(ShooterConstants.SHOOTER1_ID.id);
|
||||
TalonFX shooter2 = new TalonFX(ShooterConstants.SHOOTER2_ID.id);
|
||||
TalonFX indexer = new TalonFX(ShooterConstants.INDEXER_ID.id);
|
||||
|
||||
//Configure Intake
|
||||
TalonFX arm = new TalonFX(IntakeConstants.ARM_ID.id);
|
||||
TalonFX roller = new TalonFX(IntakeConstants.ROLLER_ID.id);
|
||||
|
||||
// DigitalInput basinLimitSwitch = new DigitalInput(ElevatorConstants.BASIN_LIMIT_SWITCH);
|
||||
// DigitalInput endeffectorLimitSwitch = new DigitalInput(ElevatorConstants.ENDEFFECTOR_LIMIT_SWITCH);
|
||||
// DigitalInput IRIntakeBeam = new DigitalInput(ElevatorConstants.INTAKE_LIMIT_SWITCH);
|
||||
|
||||
// elevatorIO = new ElevatorReal(elevator, endeffector, basinLimitSwitch, endeffectorLimitSwitch, IRIntakeBeam);
|
||||
|
||||
shooterIO = new ShooterReal(shooter1, shooter2, indexer);
|
||||
|
||||
intakeIO = new IntakeReal(arm, roller);
|
||||
|
||||
// Fault
|
||||
FaultPidgeon2.addDevice(swerveDrivetrainReal.getPigeon2(), "Gyro");
|
||||
|
||||
// FaultTalonFX.addDevice(elevator, "Elevator");
|
||||
// FaultTalonFX.addDevice(endeffector, "Endeffector");
|
||||
|
||||
FaultTalonFX.addDevice(shooter1, "Shooter1");
|
||||
FaultTalonFX.addDevice(shooter2, "Shooter2");
|
||||
FaultTalonFX.addDevice(indexer, "Indexer");
|
||||
FaultTalonFX.addDevice(arm, "Arm");
|
||||
FaultTalonFX.addDevice(roller, "Roller");
|
||||
|
||||
FaultTalonFX.addDevice(swerveDrivetrainReal.getModule(0).getDriveMotor(), "Module 0 Drive");
|
||||
FaultTalonFX.addDevice(swerveDrivetrainReal.getModule(0).getSteerMotor(), "Module 0 Steer");
|
||||
@@ -123,10 +138,9 @@ public class RobotMap {
|
||||
default:
|
||||
leftCamera = new VisionIO() {};
|
||||
rightCamera = new VisionIO() {};
|
||||
// reefLidar = new LidarIO() {};
|
||||
// reverseLidar = new LidarIO() {};
|
||||
swerveDrivetrain = new SwerveIO() {};
|
||||
// elevatorIO = new ElevatorIO() {};
|
||||
intakeIO = new IntakeIO() {};
|
||||
shooterIO = new ShooterIO() {};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 15;
|
||||
public static final String GIT_SHA = "ba16f53d6d8155249e7ca767b54fbfa1f17ce68e";
|
||||
public static final String GIT_DATE = "2026-01-20 19:23:14 MST";
|
||||
public static final String GIT_BRANCH = "Intake-boilerplate";
|
||||
public static final String BUILD_DATE = "2026-01-27 18:56:30 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1769565390510L;
|
||||
public static final int GIT_REVISION = 22;
|
||||
public static final String GIT_SHA = "e2797ab77871b91d546e6e9793852cf94d8b712f";
|
||||
public static final String GIT_DATE = "2026-01-27 19:28:57 MST";
|
||||
public static final String GIT_BRANCH = "Subsystem-Boilerplate";
|
||||
public static final String BUILD_DATE = "2026-01-29 16:59:21 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1769731161482L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -20,6 +20,13 @@ public class IntakeConstants {
|
||||
public static final double ARM_MOTOR_GEAR_RATIO = 1.;
|
||||
public static final double ROLLER_MOTOR_GEAR_RATIO = 1.;
|
||||
|
||||
|
||||
//IDs
|
||||
|
||||
|
||||
public static final CanDevice ARM_ID = new CanDevice("SHOOTER 1", 20);
|
||||
public static final CanDevice ROLLER_ID = new CanDevice("SHOOTER 2", 21);
|
||||
|
||||
// Limits
|
||||
|
||||
// 0 is the forward angle on the robot.
|
||||
|
||||
@@ -48,9 +48,10 @@ public class ShooterConstants {
|
||||
// .withDutyCycleNeutralDeadband(0.04) // TODO: Figure out what this means
|
||||
// );
|
||||
|
||||
public static final class IDs {
|
||||
public static final CanDevice FLYWHEEK_CAN_DEVICE = new CanDevice("Flywheel", 22);
|
||||
}
|
||||
public static final CanDevice SHOOTER1_ID = new CanDevice("SHOOTER 1", 22);
|
||||
public static final CanDevice SHOOTER2_ID = new CanDevice("SHOOTER 2", 23);
|
||||
public static final CanDevice INDEXER_ID = new CanDevice("INDEXER",24);
|
||||
|
||||
|
||||
public static final TalonFXConfiguration SHOOTER1_MOTOR_CONFIG = new TalonFXConfiguration()
|
||||
.withCurrentLimits(
|
||||
|
||||
Reference in New Issue
Block a user