# Installing

There are two methods to installing the Road Runner library.

Method #1, the simpler option, is to simply download the quickstart repo (opens new window). The quickstart repo is an empty FTC season repo along with the preinstalled dependencies and tuning opmodes to get Road Runner up and running. However, this does not work if you already have an existing codebase.

Method #2 will go through installing Road Runner via gradle and copying over the necessary files from the quickstart repo into your existing team project.

Afterwards, it is highly recommended to upgrade your Rev Expansion Hub or Control Hub Firmware. Directions can be found below.

# Method 1: Downloading the Quickstart

  1. Navigate to https://github.com/acmerobotics/road-runner-quickstart (opens new window)
  2. Click the big green download button
  1. Unzip/extract the folder into your directory of choice
  2. Open up the folder in Android studio.
  3. Voilà! You now have everything you need to get Road Runner up and going.

# Method 2: Installing RR on Your Project

WARNING

These installation instructions do not apply to versions below the 7.0 SDK (released on Sep. 20, 2021). Version 7.0 is the minimum legal version of the SDK (at the time of writing). Instructions for earlier versions will not be supported.

  1. We are are going to assume you have the same file structure as the latest (7.0 at the time of writing) standard FTC provided project. This can be found here (opens new window).

  2. Look for the build.dependencies.gradle file at the root of your project.

FtcRobotController ├── .github ├── FtcRobotController ├── TeamCode ├── doc ├── gradle/wrapper ├── libs ├── .gitignore ├── README.md ├── build.common.gradle ├── build.dependencies.gradle (This one) ├── build.gradle ├── gradle.properties ├── gradlew ├── gradlew.bat └── settings.gradle

  1. Add the following snippet at the end of the repositories block:

    maven { url = 'https://maven.brott.dev/' }

    Then, add the following snippet at the end of your dependencies block:

    implementation 'com.acmerobotics.dashboard:dashboard:0.4.3'

    Your file should look like this:






 


















 


/* build.dependencies.gradle */
repositories {
    mavenCentral()
    google() // Needed for androidx
    jcenter()  // Needed for tensorflow-lite
    maven { url = 'https://maven.brott.dev/' }
    flatDir {
        dirs rootProject.file('libs')
    }
}

dependencies {
    implementation 'org.firstinspires.ftc:Inspection:7.0.0'
    implementation 'org.firstinspires.ftc:Blocks:7.0.0'
    implementation 'org.firstinspires.ftc:Tfod:7.0.0'
    implementation 'org.firstinspires.ftc:RobotCore:7.0.0'
    implementation 'org.firstinspires.ftc:RobotServer:7.0.0'
    implementation 'org.firstinspires.ftc:OnBotJava:7.0.0'
    implementation 'org.firstinspires.ftc:Hardware:7.0.0'
    implementation 'org.firstinspires.ftc:FtcCommon:7.0.0'
    implementation 'org.tensorflow:tensorflow-lite-task-vision:0.2.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'org.firstinspires.ftc:gameAssets-FreightFrenzy:1.0.0'

    implementation 'com.acmerobotics.dashboard:dashboard:0.4.3'
}

If you are using OpenRC (opens new window), please read the Dashboard specific instructions here (opens new window)

  1. Look for the TeamCode/build.gradle file. Specifically the one in the TeamCode folder.

FtcRobotController ├── .github ├── FtcRobotController ├── TeamCode │ ├── src/main │ └── build.gradle (This one) ├── doc ├── gradle/wrapper ├── libs ├── .gitignore ├── README.md ├── build.common.gradle ├── build.dependencies.gradle ├── build.gradle ├── gradle.properties ├── gradlew ├── gradlew.bat └── settings.gradle

  1. In TeamCode/build.gradle, add the following dependencies:

    • implementation 'org.apache.commons:commons-math3:3.6.1'
    • implementation 'com.acmerobotics.roadrunner:core:0.5.4'








 
 
 


/* TeamCode/build.gradle */
apply from: '../build.common.gradle'
apply from: '../build.dependencies.gradle'

dependencies {
    implementation project(':FtcRobotController')
    annotationProcessor files('lib/OpModeAnnotationProcessor.jar')

    implementation 'org.apache.commons:commons-math3:3.6.1'

    implementation 'com.acmerobotics.roadrunner:core:0.5.4'
}
  1. Look for the build.common.gradle file in the root folder of your project. Find JavaVersion.VERSION_1_7 and replace it with JavaVersion.VERSION_1_8:


 
 


/* build.common.gradle lines 110-113 */
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
  1. We now need to copy over all the java files from the TeamCode folder located in the online quickstart repo (all the files from this folder (opens new window)). Copy over all the files from both the drive, util, and trajectorysequence folder into a location in your project, preferably just your TeamCode folder. These classes include all the files and utilities required for tuning and dashboard logging.

# Upgrading Firmware

It is highly recommended that you upgrade the firmware on your Control Hub or Expansion Hub to the latest version. Firmware version 1.8.2 brings a number of improvements including: DC motor output linearity, improved close-loop controls, improved I2C speeds, and USB recovery for ESD faults. Road Runner's performance directly benefits from these improvements.

Directions to upgrade the Control/Expansion Hub firmware can be found in the REV docs (opens new window).

That's it! You're set! The installation process is done. Now go on ahead and start tuning.