Skip to content

Repository files navigation

2026 Rebuilt - Simbot Tim

Simbot Tim is named in honour of the late Tim Lutton, a passionate supporter of our team and a member of the Niagara-on-the-Lake Rotary Club. Tim's contributions to our team were invaluable and he will be greatly missed. His obituary can be found here.

Project Archetype

2026 Simbot Tim utilizes a non-superstructure Command-based code structure, making heavy use of AdvantageKit subsystems, PathPlanner, and an Elastic dashboard. Large emphasis was put into separation of concerns, and is largely visible in the practice of full-file commands for every action, no matter the simplicity. Additionally utilization of in-line lambdas (commands or suppliers) should be avoided, and instead be contained within a method, resulting in a large amount of simple supplier methods with meaningful names.

General Folder Structure

  • robotcontainer/ -> Primary entry-point to the robot structure, encompassing orchestration of every portion of the robot.

    • enums/ -> Consolidation of robot-wide or command-focused enums
    • CommandFactory -> Actual construction of commands
    • TriggerFactory -> Construction of robot triggers. Methods may be used to determine when or how a command runs, or contain general suppliers to change command behaviours (for example: aimHeld in the Shoot Command could utilize this concept).
    • RobotState -> General robot state values. Exists for the rare occurrence where commands and/or subsystems need a non-trivial way to communicate with each other. Should be sparingly used.
    • RobotContainer -> The controller of the robot. Constructs subsystems, auton commands, and auton modes; Binds triggers to commands and sets default commands for subsystems.
    • SimXboxController -> Sim(botics) controller wrapper to provide controller-related suppliers, including simplified joystick values
  • commands/ -> Contains every possible action of the robot, roughly organized by the primary subsystem

  • config/ -> A mix of config data-wrappers and robot-wide constants (RobotConstants, HardwareIds, FieldConstants)

  • subsystems/

    • Mechanisms (indexer, intake, shooter) -> Utilizes the AdvantageKit Subsystem structure, notably abstracting real behaviour to IO files. IO implementation is decided when the subsystem is constructed in RobotContainer
      • IO.java -> Interface for available actions. Also includes a IOInputs containing what will be automatically logged
      • IOHardware.java -> Real-robot implementation of the IO interface.
      • IOSim.java -> Simulation implementation of the IO interface.
      • Subsystem.java -> Public methods exposed for use in command files.
    • Drive
      • AdvantageKit Directory -> A slightly modified version of AdvantageKit's CTRE swerve template that controls our actual swerve-drive.
      • SMBDrive -> Simbotics drive-wrapper. Adds PID-control and additional logging to the AdvantageKit drive.
    • DriverIO -> Contains miscellaneous driver aids: LEDs, dashboard values such as HUB details.
      • LEDs -> Utilizes a priority system allowing for commands to request or remove an LED state without any worry of conflicts. Priority is based on LEDRequests Enum.
    • Vision -> Hardware (Limelight) and Simulation (PhotonVision) camera processing
      • Megatag2 -> Always active unfused localization. Shooter camera is trusted greatly if it sees 3+ tags in order to increase consistency while aiming.
      • Megatag1 -> Active until the robot is enabled for the first time. Only used to zero the gyro before a match begins.
  • util/

    • CommandLogger -> Custom implementation to log which command is currently controlling each subsystem
    • ShootMoveLUT -> RPM & angle aiming utility for passing and scoring
    • HubTracker -> Helper class to track the hub state
  • deploy/pathplanner/

About

Public code for our 2026 robot.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages