Drake
PiecewiseCubicTrajectory< T > Class Template Reference

A wrapper class that stores a PiecewisePolynomial and its first and second derivatives. More...

#include <manipulation/util/trajectory_utils.h>

## Public Member Functions

PiecewiseCubicTrajectory ()

PiecewiseCubicTrajectory (const PiecewisePolynomial< T > &position_traj)
Constructor. More...

MatrixX< T > get_position (double time) const
Returns the interpolated position at time. More...

MatrixX< T > get_velocity (double time) const
Returns the interpolated velocity at time or zero if time is out of the time bounds. More...

MatrixX< T > get_acceleration (double time) const
Returns the interpolated acceleration at time or zero if time is out of the time bounds. More...

double get_start_time () const
Returns the start time of this trajectory. More...

double get_end_time () const
Returns the end time of this trajectory. More...

bool is_approx (const PiecewiseCubicTrajectory< T > &other, const T &tol) const
Returns true if the position trajectory and its first and second derivatives are all within tol to other. More...

const PiecewisePolynomial< T > & get_position_trajectory () const
Returns the position trajectory. More...

const PiecewisePolynomial< T > & get_velocity_trajectory () const
Returns the velocity trajectory (first derivative). More...

const PiecewisePolynomial< T > & get_acceleration_trajectory () const
Returns the acceleration trajectory (second derivative). More...

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
PiecewiseCubicTrajectory (const PiecewiseCubicTrajectory &)=default

PiecewiseCubicTrajectoryoperator= (const PiecewiseCubicTrajectory &)=default

PiecewiseCubicTrajectory (PiecewiseCubicTrajectory &&)=default

PiecewiseCubicTrajectoryoperator= (PiecewiseCubicTrajectory &&)=default

## Detailed Description

### template<typename T> class drake::manipulation::PiecewiseCubicTrajectory< T >

A wrapper class that stores a PiecewisePolynomial and its first and second derivatives.

This class is supposed to represent position, velocity and acceleration. Thus, when the interpolating time is beyond the time bounds, the interpolated velocity and acceleration will be set to zero, and the interpolated position will peg at the terminal values. All dimensions are assumed to be independent of each other.

## Constructor & Destructor Documentation

 PiecewiseCubicTrajectory ( const PiecewiseCubicTrajectory< T > & )
default
 PiecewiseCubicTrajectory ( PiecewiseCubicTrajectory< T > && )
default
 PiecewiseCubicTrajectory ( )
inline
 PiecewiseCubicTrajectory ( const PiecewisePolynomial< T > & position_traj )
inlineexplicit

Constructor.

Parameters
 position_traj PiecewisePolynomial that represents the position trajectory. Its first and second derivatives are computed and stored.

## Member Function Documentation

 MatrixX get_acceleration ( double time ) const
inline

Returns the interpolated acceleration at time or zero if time is out of the time bounds.

Here is the caller graph for this function:

 const PiecewisePolynomial& get_acceleration_trajectory ( ) const
inline

Returns the acceleration trajectory (second derivative).

 double get_end_time ( ) const
inline

Returns the end time of this trajectory.

Here is the caller graph for this function:

 MatrixX get_position ( double time ) const
inline

Returns the interpolated position at time.

Here is the caller graph for this function:

 const PiecewisePolynomial& get_position_trajectory ( ) const
inline

Returns the position trajectory.

Here is the caller graph for this function:

 double get_start_time ( ) const
inline

Returns the start time of this trajectory.

Here is the caller graph for this function:

 MatrixX get_velocity ( double time ) const
inline

Returns the interpolated velocity at time or zero if time is out of the time bounds.

Here is the caller graph for this function:

 const PiecewisePolynomial& get_velocity_trajectory ( ) const
inline

Returns the velocity trajectory (first derivative).

 bool is_approx ( const PiecewiseCubicTrajectory< T > & other, const T & tol ) const
inline

Returns true if the position trajectory and its first and second derivatives are all within tol to other.

Here is the caller graph for this function:

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

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