(SWTeam) Deploying code to the RoboRio - quasics/quasics-frc-sw-2015 GitHub Wiki

Assumptions

  • Deployment is taking place using the drive station laptop.
    • You can do this from other machines, but information like the user name, etc., will then be different.
  • You have some basic familiarity with the Visual Studio Code IDE.
    • You should be able to launch it, open a folder/workspace, etc.
  • You know how to power up the robot.
    • Connecting/configuring the radio, dealing with the battery, etc., are out of scope for this document.

Building and deploying to the robot

  1. Boot the laptop and log on using the "Developer" account.

  2. Launch Visual Studio Code.

    • If needed, switch to the folder containing the project/code to be downloaded to the bot.
    • TODO: Add instructions on how to make this switch. The process isn't fully obvious for users.
  3. (Optional) Update the local copy of the project source code.

    1. Connect to a WiFi network with Internet access (e.g., "GSD-Unsecure" in the workshop).
    2. TODO: Add remaining steps.
    • TODO: Add information on why you might need/want to do this (or why you might not).
  4. Build the code to make sure that everything compiles correctly.

    1. Open the "command window" by either hitting <Ctrl+Shift+P>, or by clicking on the WPILib icon (looks like a "W" in a red hexagon) on the top of the window.
    2. Pick the "WPILib: Build Robot Code" command to compile the robot code.
      • TODO: Add screenshot.
    3. Be patient while the code builds.
    4. When the build finishes, you should see a "BUILD SUCCESSFUL" message in green letters. If you don't, the build wasn't successful, and you won't be able to update the code on the Rio.
  5. Power up the robot and wait for the radio to be ready.

    • TODO: Write up what to look for that indicates that everything is ready.
  6. Switch the laptop's WiFi connection to the network from the robot's radio (e.g., "2656_C").

    • Be sure to wait until the connection has been fully established.
    • An alternative is to connect the laptop to the robot via an Ethernet cable plugged into the Rio, the radio, or the network hub (if we're using one).
  7. Deploy the code to the robot.

    1. Within Visual Studio Code (VSC), open the "command window" by either hitting <Ctrl+Shift+P>, or by clicking on the WPILib icon (looks like a "W" in a red hexagon) on the top of the window.
    2. Pick the "WPILib: Deploy Robot Code" command.
      • TODO: Add screenshot.
    • You can also just hit <Shift+F5> to run the "Deploy code" process, without going through the command window.
    • In the "Console" panel (often at the bottom of the main Visual Studio Code window), you should see a series of output, indicating the progress of the deployment.
    • On successful completion, you should see a message saying, "TODO: Add text here."
⚠️ **GitHub.com Fallback** ⚠️