Step 2: Get robot 1's code
At the end of this step, robot 1’s real code is on your laptop. It builds, robot 1 drives in the simulator, and all of robot 1’s tests pass. Every step after this uses this project.
Get the code
Section titled “Get the code”The team’s code is on GitHub: Indianola-Robotics-Team/octobots-2026-r1. It is public, so you need no account to get it. To send changes back, you need write access from the mentor.
GitHub Desktop: click File > Clone Repository… and open the URL tab. Paste
https://github.com/Indianola-Robotics-Team/octobots-2026-r1.git, pick a folder, and click Clone.
GitHub Desktop gets the library too.
Command line:
Where: your computer’s own terminal (Mac: the Terminal app; Windows: PowerShell), in the folder where you keep your projects. Android Studio has no project open yet, so it has no Terminal tab.
git clone --recurse-submodules https://github.com/Indianola-Robotics-Team/octobots-2026-r1.gitThis makes a folder octobots-2026-r1 with the robot’s code, and the library in its ftc-helper-lib
folder. Why --recurse-submodules: the library is a submodule (a git project kept inside another
one). Without it, the ftc-helper-lib folder stays empty and the build fails.
Check:
Where: the same terminal, in the folder where you ran the clone.
cd octobots-2026-r1git submodule statusIt prints a line that ends with ftc-helper-lib (v0.41.0). If the folder is empty, or the line starts
with a -, run git submodule update --init.
Open it and build it
Section titled “Open it and build it”- In Android Studio: File > Open, pick the
octobots-2026-r1folder, click Open. - Wait for the Gradle sync (Android Studio reads the project’s build files and gets what they list). The bar at the bottom right shows it. The first one downloads a lot.
- Click the green hammer (Build > Make Project). It must finish with no errors.
The list next to the green Run button now has Simulator and Simulator tests
(the simulator buttons).
If they are not there, click File > Close Project, then open octobots-2026-r1 again.
Try it in the simulator
Section titled “Try it in the simulator”- Pick Simulator in the list and click Run. When the Run window says
Open http://localhost:8780, open that page in Chrome or Edge. - Pick R1 TeleOp, press INIT, read the button list, then press START. Set gamepad 1 to Keyboard. Drive with W/S. W drives launcher first, because robot 1’s front is the launcher. The intake is at the back, so S backs up onto a piece. Strafe sideways with A/D, turn with the arrows, run the intake with LB, fire with RB. All the buttons are in Step 5: The buttons.
- Press STOP. Try the three autonomous programs, one at a time: pick it in the autonomous list,
INIT, then START. Each fires its four pieces and parks in our LOADING ZONE.
- R1 Right Corner: Launch, Park Right: from our wall, parks at the zone’s right corner.
- R1 Right Wall: Launch, Park Right: from the right wall, parks at the zone’s right corner.
- R1 Left Wall: Wait, Launch, Park Left: from the left wall, waits 15 s for a partner’s shots,
parks at the zone’s left corner. Alone in the simulator, nothing tips the HIVE first, so its shots
may not score. Its test,
r1-auto-left.sim, tips the HIVE first.
- Click the red Stop button in Android Studio. Then pick Simulator tests and click Run.
Robot 1’s 19 tests (in
simulator/scenarios/) must all pass. Why: it proves your laptop builds and runs the team’s code before you take it to the robot.
From the Terminal: run one test by itself. It also checks your ./gradlew setup
(The Terminal).
Where: Android Studio’s Terminal tab, in the ftc-helper-lib folder of octobots-2026-r1.
./gradlew :sim:scenario -Pfile=../simulator/scenarios/r1-v1.simIt ends with BUILD SUCCESSFUL. Why this test: r1-v1.sim drives the whole robot once (the intake,
a strafe, a pick-up, a shot). Step 7 lists
every test.
Where things are
Section titled “Where things are”All the robot’s code is in TeamCode/src/main/java/org/firstinspires/ftc/teamcode/:
| File | What is in it | What you do with it on the robot |
|---|---|---|
Robot.java |
each part, and its name in the robot configuration (the drive: a goBILDA Strafer, four mecanum wheels) | check that the names match the Control Hub’s configuration |
Tunables.java |
every number | tuning: the measured numbers go here |
Controls.java |
the buttons (it is also R1 TeleOp) | nothing at first |
Actions.java |
steps that use several parts | nothing at first |
autos/ |
the three autonomous programs: RightCornerLaunchAndPark.java, RightWallLaunchAndPark.java, LeftWallWaitLaunchAndPark.java |
run them after the Drive Tuner |
(no finders/) |
every check and finder is in the library’s Tune and check menu, the Motor Direction Check too | run them in the first robot sessions (Step 8) |
Robot 1’s tests are in simulator/scenarios/. Step 3 reads the
five files with you, one block at a time.
Keep it in sync
Section titled “Keep it in sync”Every session, before you change anything: get your teammates’ newest code.
GitHub Desktop: click Fetch origin (top bar). If it changes to Pull origin, click it.
Command line:
Where: Android Studio’s Terminal tab, in the project folder (octobots-2026-r1, the one with
TeamCode in it).
git pullgit submodule updateWhy the second line: a pull can move the library to another version. git submodule update puts the
library’s files on that version. If you forget it, the build uses the old library.
If git pull says your changes would be overwritten, commit them first
(The change loop), then pull again.
Done when
Section titled “Done when”octobots-2026-r1builds on your laptop.- R1 TeleOp drives in the simulator, and every one of robot 1’s tests passes.
- You pull before you change anything.
Next: Step 3: The five files.