TrajectoryUtil
- class wpimath.trajectory.TrajectoryUtil
Bases:
pybind11_object
- static deserializeTrajectory(jsonStr: str) wpimath._controls._controls.trajectory.Trajectory
Serializes a Trajectory to PathWeaver-style JSON.
- Parameters:
jsonStr – the string containing the serialized JSON
- Returns:
the trajectory represented by the JSON
- static fromPathweaverJson(path: str) wpimath._controls._controls.trajectory.Trajectory
Imports a Trajectory from a JSON file exported from PathWeaver.
- Parameters:
path – The path of the json file to import from.
- Returns:
The trajectory represented by the file.
- static serializeTrajectory(trajectory: wpimath._controls._controls.trajectory.Trajectory) str
Deserializes a Trajectory from JSON exported from PathWeaver.
- Parameters:
trajectory – the trajectory to export
- Returns:
the string containing the serialized JSON
- static toPathweaverJson(trajectory: wpimath._controls._controls.trajectory.Trajectory, path: str) None
Exports a Trajectory to a PathWeaver-style JSON file.
- Parameters:
trajectory – the trajectory to export
path – the path of the file to export to