ChoreoLib
Choreo support library.
|
#include <choreo/Choreo.h>
Static Public Member Functions | |
static std::optional< Trajectory< SampleType > > | LoadTrajectory (std::string_view trajectoryName) |
static std::optional< Trajectory< SampleType > > | LoadTrajectory (std::string_view trajectoryName, int splitIndex) |
static void | Clear () |
A utility for caching loaded trajectories. This allows for loading trajectories only once, and then reusing them.
|
inlinestatic |
Clears the trajectory cache.
|
inlinestatic |
Load a trajectory from the deploy directory. Choreolib expects .traj files to be placed in src/main/deploy/choreo/[trajectoryName].traj.
This method will cache the loaded trajectory and reused it if it is requested again.
trajectoryName | the path name in Choreo, which matches the file name in the deploy directory, file extension is optional. |
empty std::optional
if the trajectory could not be loaded.
|
inlinestatic |
Load a section of a split trajectory from the deploy directory. Choreolib expects .traj files to be placed in src/main/deploy/choreo/[trajectoryName].traj.
This method will cache the loaded trajectory and reused it if it is requested again. The trajectory that is split off of will also be cached.
trajectoryName | the path name in Choreo, which matches the file name in the deploy directory, file extension is optional. |
splitIndex | the index of the split trajectory to load |
empty std::optional
if the trajectory could not be loaded.