PatternGeneratorJRL::AnalyticalZMPCOGTrajectory Class Reference

#include <Mathematics/AnalyticalZMPCOGTrajectory.hh>

Public Member Functions

 AnalyticalZMPCOGTrajectory (int lNbOfIntervals=0)
 
 ~AnalyticalZMPCOGTrajectory ()
 
bool ComputeCOM (double t, double &r)
 
bool ComputeCOMSpeed (double t, double &r)
 
bool ComputeCOM (double t, double &r, int i)
 
bool ComputeCOMSpeed (double t, double &r, int i)
 
bool ComputeCOMAcceleration (double t, double &r, int j)
 
bool ComputeZMP (double t, double &r)
 
bool ComputeZMPSpeed (double t, double &r)
 
bool ComputeZMP (double t, double &r, int i)
 

Setter and Getter@{

int m_NbOfIntervals
 
std::vector< double > m_V
 
std::vector< double > m_W
 
std::vector< double > m_DeltaTj
 
std::vector< double > m_omegaj
 
std::vector< double > m_RefTime
 
std::vector< unsigned int > m_PolynomialDegree
 
std::vector< Polynome * > m_ListOfCOGPolynomials
 
std::vector< Polynome * > m_ListOfZMPPolynomials
 
double m_AbsoluteTimeReference
 
double m_Sensitivity
 
void SetNumberOfIntervals (unsigned int lNbOfIntervals)
 Set the number of Intervals for this trajectory. More...
 
void SetCoGHyperbolicCoefficients (std::vector< double > &lV, std::vector< double > &lW)
 Set the coefficients for the sinuse and cosinues function. More...
 
void SetStartingTimeIntervalsAndHeightVariation (std::vector< double > &lDeltaTj, std::vector< double > &lomegaj)
 Set the starting point and the height variation. More...
 
void SetPolynomialDegrees (std::vector< unsigned int > &lPolynomialDegree)
 Set the degree of each polynomials for the CoG Remark: the size of the vector of degrees should match the number of intervals. More...
 
void GetPolynomialDegrees (std::vector< unsigned int > &lPolynomialDegree) const
 Get the degree of each polynomials for the CoG. More...
 
void GetNumberOfIntervals (unsigned int &lNbOfIntervals) const
 Set the number of Intervals for this trajectory. More...
 
void GetHyperbolicCoefficients (std::vector< double > &lV, std::vector< double > &lW) const
 Get the coefficients for the sinuse and cosinues function. More...
 
void GetStartingPointAndHeightVariation (std::vector< double > &lTj, std::vector< double > &lomegaj)
 Get the starting point and the height variation. More...
 
bool GetFromListOfCOGPolynomials (unsigned int j, Polynome *&aPoly) const
 Get the polynomial at interval j for the CoG Remark: The call to this function assume that the method SetPolynomialDegree has been call beforehand. More...
 
bool GetFromListOfZMPPolynomials (unsigned int j, Polynome *&aPoly) const
 
void TransfertCoefficientsFromCOGTrajectoryToZMPOne (std::vector< double > &lCOMZ, std::vector< double > &lZMPZ)
 Transfert the coefficients from the COG trajectory to the ZMP for all intervals. More...
 
void TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne (unsigned int IntervalIndex, double &lCOMZ, double &lZMPZ)
 Transfert the coefficients from the COG trajectory to the ZMP. More...
 
void Building3rdOrderPolynomial (unsigned int anIntervalj, double pjTjm1, double pjTj)
 
double FluctuationMaximal ()
 Returns the maximal fluctuation for the first segment of this trajectory. More...
 
double GetAbsoluteTimeReference () const
 Absolute Time reference of this trajectory. More...
 
void SetAbsoluteTimeReference (double anAbsoluteTimeReference)
 Set Absolute time reference of this trajectory. More...
 
bool GetIntervalIndexFromTime (double t, unsigned int &j)
 Get the index of the interval according to the time. More...
 
bool GetIntervalIndexFromTime (double t, unsigned int &j, unsigned int &prev_j)
 Get the index of the interval according to the time, and the previous value of the interval. More...
 
std::ostream & operator<< (std::ostream &os, const AnalyticalZMPCOGTrajectory &obj)
 
void FreePolynomes ()
 

Detailed Description

AnalyticalZMPCOGTrajectory represents the ZMP and the COG trajectories based on the following formula:

Constructor & Destructor Documentation

◆ AnalyticalZMPCOGTrajectory()

PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::AnalyticalZMPCOGTrajectory ( int  lNbOfIntervals = 0)

Constructor

◆ ~AnalyticalZMPCOGTrajectory()

PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::~AnalyticalZMPCOGTrajectory ( )

Destructor

Member Function Documentation

◆ Building3rdOrderPolynomial()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::Building3rdOrderPolynomial ( unsigned int  anIntervalj,
double  pjTjm1,
double  pjTj 
)

Build the coefficients of a third order COG polynomial according to the OmegaC and the value of the ZMP at the beginning and the end of the interval, and assuming that the speed is set to zero.

◆ ComputeCOM() [1/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeCOM ( double  t,
double &  r 
)

Compute the current value according to time.

Parameters
tthe time,
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeCOM() [2/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeCOM ( double  t,
double &  r,
int  i 
)

Compute the current value according to time and the index of the interval. To be efficient this method does not have any boundary check.

Parameters
tthe time,
ithe numero of the interval
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeCOMAcceleration()

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeCOMAcceleration ( double  t,
double &  r,
int  j 
)

Compute the current acceleration according to time and the index of the interval. To be efficient this method does not have any boundary check.

Parameters
tthe time,
ithe numero of the interval
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeCOMSpeed() [1/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeCOMSpeed ( double  t,
double &  r 
)

Compute the current CoM speed value according to time.

Parameters
tthe time,
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeCOMSpeed() [2/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeCOMSpeed ( double  t,
double &  r,
int  i 
)

Compute the current speed according to time and the index of the interval. To be efficient this method does not have any boundary check.

Parameters
tthe time,
ithe numero of the interval
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeZMP() [1/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeZMP ( double  t,
double &  r 
)

Compute the current value according to time.

Parameters
tthe time,
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeZMP() [2/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeZMP ( double  t,
double &  r,
int  i 
)

Compute the current value according to time.

Parameters
tthe time,
ithe numero of the interval
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ ComputeZMPSpeed()

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeZMPSpeed ( double  t,
double &  r 
)

Compute the current ZMP speed value according to time.

Parameters
tthe time,
rthe result,
Returns
Returns true if the function has been computed, false otherwise.

◆ FluctuationMaximal()

double PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::FluctuationMaximal ( )

Returns the maximal fluctuation for the first segment of this trajectory.

◆ FreePolynomes()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::FreePolynomes ( )
protected

Intern method to free the polynomials

◆ GetAbsoluteTimeReference()

double PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetAbsoluteTimeReference ( ) const
inline

Absolute Time reference of this trajectory.

◆ GetFromListOfCOGPolynomials()

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetFromListOfCOGPolynomials ( unsigned int  j,
Polynome *&  aPoly 
) const

Get the polynomial at interval j for the CoG Remark: The call to this function assume that the method SetPolynomialDegree has been call beforehand.

◆ GetFromListOfZMPPolynomials()

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetFromListOfZMPPolynomials ( unsigned int  j,
Polynome *&  aPoly 
) const

Get the polynomial at interval j for the ZMP Remark: The call to this function assume that the method SetPolynomialDegree has been call beforehand.

◆ GetHyperbolicCoefficients()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetHyperbolicCoefficients ( std::vector< double > &  lV,
std::vector< double > &  lW 
) const

Get the coefficients for the sinuse and cosinues function.

◆ GetIntervalIndexFromTime() [1/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetIntervalIndexFromTime ( double  t,
unsigned int &  j 
)

Get the index of the interval according to the time.

◆ GetIntervalIndexFromTime() [2/2]

bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetIntervalIndexFromTime ( double  t,
unsigned int &  j,
unsigned int &  prev_j 
)

Get the index of the interval according to the time, and the previous value of the interval.

◆ GetNumberOfIntervals()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetNumberOfIntervals ( unsigned int &  lNbOfIntervals) const

Set the number of Intervals for this trajectory.

◆ GetPolynomialDegrees()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetPolynomialDegrees ( std::vector< unsigned int > &  lPolynomialDegree) const

Get the degree of each polynomials for the CoG.

◆ GetStartingPointAndHeightVariation()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::GetStartingPointAndHeightVariation ( std::vector< double > &  lTj,
std::vector< double > &  lomegaj 
)

Get the starting point and the height variation.

◆ SetAbsoluteTimeReference()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::SetAbsoluteTimeReference ( double  anAbsoluteTimeReference)
inline

Set Absolute time reference of this trajectory.

◆ SetCoGHyperbolicCoefficients()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::SetCoGHyperbolicCoefficients ( std::vector< double > &  lV,
std::vector< double > &  lW 
)

Set the coefficients for the sinuse and cosinues function.

◆ SetNumberOfIntervals()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::SetNumberOfIntervals ( unsigned int  lNbOfIntervals)

Set the number of Intervals for this trajectory.

◆ SetPolynomialDegrees()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::SetPolynomialDegrees ( std::vector< unsigned int > &  lPolynomialDegree)

Set the degree of each polynomials for the CoG Remark: the size of the vector of degrees should match the number of intervals.

◆ SetStartingTimeIntervalsAndHeightVariation()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::SetStartingTimeIntervalsAndHeightVariation ( std::vector< double > &  lDeltaTj,
std::vector< double > &  lomegaj 
)

Set the starting point and the height variation.

◆ TransfertCoefficientsFromCOGTrajectoryToZMPOne()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::TransfertCoefficientsFromCOGTrajectoryToZMPOne ( std::vector< double > &  lCOMZ,
std::vector< double > &  lZMPZ 
)

Transfert the coefficients from the COG trajectory to the ZMP for all intervals.

Parameters
lCOMZProfile of the height CoM for each interval.
lZMPZProfile of the height ZMP for each interval.

◆ TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne()

void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne ( unsigned int  IntervalIndex,
double &  lCOMZ,
double &  lZMPZ 
)

Transfert the coefficients from the COG trajectory to the ZMP.

Parameters
IntervalIndexNumber of the interval.
lCOMZValue of the CoM height for this interval.
lZMPZValue of the ZMP height for this interval.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const AnalyticalZMPCOGTrajectory obj 
)
friend

Member Data Documentation

◆ m_AbsoluteTimeReference

double PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_AbsoluteTimeReference
protected

Store the absolute time reference

◆ m_DeltaTj

std::vector<double> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_DeltaTj
protected

List of temporal starting point.

◆ m_ListOfCOGPolynomials

std::vector<Polynome *> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_ListOfCOGPolynomials
protected

List of polynomials for the COG

◆ m_ListOfZMPPolynomials

std::vector<Polynome *> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_ListOfZMPPolynomials
protected

List of polynomials for the ZMP

◆ m_NbOfIntervals

int PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_NbOfIntervals
protected

Number of intervals

◆ m_omegaj

std::vector<double> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_omegaj
protected

List of omega, i.e. height variation along the trajectory.

◆ m_PolynomialDegree

std::vector<unsigned int> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_PolynomialDegree
protected

List of polynomial degrees for the CoM

◆ m_RefTime

std::vector<double> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_RefTime
protected

List of reference time for the interval.

◆ m_Sensitivity

double PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_Sensitivity
protected

◆ m_V

std::vector<double> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_V
protected

List of coefficients for the hyperbolics cosine function

◆ m_W

std::vector<double> PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::m_W
protected

List of coefficients for the hyperbolics sine function


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