WPILibC++  2020.3.2-60-g3011ebe
frc::TrajectoryUtil Class Reference

Static Public Member Functions

static void ToPathweaverJson (const Trajectory &trajectory, const wpi::Twine &path)
 Exports a Trajectory to a PathWeaver-style JSON file. More...
 
static Trajectory FromPathweaverJson (const wpi::Twine &path)
 Imports a Trajectory from a PathWeaver-style JSON file. More...
 
static std::string SerializeTrajectory (const Trajectory &trajectory)
 Deserializes a Trajectory from PathWeaver-style JSON. More...
 
static Trajectory DeserializeTrajectory (wpi::StringRef json_str)
 Serializes a Trajectory to PathWeaver-style JSON. More...
 

Member Function Documentation

◆ DeserializeTrajectory()

static Trajectory frc::TrajectoryUtil::DeserializeTrajectory ( wpi::StringRef  json_str)
static

Serializes a Trajectory to PathWeaver-style JSON.

Parameters
trajectorythe trajectory to export
Returns
the string containing the serialized JSON

◆ FromPathweaverJson()

static Trajectory frc::TrajectoryUtil::FromPathweaverJson ( const wpi::Twine path)
static

Imports a Trajectory from a PathWeaver-style JSON file.

Parameters
pathThe path of the json file to import from.
Returns
The trajectory represented by the file.

◆ SerializeTrajectory()

static std::string frc::TrajectoryUtil::SerializeTrajectory ( const Trajectory trajectory)
static

Deserializes a Trajectory from PathWeaver-style JSON.

Parameters
jsonthe string containing the serialized JSON
Returns
the trajectory represented by the JSON

◆ ToPathweaverJson()

static void frc::TrajectoryUtil::ToPathweaverJson ( const Trajectory trajectory,
const wpi::Twine path 
)
static

Exports a Trajectory to a PathWeaver-style JSON file.

Parameters
trajectorythe trajectory to export
paththe path of the file to export to
Returns
The interpolated state.

The documentation for this class was generated from the following file: