This library is deprecated. Go use DogeCommander.
RobotLib is a library for programming FTC robots. It's central feature is a template for command-based design pattern. It seperates robot code into 2 parts. The main two parts are commands and subsystems. Subsystems are just parts of the robot, like a claw, a drivetrain, etc. Commands make subsystems perform specific actions.
- Clone this repository to some known location.
- Open Android Studio to your ftc_app.
- Press File -> New -> Import Module.
- Select wherever you cloned this repository. (You may get an error; this is okay, ignore it.)
- Press Finish.
- Then modify your project
build.gradle
to look like this.
buildscript {
ext.kotlin_version = '1.2.71' //this line
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" //this line
}
}
//The lines after this
allprojects {
repositories {
google()
jcenter()
}
}
- Right click the TeamCode module in the Project Browser. Press Open Module Settings.
- Go to the Dependencies tab.
- Press the plus in the top right, and select Module Dependency.
- Then select
:robotlib
, and press OK twice. - You should have RobotLib installed! If you have any questions, ask in the programming channel of the FTC Discord!
The documentation for RobotLib is written in the KDoc format and is compiled into github flavored markdown with Dokka. The documentation can be found here.
The samples for robotlib can be found here.