#include <choreo/Choreo.h>
A class that handles loading choreo and caching choreo trajectories.
◆ LoadTrajectory()
template<TrajectorySample SampleType>
Load a trajectory from the deploy directory. Choreolib expects .traj files to be placed in src/main/deploy/choreo/[trajectoryName].traj.
- Template Parameters
-
SampleType | The type of samples in the trajectory. |
- Parameters
-
trajectoryName | The path name in Choreo, which matches the file name in the deploy directory, file extension is optional. |
- Returns
- The loaded trajectory, or
empty std::optional
if the trajectory could not be loaded.
◆ LoadTrajectoryString()
template<TrajectorySample SampleType>
static std::optional< Trajectory< SampleType > > choreo::Choreo::LoadTrajectoryString |
( |
std::string_view |
trajectoryJsonString, |
|
|
std::string_view |
trajectoryName |
|
) |
| |
|
inlinestatic |
Load a trajectory from a string.
- Template Parameters
-
SampleType | The type of samples in the trajectory. |
- Parameters
-
trajectoryJsonString | The JSON string. |
trajectoryName | The path name in Choreo, which matches the file name in the deploy directory, file extension is optional. |
- Returns
- The loaded trajectory, or
empty std::optional
if the trajectory could not be loaded.
The documentation for this class was generated from the following file: