SIM-02: Your own robot in the simulator, from Robot.java
- 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.16.0 or newer.
- The docs it tests: The simulator: a pretend Control Hub and Driver Hub, Lesson 1: The robot in five files.
Why
:sim:fromRobot writes a simulator robot file from your own Robot.java. Robots are all different, so this is where we learn which parts the simulator gets wrong or cannot draw.
Setup
- Your robot in five files in your TeamCode, with the library in the robot project.
- SIM-01 works on this laptop.
Steps
- In the
ftc-helper-libfolder:./gradlew :sim:fromRobot -PteamCode=../TeamCode. - Open
simulator/robot.propertiesin your robot project. Read theTODOlines; fill in the robot's size if you know it. ./gradlew :sim:run -PteamCode=../TeamCode, open http://localhost:8780.- INIT your TeleOp, read the button map, START, drive, and use every part.
- Run your autonomous. Read the report at the end.
- Draw your parts with
looks(...)shapes (how) if you want pieces to be picked up and shot.
Pass rule
:sim:fromRobot finishes with no error, and every part in Robot.java (all of them, for example 6 of 6) shows in the simulator's Motors or Servos panel and responds to its button.
Record
Write these down while you test. The report form has them as a list to fill in.
- your parts (the
add(...)lines, or a list) - any part that did not show or did not move
- errors from
:sim:fromRobot(copy them) - what was hard in step 2 or step 6
If your robot is different
That is the point of this test: describe what is unusual (a part the library has no module for, a custom Module, odd device names). Things the simulator cannot do are listed in the simulator guide: say if you hit one.
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: SIM-04 Record a test in the simulator, break it, update it
Something wrong on this page? Tell us with a short GitHub form.