> For the complete documentation index, see [llms.txt](https://docs.raidrobotics.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/before-the-real-robot.md).

# Before the real robot

The template runs on a laptop out of the box. A real robot needs real numbers first. Go through this list before you enable it on real hardware.

{% hint style="danger" %}
Every CAN ID, port, gear ratio, gain, position and current limit in the template is a placeholder. Enabling the robot with placeholder values can drive a mechanism into its hard stops.
{% endhint %}

## Checklist

* [ ] **Drivetrain**: `TunerConstants.java` regenerated in Tuner X for this drivetrain.
* [ ] **CAN IDs and buses**: every ID in `Constants.CAN` matches the robot. Check with Tuner X.
* [ ] **DIO ports**: every port in `Constants.DIO` matches the wiring.
* [ ] **Motor direction**: each mechanism's `Inverted` setting is set so that positive voltage moves it the right way (raises an arm, pulls a piece in). Check with Tuner X before closed-loop control.
* [ ] **Gear ratios and limits**: `GEAR_RATIO`, `MIN_ANGLE` and `MAX_ANGLE` match the mechanism.
* [ ] **Positions**: `STOW`, `INTAKE`, `SCORE` (and any others) re-measured on the robot.
* [ ] **Starting position**: Mechanism 1 has no absolute sensor and **assumes it's stowed when the code starts**. Turn the robot on with it stowed, or add a CANcoder.
* [ ] **Gains**: start with the template's gains and low voltages, then tune. See [Mechanisms](https://docs.raidrobotics.org/commands-v3-state-machine/guide/mechanisms.md#configuration).
* [ ] **Current limits**: set for each motor and mechanism.
* [ ] **Limelights**: names and mounting positions in `Constants.Vision.CAMERAS`; the season's AprilTag map uploaded to each camera; checked against `Drive/Pose`. The filters and trust numbers in `Vision.java` are 2026's.
* [ ] **Field**: `Constants.Field` and `AutoDrive.forAlliance` updated for this year's field.
* [ ] **Auto poses**: real poses, tried on both alliances in the simulator.

## Phoenix Pro

The mechanisms use FOC (`withEnableFOC(true)`), and the swerve steer motors use `FusedCANcoder`. Both are Phoenix Pro features. Without a Pro license:

* The motors still run, without FOC, and report an unlicensed-feature fault.
* The steer motors fall back to `RemoteCANcoder` automatically.

## First enable

1. Put the robot on blocks, wheels off the ground.
2. Enable in teleop with someone on the disable button (Enter disables; the space bar is the emergency stop).
3. Check that the drive responds the right way to each stick.
4. Run the state machine one state at a time and watch each mechanism's `Angle`/`Target` in AdvantageScope or Elastic.
5. Only then put the robot on the ground.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.raidrobotics.org/commands-v3-state-machine/how-to/before-the-real-robot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
