A "composite trajectory" is a series of trajectories joined end to end where the end time of one trajectory coincides with the starting time of the next.
See also PiecewisePolynomial::ConcatenateInTime(), which might be preferred if all of the segments are PiecewisePolynomial.
| T | The scalar type, which must be one of the default scalars. |
#include <drake/common/trajectories/composite_trajectory.h>
Public Member Functions | |
| CompositeTrajectory (std::vector< copyable_unique_ptr< Trajectory< T > > > segments) | |
| Constructs a composite trajectory from a list of Trajectories. | |
| ~CompositeTrajectory () final | |
| MatrixX< T > | value (const T &t) const |
| Evaluates the curve at the given time. | |
| const Trajectory< T > & | segment (int segment_index) const |
| Returns a reference to the segment_index trajectory. | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| CompositeTrajectory (const CompositeTrajectory &)=default | |
| CompositeTrajectory & | operator= (const CompositeTrajectory &)=default |
| CompositeTrajectory (CompositeTrajectory &&)=default | |
| CompositeTrajectory & | operator= (CompositeTrajectory &&)=default |
| Public Member Functions inherited from PiecewiseTrajectory< T > | |
| ~PiecewiseTrajectory () override | |
| int | get_number_of_segments () const |
| T | start_time (int segment_number) const |
| T | end_time (int segment_number) const |
| T | duration (int segment_number) const |
| boolean< T > | is_time_in_range (const T &t) const |
| Returns true iff t >= getStartTime() && t <= getEndTime(). | |
| int | get_segment_index (const T &t) const |
| const std::vector< T > & | get_segment_times () const |
| void | segment_number_range_check (int segment_number) const |
| Public Member Functions inherited from Trajectory< T > | |
| virtual | ~Trajectory () |
| std::unique_ptr< Trajectory< T > > | Clone () const |
| MatrixX< T > | value (const T &t) const |
Evaluates the trajectory at the given time t. | |
| MatrixX< T > | vector_values (const std::vector< T > &t) const |
If cols()==1, then evaluates the trajectory at each time t, and returns the results as a Matrix with the ith column corresponding to the ith time. | |
| MatrixX< T > | vector_values (const Eigen::Ref< const VectorX< T > > &t) const |
If cols()==1, then evaluates the trajectory at each time t, and returns the results as a Matrix with the ith column corresponding to the ith time. | |
| bool | has_derivative () const |
| Returns true iff the Trajectory provides and implementation for EvalDerivative() and MakeDerivative(). | |
| MatrixX< T > | EvalDerivative (const T &t, int derivative_order=1) const |
Evaluates the derivative of this at the given time t. | |
| std::unique_ptr< Trajectory< T > > | MakeDerivative (int derivative_order=1) const |
| Takes the derivative of this Trajectory. | |
| Eigen::Index | rows () const |
| Eigen::Index | cols () const |
| T | start_time () const |
| T | end_time () const |
Static Public Member Functions | |
| static CompositeTrajectory< T > | AlignAndConcatenate (const std::vector< copyable_unique_ptr< Trajectory< T > > > &segments) |
| Constructs a composite trajectory from a list of trajectories whose start and end times may not coincide, by translating their start and end times. | |
| Static Public Member Functions inherited from PiecewiseTrajectory< T > | |
| static std::vector< T > | RandomSegmentTimes (int num_segments, std::default_random_engine &generator) |
Additional Inherited Members | |
| Static Public Attributes inherited from PiecewiseTrajectory< T > | |
| static constexpr double | kEpsilonTime = std::numeric_limits<double>::epsilon() |
| Minimum delta quantity used for comparing time. | |
| Protected Member Functions inherited from PiecewiseTrajectory< T > | |
| PiecewiseTrajectory ()=default | |
| PiecewiseTrajectory (const std::vector< T > &breaks) | |
breaks increments must be greater or equal to kEpsilonTime. | |
| T | do_start_time () const override |
| T | do_end_time () const override |
| bool | SegmentTimesEqual (const PiecewiseTrajectory &b, double tol=kEpsilonTime) const |
| const std::vector< T > & | breaks () const |
| std::vector< T > & | get_mutable_breaks () |
| PiecewiseTrajectory (const PiecewiseTrajectory &)=default | |
| PiecewiseTrajectory & | operator= (const PiecewiseTrajectory &)=default |
| PiecewiseTrajectory (PiecewiseTrajectory &&)=default | |
| PiecewiseTrajectory & | operator= (PiecewiseTrajectory &&)=default |
| Protected Member Functions inherited from Trajectory< T > | |
| Trajectory ()=default | |
| Trajectory (const Trajectory &)=default | |
| Trajectory & | operator= (const Trajectory &)=default |
| Trajectory (Trajectory &&)=default | |
| Trajectory & | operator= (Trajectory &&)=default |
|
default |
|
default |
|
explicit |
Constructs a composite trajectory from a list of Trajectories.
|
final |
|
static |
|
default |
|
default |
| const Trajectory< T > & segment | ( | int | segment_index | ) | const |
Returns a reference to the segment_index trajectory.
| MatrixX< T > value | ( | const T & | t | ) | const |
Evaluates the curve at the given time.