Using the Advanced VRC Pro App

Downloading the Source Code

To download the Advanced VRC, go to http://vrobotsim.org/get-started and click on Download Source Code to get the fully-functional app on a computer setup with Android Studio. After downloading the ZIP file, unzip the file and open the folder through Android Studio. You are now ready to write your own programs! The following pictures show how to set up the Advanced VRC Demo with Android Studio.

Creating a Configuration

Configure Robot from Default Template

To create a default robot configuration, all you have to do is click on the three dots on the top right of the screen, then click Configure Robot. Once a new page pops up, simply click the “CONFIGURE FROM TEMPLATE” button on the bottom left and click Activate once it shows up in the list. If it successfully activated, the name of the configuration (“defaultRobot”) would show up on the top right in the red bar – if not, please try the previous steps again. Then, click Done. The following pictures display the steps to create the configuration.

Create Custom Robot Configuration

To create a custom robot configuration, click on the three dots on the top right of the screen, then click Configure Robot. Once a new page pops up, click the New button on the top left and enter in a name. Once added to the list, click the Edit button for the corresponding configuration and type the names for the motors 0 through 8 where the corresponding motor on the virtual robot corresponds to is in a faint text within each textbox. After typing all the names, click Save and then click Activate to use the configuration. If it successfully activated, the name of the configuration (“defaultRobot”) would show up on the top right in the red bar. Then, click Done. The following pictures display the steps to create the custom robot configuration.

Creating Programs Using Android Studio

To create your own program, you can write the code the same way you would when using the real robot. Make sure to use the correct motor names that correspond to the active configuration to move the right motors. The two existing examples show how to write TeleOp and Autonomous codes. Please notice that the name of the Java file in the TeamCode module is what shows up in the app’s OpMode dropdown. The pictures below show how to create new OpMode programs within Android Studio.

When writing programs, make sure to remove the “waitForStart();” line of code.

Please note the following motors and their function on the virtual robot:

  1. frontLeft: Front Left Motor on Drivetrain
  2. frontRight: Front Right Motor on Drivetrain
  3. backLeft: Back Left Motor on Drivetrain
  4. backRight: Back Right Motor on Drivetrain
  5. intake: Ring Collection Motor
  6. hopper: Ring Launcher
  7. leftShooter: Left Flywheel
  8. rightShooter: Right Flywheel

Running Your Own OpModes

Before running, make sure to check that your device has a consistent WiFi connection.

Once you have activated the configuration and it shows up under active configuration on the main screen, you are ready for running your first program, but make sure you have made a booking – take a look at this guide to claim your time slot for the virtual simulator experience. After you have opened the simulator tab and can view the field, you are ready to begin using any of your programs! To switch between OpModes, you can click on the light red bar where the name of the first OpMode (alphabetically) is displayed to reveal a dropdown.

When running an Autonomous, you can simply click Init, wait for a popup to tell you to Start, and then click Start. You can click stop to end the OpMode.

When running a TeleOp, first completely close the app by clicking the square button on the bottom and swiping it out. Next, you must connect a controller (preferably an FTC legal gamepad, but almost all types will work) to the port available on the tablet and then open the app again. If a gamepad icon on the top right appears and text shows up in the Telemetry section on the bottom (showing the joysticks’ position), the device has successfully recognized the gamepad. If not, please try another gamepad or adapter. Once recognized, you can click Init, wait for a popup to tell you to Start, and then click Start. You can click stop to end the OpMode.

The pictures below show how to start Autonomous and TeleOp programs.

Running Autonomous

Running TeleOp