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

@@ -105,6 +105,13 @@ class Trajectory {
*/
State Sample(units::second_t t) const;
/**
* Returns the initial pose of the trajectory.
*
* @return The initial pose of the trajectory.
*/
Pose2d InitialPose() const { return Sample(0_s).pose; }
private:
std::vector<State> m_states;
units::second_t m_totalTime;