An updated and maintained fork of FTCLib
Project led by FTC 23511, Seattle Solvers.
Head maintainer: Arush
You can find the latest version number (and the implementation details) at the Dairy Foundation, where SolversLib is hosted.
Javadocs for SolversLib Core (standard FTCLib, has Command Base, Hardware, Gamepads, etc.) are available at https://repo.dairy.foundation/javadoc/releases/org/solverslib/core/latest, but you can replace latest
with the desired version number.
Javadocs for SolversLib Pedro Pathing (Pedro Pathing support in FTCLib) are available at https://repo.dairy.foundation/javadoc/releases/org/solverslib/pedroPathing/latest, but you can replace latest
with the desired version number.
The best documentation for SolversLib is the Javadocs, especially for the Pedro Pathing support.
FTCLib documentation (has information about how to use FTCLib, and does not have any information about SolversLib) - https://docs.ftclib.org/ftclib
Please note that the vision part of FTCLib has been removed in SolversLib, as it is severly outdated. If you want vision, please use EasyOpenCV (which is built into the SDK).
-
Open up your FTC SDK Project in Android Studio.
-
Go to your
build.common.gradle
file in your project. -
Add the following to the
repositories
section at the bottom of the file.mavenCentral()
-
Open the
build.gradle
file in your TeamCode module. -
Go to the bottom of the file, and add the following.
dependencies { implementation "org.solverslib:core:0.2.1" // the vision part of ftclib is no longer in solverslib, as it is extremely old // please use EasyOpenCV instead // Only for pedro pathing users (you still need the actual pedro pathing library installed for this): implementation "org.solverslib:pedroPathing:0.2.1" }
You can find the latest version number at the Dairy Foundation, where SolversLib is hosted. Alternatively, you can look at the latest tag.
Both the core
and pedroPathing
modules use the same version.
- Because FTCLib makes use of advanced features, you need to increase the minSdkVersion to 24. Unfortunately, this means that ZTE Speed Phones are not supported in this release.
In build.common.gradle, change the minSdkVersion from 23 to 24:
defaultConfig {
applicationId 'com.qualcomm.ftcrobotcontroller'
minSdkVersion 24
targetSdkVersion 28
}
- Ensure your Java version is set to 8. This should already be the case with the latest SDK.
If not, you will need to change your Java version. Scroll down in
build.common.gradle
until you find thecompileOptions
block.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
Change the 7 to an 8 like so:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
NOTE: If your module has a few dependencies, you might have an error related to multidex on building the project.
This is caused by the project exceeding the limit for imports enforced by Android Studio. To solve this,
add multiDexEnabled true
to the below location inside the build.common.gradle
file.
defaultConfig {
applicationId 'com.qualcomm.ftcrobotcontroller'
minSdkVersion 24
targetSdkVersion 28
multiDexEnabled true
}
Since this is a community-driven, open source library, we are constantly looking for more content. If you feel there is something missing from our library, feel free to contribute! If you want to contribute to the project, be sure to read the CONTRIBUTING.md.
Please make sure to contact us if you have any other questions.