Drake
Drake C++ Documentation
StackedTrajectory< T > Class Template Referencefinal

Detailed Description

template<typename T>
class drake::trajectories::StackedTrajectory< T >

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.

Template Parameters
TThe 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
 
StackedTrajectoryoperator= (const StackedTrajectory &)=default
 
 StackedTrajectory (StackedTrajectory &&)=default
 
StackedTrajectoryoperator= (StackedTrajectory &&)=default
 
- Public Member Functions inherited from Trajectory< T >
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

- Protected Member Functions inherited from Trajectory< T >
 Trajectory ()=default
 
 Trajectory (const Trajectory &)=default
 
Trajectoryoperator= (const Trajectory &)=default
 
 Trajectory (Trajectory &&)=default
 
Trajectoryoperator= (Trajectory &&)=default
 

Constructor & Destructor Documentation

◆ StackedTrajectory() [1/3]

StackedTrajectory ( const StackedTrajectory< T > &  )
default

◆ StackedTrajectory() [2/3]

StackedTrajectory ( StackedTrajectory< T > &&  )
default

◆ StackedTrajectory() [3/3]

StackedTrajectory ( bool  rowwise = true)
explicit

Creates an empty trajectory.

Parameters
rowwisegoverns the stacking order

◆ ~StackedTrajectory()

~StackedTrajectory ( )
final

Member Function Documentation

◆ Append()

void Append ( const Trajectory< T > &  traj)

Stacks another sub-Trajectory onto this.

Refer to the class overview documentation for details.

Exceptions
std::exceptionif the matrix dimension is incompatible.

◆ operator=() [1/2]

StackedTrajectory& operator= ( const StackedTrajectory< T > &  )
default

◆ operator=() [2/2]

StackedTrajectory& operator= ( StackedTrajectory< T > &&  )
default

The documentation for this class was generated from the following file: