FRC library with V-SLAM, trajectory generation, and LIDAR object detection capabilities
LGPL-3.0 License
This is Spartronics FRC Team 4915's year-independent library. Features include:
Click on the below thumbnails to play the videos.
Odometry is provided by the V-SLAM camera. The robot drive to the center of the ball.
First, add the JitPack repository to your build.gradle
:
repositories {
maven { url 'https://jitpack.io' } // Add this line
}
Then, add SpartronicsLib as a dependency (note that this will use the latest version of SpartronicsLib on the master branch; to use something different you should change the master-SNAPSHOT
bit):
dependencies {
implementation "com.github.Spartronics4915:SpartronicsLib:master-SNAPSHOT"
}
Although the above approach makes it easy to share, separate, and track commits to SpartronicsLib, it's not sufficiently beginner-proof. For this reason, SpartronicsLib is copied into our year-specific repo for your use, and then copied out with the Git history at the end of the year. This means that beginners don't need to remember to commit and push in two places, to use --include-build
, or to pass --refresh-dependencies
, or to do anything else special.
Although this "copy" approach is kludgy and painful, it's the price we have to pay to reduce footguns that cause issues during competition.
When adding features to SpartronicsLib, it is reccomended that you include a unit test. The unit testing is very easy, and in many cases it means that you don't need to make another project or have a robot to test your feature.
If you do want to make a change to SpartronicsLib while it's included in an external project, then you should use a local copy of SpartronicsLib instead of the Jitpack one when building your external project. This is easy as passing --include-build ../path/to/SpartronicsLib
to the Gradle wrapper when building or testing your external project.