Cross-Platform, Multi-Use Motion Profiling and Trajectory Generation.
Pathfinder is a library for generating Motion Profiles, a way to smoothly fit and follow a trajectory based upon given waypoints. Currently, both a C and Java API are available, but can be applied to almost any application. There also exists a C++ port which can be used by copying the files into your C++ project.
An example profile is given below, with the waypoints:
- X = -4, Y = -1, Angle = -45 degrees
- X = -2, Y = -2, Angle = 0
- X = 0, Y = 0, Angle = 0
The Graph on top is the X/Y position, and the Graph on the bottom is the Velocity.
Pathfinder supports Modifiers. Modifiers are a way to manipulate a trajectory with a given rule.
Pathfinder supports Tank and Swerve Drive modifiers.
We've got some Wiki Entries for you. After you've read this README, go to the wiki to learn more about how to integrate Pathfinder into your FRC application!
To build the project, run the following command:
./gradlew build
./gradlew assemble
To build the C code only:
./gradlew :Pathfinder-Core:build
To build the Java code:
./gradlew :Pathfinder-Java:build
./gradlew :Pathfinder-Java:assemble
This will build for both the x64 and x86 architecture for your platform. To cross compile for ARM, do the following:
./gradlew build -Parm -PcompilerPrefix=arm-linux-gnueabi-
./gradlew assemble
If your OS or Architecture doesn't fall under the prebuilt binaries that are available with the library, you can install pathfinder's native binaries onto your local system manually. This will allow you to include the library in any project you want
64-Bit
./gradlew install
32-Bit
./gradlew install -P32
If you want to change the prefix location (by default it is /usr/local
), you can pass the prefix
property:
./gradlew install -Pprefix=<your prefix location>
To see the usage for each language variation of the API, see the README in their folder.
Language | Folder |
---|---|
C | Pathfinder-Core |
Java | Pathfinder-Java |
LabVIEW | Pathfinder-LabVIEW |