acmerobotics / road-runner-quickstart

FTC quickstart for https://github.com/acmerobotics/road-runner
BSD 3-Clause Clear License
168 stars 855 forks source link

Docs: Adding a "installing roadrunner onto an already existing FTC project" #363

Closed Iris-TheRainbow closed 4 months ago

Iris-TheRainbow commented 4 months ago

I think that it would be helpful for a lot of teams, especially ones migrating from 0.5.6, to have instructions for how to install Roadrunner onto a FTC project of their own. Here would be my take on a new install page, but feel free to edit it:

Roadrunner for FTC

Quickstart

The easiest way to get started is the quickstart. The quickstart is a full FTC Android Studio project with preinstalled Road Runner, FTC Dashboard, and tuning utilities. You can download it from the GitHub page or clone it with git clone https://github.com/acmerobotics/road-runner-quickstart.git. Then open the folder as an FTC project and head over to the tuning page for next steps.

Installing Roadrunner onto an existing FTC project

For teams migrating from Roadrunner 0.5.6, or teams who have already programed their robot and wish to install Roadrunner onto their own project, the quickstart presents some issues. Teams would have to manually copy their code and any Gradle changes onto the quickstart. Instead, follow these steps for installing Roadrunner onto your own FTC project.

teams migrating from 0.5.6 only Remove any roadrunner 0.5.6 Gradle implementations before following these steps.

  1. go to your Teamcode build.gradle file.

    • in your repositories block, add url = 'https://maven.brott.dev/'
      repositories {
      maven {
      url = 'https://maven.brott.dev/'
      }
      }

      -in your dependencies block, add implementation "com.acmerobotics.roadrunner:ftc:0.1.12" and implementation "com.acmerobotics.dashboard:dashboard:0.4.14"

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

    implementation "com.acmerobotics.roadrunner:ftc:0.1.12" implementation "com.acmerobotics.dashboard:dashboard:0.4.14" }

  2. Run a Gradle sync.
  3. Download the quickstart here, by either cloning it with git or downloading it from github.
  4. Navigate to the teamcode folder (in the project it's at TeamCode/src/main/java/org/firstinspires/ftc/teamcode) and copy all the files there (the messages and tuning folders as well) and copy them to the TeamCode folder of your own project.

You're done! Time to continue on to tuning or read about the new features in Roadrunner 1.0 here

rbrott commented 4 months ago

Thanks for the suggestion! I incorporated a version of it into the docs.