SIM-03: Build an autonomous in the simulator with the auto builder
- Your robot needs: any robot.
- Starter bots that fit: goBILDA starter bot, REV DUO starter bot, AndyMark Robits starter bot, Studica starter bot.
- Library version: v0.17.0 or newer.
- The docs it tests: The simulator: a pretend Control Hub and Driver Hub, Several autonomous modes, and choosing the right one.
Why
The auto builder draws an autonomous on the field, runs it with your real robot code, shows where the robot left the plan, and writes the Java and a scenario file. It must read any team's robot and give Java that builds the first time.
Setup
- SIM-01 works on this laptop.
- Your robot from
Robot.java(./gradlew :sim:fromRobot -PteamCode=../TeamCode, then./gradlew :sim:run -PteamCode=../TeamCode), or a kit bot's robot file. - A robot project where you can add one autonomous file.
Steps
- Open http://localhost:8780 and press Auto builder over the 3D view. Check the Robot class it picked ("Best fit"), the drive, and TeleOp next (your robot's TeleOp).
- Pick RED or BLUE. Pick a start spot from the list. Press Write it for me for the note.
- Simple steps: add a drive, a turn, an action from your
Actions.javaand "park from here". Fix every warning the checks show. - Press Run. Watch the purple plan robot and your robot. Read the result table: each step's word (done, STALLED...) and how far off the plan it ended.
- If it offers a fix with Apply (a 0.3 s wait before a turn), apply it and Run again.
- Copy the Java. Paste it into a new file in your TeamCode. Build it.
- Save the scenario and run it:
./gradlew :sim:scenario -Pfile=...(each line prints ok or FAIL).
Pass rule
The copied Java builds the first time (0 errors), every step ends done in the run, and the saved scenario passes (every line ok).
Record
Write these down while you test. The report form has them as a list to fill in.
- the robot (your own or a kit bot) and its drive
- whether "Best fit" and "TeleOp next" were right
- the result table after the last run (copy it)
- any build error in step 6, and any FAIL in step 7
- what was hard to find on the page
If your robot is different
A mecanum robot with odometry can also try the Pedro path mode (needs a follower(...) line for "follow"). A tank robot cannot strafe: the checks should say so. The saved scenario's expect step N done lines need the v0.17.0 simulator or newer.
Report your result
Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.
Report resultNo reports for this test yet: yours would be the first. Every test's reports.
All tests · Next: DOC-01 Quick start from a blank robot project
Something wrong on this page? Tell us with a short GitHub form.