Add getter for initial pose in Trajectory (#2180)

This commit is contained in:
Prateek Machiraju
2019-12-21 09:57:39 -05:00
committed by Peter Johnson
parent 71a22861eb
commit 635882a9f7
2 changed files with 16 additions and 0 deletions

View File

@@ -60,6 +60,15 @@ public class Trajectory {
return startValue.plus((endValue.minus(startValue)).times(t));
}
/**
* Returns the initial pose of the trajectory.
*
* @return The initial pose of the trajectory.
*/
public Pose2d getInitialPose() {
return sample(0).poseMeters;
}
/**
* Returns the overall duration of the trajectory.
*