Prerequisites
Before you begin, make sure the following are installed and available on your development machine.If you only want to build or simulate locally, you do not need a physical RoboRIO. The WPILib simulation GUI (
simgui) launches automatically when you run simulateJava.Steps
Build variants
Two Gradle project properties change what gets compiled or how the simulation runs.DataLog
On a real robot,DataLogManager starts automatically in the Robot constructor:
DATA_LOG_FLUSH_PERIOD_S = 1.0 / 14.0). The DataLog is also resumed every second in robotPeriodic() to recover from any transient pauses. Struct schemas for Pose2d, Pose3d, ChassisSpeeds, SwerveModuleState, and SwerveModulePosition are explicitly registered so log viewers (e.g., Advantage Scope) can decode them.
Command lifecycle events (initialize, interrupt, finish) are also logged automatically via CommandScheduler callbacks:
Before enabling the robot for a match or tuning session, zero the hood and turret using the Start button on the driver controller. The
disabledExit() callback will warn via DriverStation.reportWarning if the hood has not been zeroed when exiting disabled mode.