Connecting and Sync
This page covers connecting to the Control Hub, choosing which robot you're working on, and copying files to the robot with Sync.
The connection light, Robot list, Connect, Sync and Folders… are at the bottom right of the window.
Connect to the Control Hub
- Join the Control Hub's Wi-Fi network.
- Click Connect. If something is wrong, it tells you what to check.
- Check the dot beside Hub files turns green and the button now says Disconnect. Hover over the dot for details.
On Windows you can also connect with a USB cable. A Mac can't reach a Control Hub over USB.
Connecting from Android Studio's ADB Wi-Fi panel works too; it's the same connection. So does double-clicking connect_robot.command (Mac) or connect_robot.bat (Windows) in the AutonGui folder, which you can use without opening Robot Designer.
Disconnect before switching off
Before you switch off the robot or leave its Wi-Fi, click Disconnect.
A connection that just vanishes can freeze Android Studio. If that happens, double-click disconnect_robot.command (Mac) or disconnect_robot.bat (Windows) in the AutonGui folder to fix it.
A hub on a USB cable is disconnected by unplugging it.
Your robot project may have its own copies of these files. They do the same thing.
Choose your robot
Robot is the robot this computer is working on, the active robot. Each robot has its own design, gamepad controls and camera settings.
- Design, Controls and the camera settings edit the active robot.
- Sync copies only the active robot's files to the hub.
- Choosing a robot here is the same as loading it on the Design tab: each shows the other's choice, and the Design heading says it is the same robot.
- Each computer keeps its own choice, outside git.
Copy files to the robot with Sync
Click Sync. It copies your scripts, paths and the active robot's files to the Control Hub. The status bar then shows a short line of what it did. Click it to see everything: the files copied, kept and deleted, and any warnings. The Sync button says Sync ✓ up to date when the hub's files match this computer's and Sync • changes to send when they don't.
Each file reaches the robot whole: Sync copies it under a temporary .part name, then renames it. An OpMode that initializes during a sync reads the old file or the new one, never part of one. A sync cut off part way can leave a .part file on the hub; the robot and Sync ignore it.
If the hub has a different robot's design, Sync asks first. If the hub belongs to that robot, click Cancel and choose that robot in Robot.
What Sync copies
| On your computer | On the hub |
|---|---|
Every .json file in AutonScripts | /sdcard/AutonScripts |
Every .json file in Scripts | /sdcard/Scripts |
Every .json file in AutonPaths | /sdcard/AutonPaths |
The active robot's controls.json | /sdcard/Controls/controls.json |
The active robot's robot_design.json, cameras.json, pedro.json, recording.json and camera settings (such as ball_camera.json) | /sdcard/CameraConfigs/ |
The active robot's settings for a subsystem, <subsystem>.json (such as claw.json), for each subsystem its design lists | /sdcard/SubsystemConfigs/ |
field_designs/apriltags.json, elements.json, forbidden_areas.json, field_positions.json, field.json | /sdcard/CameraConfigs/ |
Sync copies nothing else. It doesn't copy other robots' folders, subsystems.json, calibrations.json, conditions.json or shooter_parts.json.
What Sync removes
- In the three script and path folders,
.jsonfiles your computer doesn't have. - In
/sdcard/CameraConfigs, camera settings the active robot doesn't have. - In
/sdcard/SubsystemConfigs, subsystem settings the active robot doesn't have.
It never removes controls.json, cameras.json, pedro.json, recording.json, robot_design.json or the four field files. If your computer has none, the robot keeps its copy and Sync says so. Files in subfolders are never touched.
What Sync brings back
After copying, Sync brings back the sessions the robot recorded (see Recordings) from /sdcard/Recordings into the robot project's TeamCode/recordings/ folder, and deletes each from the robot once it is on your computer whole. The robot writes recordings uncompressed, so it spends nothing compressing while it runs; Sync compresses each on your computer, where it takes a few percent of the room. The status bar says how many came back. A recording the OpMode is still writing is left for the next Sync, and so is one that couldn't be copied; hover over the status bar to see why.
With Delete from the robot once copied turned off on the Recordings tab, Sync copies the recordings and leaves them on the robot, so another computer can sync them too. A recording already on your computer is not copied again.
Sync brings recordings back even when the files already match, so click it after a match or a practice to collect them.
When Sync skips a file
Sync leaves the robot's copy alone, and tells you, when:
- the Robot Designs folder set in Folders… doesn't exist;
- a file in the active robot's folder isn't valid JSON. Fix the file and sync again.
When the Drive Train needs measuring
Sync copies the design either way, and says Drive Train needs attention in the status bar when a drive wheel or odometry pod has no measured contact point, has one the robot refuses or can't read, or the Drive Train assembly has a problem. Click the status bar line to see which. The robot drives on where an unmeasured wheel or pod is drawn, so measure each one and enter it on the Drive Train assembly (Design tab, Assemblies). Pods count only while odometry is switched on.
Check the robot has what this computer has
Right of the tabs, Robot Designer shows this computer's Config and Code, for example Config 7F3A-91C2 · Code 813059d. In a window too narrow for the tabs and them, they're in the window's title instead. When an OpMode initializes, the Driver Station shows the robot's, in its first two lines:
Config: 7F3A-91C2 10-23
Code: 813059d on main
10-23 is the month and day of the Sync.
When both match, the robot is running with this computer's configuration and code.
- Config is a code made from every file Sync copies: the robot's design, its subsystems' settings, its controls and camera files, the scripts, paths and field files. Any change to any of them gives a different code, and undoing the change brings the old one back. Each Sync writes the code to the robot, with the files it copied; at Init the robot works it out again from the files it has.
- A different Config: this computer has changes the robot doesn't. Sync.
Config: 1B2C-40AA: changed since the Sync of 7F3A-91C2 (Shoot.json); Sync again: a file on the robot changed, or went missing, after the last Sync, or a Sync stopped part way. Sync.Config: not from a Sync: the robot has never been synced by this version of Robot Designer. Sync.
- Code is the git commit the robot's app was built from. A
*after it in Robot Designer, orwith local changeson the Driver Station, means Java inTeamCode/src/mainwasn't committed when it was built, so two builds with the same commit can differ. A different Code means build and install the robot code from this computer. While Java inTeamCode/src/mainhas uncommitted changes, Robot Designer saysRobot code changed — build and install neededafter the Code, because no build can contain them yet. Build and install from Android Studio or Gradle; Robot Designer's Robot commands, subsystems and conditions read files that build writes, so they keep showing the last build until you run one. Without git where the robot code was built, it shows as unknown.
Where your files are
Folders… shows the project's folders, and lets you choose others.
| Row | Holds | Default |
|---|---|---|
| Routines folder | Auton scripts | TeamCode/src/main/java/org/firstinspires/ftc/teamcode/autons/AutonScripts |
| Scripts folder | Reusable scripts | …/autons/Scripts |
| Paths folder | Paths | …/autons/AutonPaths |
| Robot designs folder | A folder for each robot, and shared catalogues | TeamCode/robot_designs |
The Robot Designs folder looks like this:
robot_designs/
subsystems.json the subsystem catalog
conditions.json the conditions scripts wait for
calibrations.json
shooter_parts.json (always read from TeamCode/robot_designs)
TestBed/ one robot
robot_design.json its design
controls.json its gamepad controls
cameras.json its camera catalogue
pedro.json how Pedro Pathing drives it
ball_camera.json each camera's settings
claw.json a subsystem's settings, named for the subsystem (optional)
Next_Robot/ another robot
...
Changing the Robot Designs folder shows that folder's active robot on the Design tab.
Older projects
If a project keeps its designs side by side, sharing one controls.json and one set of camera files, Robot Designer moves them into this layout when it opens the project. Each robot gets its own folder with copies of what it uses. Commit the change in git.