Loading [MathJax]/extensions/tex2jax.js
ChoreoLib
Choreo support library.
All Classes Functions Variables Pages Concepts
choreo::Choreo Class Reference

#include <choreo/Choreo.h>

Classes

class  TrajectoryCache
 

Static Public Member Functions

template<TrajectorySample SampleType>
static std::optional< Trajectory< SampleType > > LoadTrajectory (std::string_view trajectoryName)
 
template<TrajectorySample SampleType>
static std::optional< Trajectory< SampleType > > LoadTrajectoryString (std::string_view trajectoryJsonString, std::string_view trajectoryName)
 

Detailed Description

A class that handles loading choreo and caching choreo trajectories.

Member Function Documentation

◆ LoadTrajectory()

template<TrajectorySample SampleType>
static std::optional< Trajectory< SampleType > > choreo::Choreo::LoadTrajectory ( std::string_view  trajectoryName)
inlinestatic

Load a trajectory from the deploy directory. Choreolib expects .traj files to be placed in src/main/deploy/choreo/[trajectoryName].traj.

Template Parameters
SampleTypeThe type of samples in the trajectory.
Parameters
trajectoryNameThe 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
SampleTypeThe type of samples in the trajectory.
Parameters
trajectoryJsonStringThe JSON string.
trajectoryNameThe 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: