This repository contains the code for the Iron Tank robot, developed using the WPILib framework and CTRE Phoenix libraries. The project is structured to support multiple subsystems and commands, following the Command-Based programming paradigm.
The main
branch contains the core functionality of the robot, including:
- Drive subsystem for controlling the robot's movement.
- Commands for autonomous and teleoperated modes.
- Integration with Limelight for vision-based targeting.
The Test
branch includes additional functionality for testing purposes:
- A Test Motor subsystem (
TestSubsystem
) for experimenting with a TalonFX motor (CAN ID 2). - Commands to control the test motor, such as setting its position and stopping it.
- Logging of motor data, including output, position, velocity, temperature, and current.
Note: The test motor is only available in the
Test
branch. If you are working with the test motor, ensure you are on theTest
branch.
- Controls the robot's drivetrain using VictorSPX motor controllers.
- Supports arcade drive and tank drive modes.
- Logs motor output and temperature for debugging.
- Controls a TalonFX motor for testing purposes.
- Configurable PID gains for position control.
- Logs detailed motor data, including position, velocity, temperature, and current.
- Uses a PID controller to align the robot with an AprilTag using Limelight.
- Combines PID controllers for turning and distance to follow an AprilTag.
- Controls the test motor in the
TestSubsystem
. - Allows setting motor position dynamically.
Run the following command to build the project:
./gradlew build
Use the following command to deploy the code to the robot:
./gradlew deploy
- WPILib: For robot programming framework.
- CTRE Phoenix 6: For motor controllers and sensors.
- AdvantageKit: For logging and telemetry.
- Ensure you are on the correct branch (
main
orTest
) based on your requirements. - The
Test
branch includes experimental features and is not intended for production use.
This project is licensed under the WPILib BSD license.