utils::RetimedPolynomial< Polynomial, T > Struct Template Reference

Polynomial whose argument \(s \in [0, 1]\) is retimed to \(t \in [0, T]\) by \( s(t) = t / T \). More...

#include <lipm_walking/utils/polynomials.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW RetimedPolynomial ()
 Empty constructor. More...
 
 RetimedPolynomial (Polynomial< T > poly, double duration)
 Constructor. More...
 
double duration () const
 Get trajectory duration. More...
 
void reset (const T &initPos, const T &targetPos, double duration)
 Reset duration and boundary positions. More...
 
void reset (const T &initPos, const T &initVel, const T &targetPos, const T &targetVel, double duration)
 Reset duration and boundary positions and velocities. More...
 
void reset (const T &initPos, const T &initVel, const T &initAccel, const T &targetPos, const T &targetVel, const T &targetAccel, double duration)
 Reset duration and boundary positions, velocities and accelerations. More...
 
double s (double t) const
 Mapping from \(t \in [0, T]\) to \(s(t) \in [0, 1]\). More...
 
double sd (double t) const
 Mapping from \(t \in [0, T]\) to \(\dot{s}(t) = \frac{{\rm d}(s(t))}{{\rm d}t}\). More...
 
pos (double t) const
 Position along the retimed trajectory. More...
 
vel (double t) const
 Velocity along the retimed trajectory. More...
 
accel (double t) const
 Acceleration along the retimed trajectory. More...
 

Protected Attributes

double duration_
 
Polynomial< T > poly_
 

Detailed Description

template<template< class > class Polynomial, typename T>
struct utils::RetimedPolynomial< Polynomial, T >

Polynomial whose argument \(s \in [0, 1]\) is retimed to \(t \in [0, T]\) by \( s(t) = t / T \).

Definition at line 662 of file polynomials.h.

Constructor & Destructor Documentation

template<template< class > class Polynomial, typename T>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW utils::RetimedPolynomial< Polynomial, T >::RetimedPolynomial ( )
inline

Empty constructor.

Definition at line 669 of file polynomials.h.

template<template< class > class Polynomial, typename T>
utils::RetimedPolynomial< Polynomial, T >::RetimedPolynomial ( Polynomial< T >  poly,
double  duration 
)
inline

Constructor.

Parameters
polyPolynomial whose argument \(s \in [0, 1]\).
durationNew duration T of the retiming \(t \in [0, T]\).

Definition at line 678 of file polynomials.h.

Member Function Documentation

template<template< class > class Polynomial, typename T>
T utils::RetimedPolynomial< Polynomial, T >::accel ( double  t) const
inline

Acceleration along the retimed trajectory.

Parameters
tTime \(t \in [0, T]\).

Definition at line 795 of file polynomials.h.

template<template< class > class Polynomial, typename T>
double utils::RetimedPolynomial< Polynomial, T >::duration ( ) const
inline

Get trajectory duration.

Definition at line 683 of file polynomials.h.

template<template< class > class Polynomial, typename T>
T utils::RetimedPolynomial< Polynomial, T >::pos ( double  t) const
inline

Position along the retimed trajectory.

Parameters
tTime \(t \in [0, T]\).

Definition at line 775 of file polynomials.h.

template<template< class > class Polynomial, typename T>
void utils::RetimedPolynomial< Polynomial, T >::reset ( const T &  initPos,
const T &  targetPos,
double  duration 
)
inline

Reset duration and boundary positions.

Parameters
initPosInitial position.
targetPosTarget position.
durationNew duration T of the trajectory.

Definition at line 697 of file polynomials.h.

template<template< class > class Polynomial, typename T>
void utils::RetimedPolynomial< Polynomial, T >::reset ( const T &  initPos,
const T &  initVel,
const T &  targetPos,
const T &  targetVel,
double  duration 
)
inline

Reset duration and boundary positions and velocities.

Parameters
initPosInitial position.
initVelInitial velocity.
targetPosTarget position.
targetVelTarget velocity.
durationNew duration T of the trajectory.

Definition at line 716 of file polynomials.h.

template<template< class > class Polynomial, typename T>
void utils::RetimedPolynomial< Polynomial, T >::reset ( const T &  initPos,
const T &  initVel,
const T &  initAccel,
const T &  targetPos,
const T &  targetVel,
const T &  targetAccel,
double  duration 
)
inline

Reset duration and boundary positions, velocities and accelerations.

Parameters
initPosInitial position.
initVelInitial velocity.
initAccelInitial acceleration.
targetPosTarget position.
targetVelTarget velocity.
targetAccelTarget acceleration.
durationNew duration T of the trajectory.

Definition at line 739 of file polynomials.h.

template<template< class > class Polynomial, typename T>
double utils::RetimedPolynomial< Polynomial, T >::s ( double  t) const
inline

Mapping from \(t \in [0, T]\) to \(s(t) \in [0, 1]\).

Definition at line 756 of file polynomials.h.

template<template< class > class Polynomial, typename T>
double utils::RetimedPolynomial< Polynomial, T >::sd ( double  t) const
inline

Mapping from \(t \in [0, T]\) to \(\dot{s}(t) = \frac{{\rm d}(s(t))}{{\rm d}t}\).

Definition at line 765 of file polynomials.h.

template<template< class > class Polynomial, typename T>
T utils::RetimedPolynomial< Polynomial, T >::vel ( double  t) const
inline

Velocity along the retimed trajectory.

Parameters
tTime t \(\in [0, T]\).

Definition at line 785 of file polynomials.h.

Member Data Documentation

template<template< class > class Polynomial, typename T>
double utils::RetimedPolynomial< Polynomial, T >::duration_
protected

Definition at line 801 of file polynomials.h.

template<template< class > class Polynomial, typename T>
Polynomial<T> utils::RetimedPolynomial< Polynomial, T >::poly_
protected

Definition at line 802 of file polynomials.h.