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

Detailed Description

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

A trajectory defined by a path and timing trajectory.

Using a path of form r(s) and a time_scaling of the form s(t), a full trajectory of form q(t) = r(s(t)) is modeled.

Template Parameters
TThe scalar type, which must be one of the default scalars.

#include <drake/common/trajectories/path_parameterized_trajectory.h>

Public Member Functions

 PathParameterizedTrajectory (const Trajectory< T > &path, const Trajectory< T > &time_scaling)
 Constructs a trajectory with the given path and time_scaling. More...
 
 ~PathParameterizedTrajectory () final=default
 
std::unique_ptr< trajectories::Trajectory< T > > Clone () const override
 
MatrixX< T > value (const T &t) const override
 Evaluates the PathParameterizedTrajectory at the given time t. More...
 
Eigen::Index rows () const override
 
Eigen::Index cols () const override
 
start_time () const override
 
end_time () const override
 
const trajectories::Trajectory< T > & path () const
 Returns the path of this trajectory. More...
 
const trajectories::Trajectory< T > & time_scaling () const
 Returns the time_scaling of this trajectory. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 PathParameterizedTrajectory (const PathParameterizedTrajectory &)=default
 
PathParameterizedTrajectoryoperator= (const PathParameterizedTrajectory &)=default
 
 PathParameterizedTrajectory (PathParameterizedTrajectory &&)=default
 
PathParameterizedTrajectoryoperator= (PathParameterizedTrajectory &&)=default
 
- Public Member Functions inherited from Trajectory< T >
virtual ~Trajectory ()=default
 
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...
 

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

◆ PathParameterizedTrajectory() [1/3]

◆ PathParameterizedTrajectory() [2/3]

◆ PathParameterizedTrajectory() [3/3]

PathParameterizedTrajectory ( const Trajectory< T > &  path,
const Trajectory< T > &  time_scaling 
)

Constructs a trajectory with the given path and time_scaling.

Precondition
time_scaling.rows() == time_scaling.cols() == 1

◆ ~PathParameterizedTrajectory()

~PathParameterizedTrajectory ( )
finaldefault

Member Function Documentation

◆ Clone()

std::unique_ptr<trajectories::Trajectory<T> > Clone ( ) const
overridevirtual
Returns
A deep copy of this Trajectory.

Implements Trajectory< T >.

◆ cols()

Eigen::Index cols ( ) const
overridevirtual
Returns
The number of columns in the matrix returned by value().

Implements Trajectory< T >.

◆ end_time()

T end_time ( ) const
overridevirtual

Implements Trajectory< T >.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ path()

const trajectories::Trajectory<T>& path ( ) const

Returns the path of this trajectory.

◆ rows()

Eigen::Index rows ( ) const
overridevirtual
Returns
The number of rows in the matrix returned by value().

Implements Trajectory< T >.

◆ start_time()

T start_time ( ) const
overridevirtual

Implements Trajectory< T >.

◆ time_scaling()

const trajectories::Trajectory<T>& time_scaling ( ) const

Returns the time_scaling of this trajectory.

◆ value()

MatrixX<T> value ( const T &  t) const
overridevirtual

Evaluates the PathParameterizedTrajectory at the given time t.

Parameters
tThe time at which to evaluate the PathParameterizedTrajectory.
Returns
The matrix of evaluated values.
Precondition
If T == symbolic::Expression, t.is_constant() must be true.
Warning
If t does not lie in the range [start_time(), end_time()], the trajectory will silently be evaluated at the closest valid value of time to t. For example, value(-1) will return value(0) for a trajectory defined over [0, 1].

Implements Trajectory< T >.


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