Robot projects must be compiled (“built”) and then transferred to the VMX-pi (“deployed”) to run on the VMX-pi. Since the code is not compiled natively on the robot controller, this is known as “cross-compilation.”
Building the Robot Project
To build your robot project, do one of:
- Open the Command Palette and enter/select “Build Robot Code”
- Open the shortcut menu indicated by the ellipses in the top right corner of the VS Code window and select “Build Robot Code”
- Right-click on the build.gradle file in the project hierarchy and select “Build Robot Code”
The status of the build is displayed in the VSCode Terminal window, as shown below:
NOTE: When building the first time, your development computer must be connected to the Internet so that required online library files can be downloaded. Once downloaded, your development computer no longer needs to be connected to the Internet.
Deploying the Robot Project
Deploy robot code by selecting “Deploy Robot Code” from any of the three locations from the previous instructions. That will build (if necessary) and deploy the robot program to the VMX-pi
If successful, the VSCode Terminal window will indicate a “Build Successful” message and the RioLog windows in VSCode will open with the console output from the robot program as it runs.
NOTE: When deploying, your development computer must be connected to the same network as the Raspberry Pi.
Next Steps
After deploying the robot application to VMX-pi, you can control the Robot Application using the Driver Station.