|
Valor 6800 1.0
|
Valkyrie is the C++ robot codebase for the 2026 Valor team. It builds as a native C++ library and includes a Google Test-based test suite and Doxygen documentation generation.
Prerequisites
thrifty-lib)Build (Windows)
Build (Unix)
Generate docs
Project layout
src/ : main and test sourcesthrifty-lib/ : vendored/shared library code used by the projectbuild/ : Gradle build outputs (executables, libs, reports)install/ : installable artifactsValkyrie.json : project metadata used by toolingThe codebase follows a clear, modular robot architecture built around small, testable components:
BaseSubsystem: an abstract subsystem pattern that every robot subsystem implements. Subsystems follow a 20ms cycle broken into assessInputs() (teleop-only), analyzeDashboard() (always-on), and assignOutputs() (enabled modes). This enforces consistent read/state/write ordering across the robot.Loggable: a lightweight NetworkTables wrapper used by subsystems and components to publish and subscribe telemetry in a type-safe way.Gamepad wraps WPILib controllers with deadbands, filters, and helper methods to provide clean operator inputs.drivetrain/ implements a Swerve drivetrain with Swerve and SwerveModule implementations (motion/control lives here).sensors/ folder contains device-specific wrappers (Lidar, Vision/AprilTags, CAN-based sensors, proximity, current, etc.) that expose normalized sensor state for subsystems to consume.controllers/ (e.g. NeoController) and util/ provide control algorithms, profiling (Profiler), signal management (PhoenixSignalManager), and coordinate transforms (RobotToWorldConverter / WorldAlign).Auto manages selectable autonomous commands and integrates external command sources when needed.This separation keeps hardware I/O and device specifics inside sensor/drive classes, state and decision logic in subsystems, and command composition in the Auto and command scheduler. It makes unit testing and simulation easier (see src/test) and keeps dashboard/logging concerns centralized via Loggable and the NetworkTables integrations.
Running tests
./gradlew test which runs Google Test suites and writes results to build/test-results and TEST-UNIT.xml.Notes for contributors
./gradlew format before committing.gradlew) — run all Gradle tasks through the wrapper for reproducible builds.License
LICENSE file at the repository root.More
publish.gradle, config.gradle and gradle.properties.