[wpimath] Add methods to concatenate trajectories (#3139)

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
Prateek Machiraju
2021-02-16 21:06:36 -05:00
committed by GitHub
parent e42a0b6cf0
commit 9522f2e8c7
5 changed files with 163 additions and 0 deletions

View File

@@ -119,6 +119,16 @@ class Trajectory {
*/
Trajectory RelativeTo(const Pose2d& pose);
/**
* Concatenates another trajectory to the current trajectory. The user is
* responsible for making sure that the end pose of this trajectory and the
* start pose of the other trajectory match (if that is the desired behavior).
*
* @param other The trajectory to concatenate.
* @return The concatenated trajectory.
*/
Trajectory operator+(const Trajectory& other) const;
/**
* Returns the initial pose of the trajectory.
*