This is Spartronics FRC Team 4915's year-independent library. Features include:
- JNI bindings for the Intel RealSense T265 camera which allow for seamless, plug-and-play V-SLAM on the roboRIO.
- A pure Java RPLidar A1M8 driver that works on the roboRIO, along with a 2D LIDAR object detection algorithim that works on squares and circles. Also includes a LIDAR target tracker.
- An A* path finder that can generate the waypoints for a trajectory that avoids arbitrary axis-aligned obstacles.
- A trajectory generator and followers fast enough to generate trajectories on the fly (<20 ms generation time), along with a variety of constraints to make trajectories driveable.
- Motor wrappers to abstract the various FRC-legal motor controllers and to ease unit conversions.
- Unit conversion, logging and other handy utilities.
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"
}
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.