mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add getter for initial pose in Trajectory (#2180)
This commit is contained in:
committed by
Peter Johnson
parent
71a22861eb
commit
635882a9f7
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user