Skip to content

Latest commit

 

History

History
184 lines (149 loc) · 10.6 KB

File metadata and controls

184 lines (149 loc) · 10.6 KB

Az-RBSI Getting Started Guide

This page includes detailed steps for getting your new Az-RBSI-based robot code up and running for the 2026 REBUILT season.


Before you deploy to your robot

Before you deploy code to your robot, there are several modifications you need to make to the code base.

All of the code you will be writing for your robot's subsystems and modifications to extant RBSI code will be done to files within the src/main/java/frc/robot directory (and its subdirectories).

  1. Driver Controller: The Az-RBSI supports Xbox, PS4, and PS5-style driver controllers through frc.robot.util.RBSIController. RobotContainer creates the driver controller with RBSIController.createDriverController(0) and detects the connected controller once at robot startup, so teams should not need to edit RobotContainer just to switch between Xbox and PlayStation controllers.

    The default semantic mapping is:

    • Xbox A/B/X/Y maps to PlayStation Cross/Circle/Square/Triangle
    • Xbox left/right bumpers map to PlayStation L1/R1
    • Stick axes and POV/D-pad nudges use the same driver-facing actions

    If you want different controls, remap the action constants in Constants.ControllerButtonConstants rather than replacing controller classes in RobotContainer. See RBSI-Constants.md for the full Xbox/PS4/5 physical-input mapping and examples for naming co-driver/operator actions such as intake, scoring, and mechanism stow commands.

  2. Robot Project Constants: All of the configurable values for your robot will be in the Constants.java file. This file contains the outer Constants class with high-level configuration variables such as swerveType, autoType, visionType, and whether your team has purchased a CTRE Pro license for unlocking some of the more advanced communication and control features available for CTRE devices. See RBSI-Constants.md for a field-by-field guide to the constants file.

  3. Robot Physical Constants: The next four classes in Constants.java contain information about the robot's physical characteristics, power distribution information, all of the devices (motors, servos, switches) connected to your robot, and operator control preferences. Work through these sections carefully and make sure all of the variables in these classes match what is on your robot before deploying code. Power monitoring in Az-RBSI matches subsystems to ports on your Power Distribution Module, so carefully edit the RobotDevices class of Constants.java to include the proper power ports for each motor in your drivetrain, and include any motors from additional subsystems you add to your robot.


Tuning constants for optimal performance

It cannot be overemphasized the importance of tuning your drivetrain for smooth and consistent performance, battery longevity, and not tearing up the field.

  1. Over the course of your robot project, you will need to tune PID parameters for both your drivebase and any mechanisms you build to play the game. AdvantageKit includes detailed instructions for how to tune the various portions of your drivetrain, and we STRONGLY RECOMMEND you work through these steps BEFORE running your robot.

    Similar tuning can be done with subsystem components (flywheel, intake, etc.).

  2. Power monitoring by subsystem is included in the Az-RBSI. In order to properly match subsystems to ports on your Power Distribution Module, carefully edit the RobotDevices of Constants.java to include the proper power ports for each motor in your drivetrain, and include any motors from additional subsystems you add to your robot. To include additional subsystems in the monitoring, add them to the m_power instantiation in the RobotContainer.java file.

  3. In the Constants.java file, the classes following RobotDevices contain individual containers for robot subsystems and interaction methods. The OperatorConstants class determines how the operator interacts with the robot. DrivebaseConstants and FlywheelConstants (and additional classes you add for your own mechanisms) contain human-scale conversions and limits for the subsystem (e.g., maximum speed, gear ratios, PID constants, etc.). AutoConstants contains the values needed for your autonomous period method of choice (currently supported are MANUAL -- you write your own code; PATHPLANNER, and CHOREO). The next two are related to robot vision, where the vision system constants are contained in VisionConstants, and the physical properties (location, FOV, etc.) of the cameras are in Cameras.


Robot Development

As you program your robot for the 2026 (REBUILT) game, you will likely be adding new subsystems and mechanisms to control and the commands to go with them. Add new subsystems in the subsystems directory within src/main/java/frc/robot -- you will find an example flywheel already included for inspiration. New command modules should go into the commands directory.

The Az-RBSI is pre-plumbed to work with both the PathPlanner and Choreo autonomous path planning software packages -- select which you are using in the Constants.java file. Additionally, both PhotonVision and Limelight computer vision systems are supported in the present release.

For deeper subsystem bring-up, use these pages after the first compile and deploy:

  • RBSI-Drive.md: swerve configuration, odometry ordering, pose buffers, and drive characterization.
  • RBSI-Vision.md: PhotonVision and Limelight configuration, camera transforms, observation filtering, and simulation.
  • RBSI-Autonomous.md: Manual, PathPlanner, Choreo, and Autopilot autonomous workflows.
  • RBSI-SysId.md: example flywheel SysId routines and how to use the generated gains.

Included 3D Prints

To help teams with standardized enclosures for their PhotonVision Orange Pi's and CTRE CANivores, we include three 3D print files as part of the "Assets" section of each release.