Note
This repository was made and ran on 9277's robot for the 2026 FIRST Robotics Competiton season, Atlas (pictured above).
This project is a WPILib command-based project written in Java.
src/main/java/frc/robot- Source code location/commands- Misc. commands/generated- Swerve drive code generated by Phoenix Tuner X/subsystems- All the subsystems on Atlas/util- Basic utilities/vision- Vision subsystem/Constants.java- All constants for the project
For this season, we chose to build a single-shooter turret. The turret tracks the hub by calculating the robot's angle to the hub, adding on the robot's own rotation from the gyroscope, and setting the turret to that angle. Due to the 3-4 cameras that are located on the corners of Atlas, there is enough vision to always know where the robot is relative to the hub.
To find the shooter speed, hood angle and time of flight, a quadratic regression is used. A few data points were collected by setting the shooter speed and hood angle manually. Then, using Desmos, we're able to find the coefficients for a quadratic regression that allows us to interpolate and extrapolate the shooter speed, hood angle and TOF.
A link to this Desmos graph can be found here.
- In AdvantageScope click
App->Use Custom Assets Folder-> and select theAdvantageScopefolder in this repo. - Drag in the robot pose from
NT:/Pose/robotPoseinto the Poses section - Select
Atlasfor the robot model - To get the turret moving, drag
FinalComponentPoses(NT:/AdvantageKit/RealOutputs/FinalComponentPoses) from Network Tables into the robot pose.
If you would like to use the FuelSim (thank you 5000 Hammerheads!), drag NT:/Fuel Simulation/Fuels into Poses as well.


