Manipulating Trajectories
Getting the Total Duration of the Trajectory
// Get the total time of the trajectory in seconds
double duration = trajectory.getTotalTimeSeconds();Sampling the Trajectory
// Sample the trajectory at 1.2 seconds. This represents where the robot
// should be after 1.2 seconds of traversal.
Trajectory.State point = trajectory.sample(1.2);