A StackedTrajectory stacks the values from one or more underlying Trajectory objects into a single Trajectory, without changing the start_time()
or end_time()
.
For sequencing trajectories in time instead, see CompositeTrajectory.
All of the underlying Trajectory objects must have the same start_time()
and end_time()
.
When constructed with rowwise
set to true, all of the underlying Trajectory objects must have the same number of cols()
and the value()
matrix will be the vstack of the the trajectories in the order they were added.
When constructed with rowwise
set to false, all of the underlying Trajectory objects must have the same number of rows()
and the value()
matrix will be the hstack of the the trajectories in the order they were added.
T | The scalar type, which must be one of the default scalars. |
#include <drake/common/trajectories/stacked_trajectory.h>
Public Member Functions | |
StackedTrajectory (bool rowwise=true) | |
Creates an empty trajectory. More... | |
~StackedTrajectory () final | |
void | Append (const Trajectory< T > &traj) |
Stacks another sub-Trajectory onto this. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
StackedTrajectory (const StackedTrajectory &)=default | |
StackedTrajectory & | operator= (const StackedTrajectory &)=default |
StackedTrajectory (StackedTrajectory &&)=default | |
StackedTrajectory & | operator= (StackedTrajectory &&)=default |
![]() | |
virtual | ~Trajectory () |
virtual std::unique_ptr< Trajectory< T > > | Clone () const |
virtual MatrixX< T > | value (const T &t) const |
Evaluates the trajectory at the given time t . More... | |
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. More... | |
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. More... | |
bool | has_derivative () const |
Returns true iff the Trajectory provides and implementation for EvalDerivative() and MakeDerivative(). More... | |
MatrixX< T > | EvalDerivative (const T &t, int derivative_order=1) const |
Evaluates the derivative of this at the given time t . More... | |
std::unique_ptr< Trajectory< T > > | MakeDerivative (int derivative_order=1) const |
Takes the derivative of this Trajectory. More... | |
virtual Eigen::Index | rows () const |
virtual Eigen::Index | cols () const |
virtual T | start_time () const |
virtual T | end_time () const |
Additional Inherited Members | |
![]() | |
Trajectory ()=default | |
Trajectory (const Trajectory &)=default | |
Trajectory & | operator= (const Trajectory &)=default |
Trajectory (Trajectory &&)=default | |
Trajectory & | operator= (Trajectory &&)=default |
|
default |
|
default |
|
explicit |
Creates an empty trajectory.
rowwise | governs the stacking order |
|
final |
void Append | ( | const Trajectory< T > & | traj | ) |
Stacks another sub-Trajectory onto this.
Refer to the class overview documentation for details.
std::exception | if the matrix dimension is incompatible. |
|
default |
|
default |