Robot code for FRC Team 7660 (The Byting Irish).
a -> (on true) zero's gyro based on alliance zone x -> (while true) intake arm is zeroed leftBumper -> (while true) toggle intake roller rightTrigger -> (partial) activate turret rotation rightTrigger -> (full) initiate shooting leftTrigger -> intake arm deployment
NeutralToBallPickupAuto is a hybrid autonomous routine that combines:
- Choreo split pathing for deterministic travel to/from the ball area
- Vision-guided pickup behavior during a timed middle phase
Current flow:
- Follow Choreo split
0from neutral zone to ball area - Run a timed pickup loop for
5s - If timeout occurs while currently approaching an object, allow a short finish window
- Follow Choreo split
1for return - Print
"hands up -- shooting now"as the end action placeholder
- Use Choreo for repeatable long-travel segments.
- Use object detection in the pickup zone where exact trajectories are less reliable.
- Keep search simple and deterministic:
- If object exists, drive toward it.
- If no object exists, rotate CCW in 15-degree search chunks.
- Use object area as a proxy for pickup:
- Area crossing
8%counts as a proxy pickup event.
- Area crossing
- Return is timeout-driven, not count-driven.
frc.robot.autonomous.NeutralToBallPickupAuto- Builds the full command sequence (
split0 -> pickup -> split1 -> shoot print). - Loads Choreo splits using
PathPlannerPath.fromChoreoTrajectory(name, splitIndex)and follows withAutoBuilder.followPath(...). - Runs pickup loop with
Commands.startRun(...).
- Builds the full command sequence (
frc.robot.autonomous.AutonomousManager- Registers this routine in the chooser as
Neutral To Ball Pickup. - Sets this routine as the default autonomous option.
- Registers this routine in the chooser as
frc.robot.subsystems.swervedrive.SwerveSubsystem- Provides
getBestDetectedObjectAnyCamera()to expose the best non-fiducial object across camera0/camera1.
- Provides
frc.robot.Constants.NeutralToBallPickupAutoConstants- Central place for all routine tuning constants.
- Expected trajectory base name:
NeutralToBallPickup - Expected file path:
src/main/deploy/choreo/NeutralToBallPickup.traj
- Expected splits in this file:
- Split
0: outbound to ball area - Split
1: return path
- Split
You do not need one file per split. One .traj with multiple splits is sufficient.
- Proxy pickup count is published to:
Auto/NeutralToBallPickup/ProxyPickups
Location: frc.robot.Constants.NeutralToBallPickupAutoConstants
DEFAULT_TRAJECTORY_NAME = "NeutralToBallPickup"DEFAULT_PICKUP_TIMEOUT_SEC = 5.0POST_TIMEOUT_FINISH_GRACE_SEC = 1.5SEARCH_ROTATE_STEP_DEG = 15.0(CCW search)OBJECT_PICKUP_AREA_PERCENT_THRESHOLD = 8.0OBJECT_APPROACH_MIN_FWD_MPS = 0.10OBJECT_AREA_TO_FWD_GAIN = 0.08OBJECT_YAW_TO_ROT_GAIN = 2.0- Drive mode caps:
MAX_MODE_FORWARD_MPS = 0.35MAX_MODE_ROTATION_RAD_PER_SEC = 0.35DEBUG_MODE_FORWARD_MPS = 0.35DEBUG_MODE_ROTATION_RAD_PER_SEC = 0.35
-
Choreo path following itself does not require AprilTags.
-
The drivetrain pose estimate can still be corrected by vision if enabled in the swerve subsystem.
-
In this project, vision-assisted updates remain enabled during autonomous/pickup behavior.
-
Vision/fusion/fuelPalantir architecture and dashboard variables:
README_VISION.md -
Agent workflow notes for this repo:
AGENTS.md