2025-01-04 16:09:10 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
|
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
package frc4388.robot;
|
|
|
|
|
|
|
|
|
|
import com.ctre.phoenix6.hardware.TalonFX;
|
2025-01-09 12:57:04 -07:00
|
|
|
|
|
|
|
|
import org.photonvision.PhotonCamera;
|
|
|
|
|
|
2025-01-04 16:09:10 -07:00
|
|
|
import com.ctre.phoenix6.hardware.CANcoder;
|
|
|
|
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
2025-01-06 14:51:44 -07:00
|
|
|
import com.ctre.phoenix6.swerve.SwerveDrivetrain;
|
|
|
|
|
import com.ctre.phoenix6.swerve.SwerveDrivetrainConstants;
|
|
|
|
|
import com.ctre.phoenix6.swerve.SwerveModuleConstants;
|
|
|
|
|
import com.ctre.phoenix6.swerve.SwerveModuleConstantsFactory;
|
2025-01-04 16:09:10 -07:00
|
|
|
|
2025-01-27 17:29:25 -07:00
|
|
|
import edu.wpi.first.wpilibj.DigitalInput;
|
2025-01-17 19:53:14 -07:00
|
|
|
import frc4388.robot.Constants.ElevatorConstants;
|
2025-01-04 16:09:10 -07:00
|
|
|
// import edu.wpi.first.wpilibj.motorcontrol.Spark;
|
|
|
|
|
// import frc4388.robot.Constants.LEDConstants;
|
|
|
|
|
import frc4388.robot.Constants.SwerveDriveConstants;
|
2025-01-09 12:57:04 -07:00
|
|
|
import frc4388.robot.Constants.VisionConstants;
|
2025-01-08 18:32:02 -07:00
|
|
|
// import frc4388.robot.subsystems.SwerveModule;
|
2025-01-04 16:09:10 -07:00
|
|
|
import frc4388.utility.RobotGyro;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Defines and holds all I/O objects on the Roborio. This is useful for unit
|
|
|
|
|
* testing and modularization.
|
|
|
|
|
*/
|
|
|
|
|
public class RobotMap {
|
2025-01-06 14:51:44 -07:00
|
|
|
// private Pigeon2 m_pigeon2 = new Pigeon2(SwerveDriveConstants.IDs.DRIVE_PIGEON.id);
|
|
|
|
|
// public RobotGyro gyro = new RobotGyro(m_pigeon2);
|
2025-01-09 12:57:04 -07:00
|
|
|
|
2025-02-06 13:02:39 -07:00
|
|
|
public PhotonCamera leftCamera = new PhotonCamera(VisionConstants.LEFT_CAMERA_NAME);
|
|
|
|
|
public PhotonCamera rightCamera = new PhotonCamera(VisionConstants.RIGHT_CAMERA_NAME);
|
2025-01-04 16:09:10 -07:00
|
|
|
|
|
|
|
|
public RobotMap() {
|
|
|
|
|
configureDriveMotorControllers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* LED Subsystem */
|
|
|
|
|
// public final Spark LEDController = new Spark(LEDConstants.LED_SPARK_ID);
|
|
|
|
|
|
2025-01-06 20:41:44 -07:00
|
|
|
/* Swreve Drive Subsystem */
|
|
|
|
|
public final SwerveDrivetrain<TalonFX, TalonFX, CANcoder> swerveDrivetrain = new SwerveDrivetrain<TalonFX, TalonFX, CANcoder> (TalonFX::new, TalonFX::new, CANcoder::new,
|
|
|
|
|
Constants.SwerveDriveConstants.DrivetrainConstants,
|
|
|
|
|
Constants.SwerveDriveConstants.FRONT_LEFT, Constants.SwerveDriveConstants.FRONT_RIGHT,
|
|
|
|
|
Constants.SwerveDriveConstants.BACK_LEFT, Constants.SwerveDriveConstants.BACK_RIGHT
|
|
|
|
|
);
|
|
|
|
|
|
2025-01-17 19:53:14 -07:00
|
|
|
/* Elevator Subsystem */
|
2025-01-17 20:09:14 -07:00
|
|
|
public final TalonFX elevator = new TalonFX(ElevatorConstants.ELEVATOR_ID.id);
|
2025-01-27 17:29:25 -07:00
|
|
|
public final TalonFX endeffector = new TalonFX(ElevatorConstants.ENDEFFECTOR_ID.id);
|
|
|
|
|
|
|
|
|
|
public final DigitalInput basinLimitSwitch = new DigitalInput(ElevatorConstants.BASIN_LIMIT_SWITCH);
|
|
|
|
|
public final DigitalInput endefectorLimitSwitch = new DigitalInput(ElevatorConstants.ENDEFFECTOR_LIMIT_SWITCH);
|
2025-01-17 20:55:53 -07:00
|
|
|
|
2025-01-06 20:41:44 -07:00
|
|
|
void configureDriveMotorControllers() {}
|
|
|
|
|
|
2025-01-04 16:09:10 -07:00
|
|
|
}
|