ThorCore is a library for FTC. It provides implementations for common drivetrains, vector mathematics, closed-loop controllers, vision systems, and sensors.
This is the dev branch. Some of the code here may be unfinished or unstable, but most things should work.
There are 2 ways to install ThorCore.
Download the latest .aar file from the Releases page and put it into the lib
folder under the
TeamCode
module. Next, open the build.gradle
file in the TeamCode
module. Inside
the dependencies
block, add the following line:
implementation files("lib/ThorCore-1.1.1.aar")
Run a Gradle sync, and it should be all set.
Clone ThorCore into your Android Studio project. The ThorCore folder should be in the
top-level directory, alongside FtcRobotController
and TeamCode
. Make sure you include
git submodules in the cloning process.
For example, if the project was in /home/thor/ftc/FtcRobotController
:
thor@thor:~$ cd /home/thor/ftc/FtcRobotController
thor@thor:~/ftc/FtcRobotController$ git clone -b dev https://github.com/FTC-9974-THOR/ThorCore.git
thor@thor:~/ftc/FtcRobotController$ cd ThorCore
thor@thor:~/ftc/FtcRobotController/ThorCore$ git submodule update --init --recursive
Start up Android Studio and open the project. In settings.gradle
, add the following line at the
start of the file:
include ':ThorCore'
In TeamCode/build.gradle
, insert the following at the end of the file:
android {
defaultConfig.minSdkVersion 25
compileOptions.targetCompatibility JavaVersion.VERSION_11
}
repositories {
maven { url = 'https://maven.brott.dev/' }
}
dependencies {
implementation project(':ThorCore')
}
Run a Gradle sync, and you should be all set. Android Studio should automatically download and install the NDK and CMake, but you can download them manually from the SDK Manager if necessary. ThorCore is built and tested with NDK version 27.0.12077973 and CMake 3.22.1, but it should work with any recent version of the NDK and CMake.
For additional information, submit an issue or DM @fortraan on Discord (note that you'll have to be in the FTC Discord server to do so).
ThorCore v1.1.1