Lib5K-core & Extensions

Lib5K is 5024’s robotics library, and has been in use since the 2019 offseason. This library is built around a system of modules (we call them extensions). This allows you to pick and choose which parts of the library you need for your project, and makes refactoring much easier.


All Lib5K extensions rely on the core library called Lib5K-core. To get started with extensions, your project must be set up to use Lib5K-core.

Setting up Lib5K-core

To set up the core, open your project’s build.gradle file, and add the following line to your project’s repositories block. If there is none, make one with repositories{}.

// Add Jitpack maven source
maven { setUrl("") }

Next, declare the dependency in your project’s dependencies block with:

// Lib5K-core
implementation 'com.github.frc5024:lib5k-core:master-SNAPSHOT'

// All Lib5K extensions should be declared here by pasting in the "implementation" line from webdocs
// ...

Reloading Lib5K

If a change has been made to Lib5K or an extension upstream, you must run the following command in your project:

./gradlew build --refresh-dependencies

Available extensions

The following extensions are available for use, and can be installed by adding their respective implementation declarations to your project’s build.gradle file.

  • AsyncHAL (GitHub) (docs)
    • Adds callback support to common sensors
    • implementation 'com.github.frc5024:asynchal:master-SNAPSHOT'
  • PurePursuit (GitHub) (docs)
    • Adds a Pure Pursuit controller, and path generation tools
    • implementation 'com.github.frc5024:purepursuit:master-SNAPSHOT
  • HardwareAccess (GitHub) (docs)
    • Contains all wrappers and classes for interfacing with robot hardware
    • implementation 'com.github.frc5024:hardwareaccess:master-SNAPSHOT

Using the old Lib5K

If your project still relies on the old Lib5K, you can load the legacy library as an extension with the following:

implementation 'com.github.frc5024:lib5k-legacy:master-SNAPSHOT'

Keep in mind this is no longer maintained.

Table of contents