PatternGeneratorJRL::AnalyticalZMPCOGTrajectory Class Reference

#include <Mathematics/AnalyticalZMPCOGTrajectory.hh>

List of all members.

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 ComputeZMP (double t, double &r)
bool ComputeZMPSpeed (double t, double &r)
bool ComputeZMP (double t, double &r, int i)
double FluctuationMaximal ()
 Returns the maximal fluctuation for the first segment of this trajectory.
double GetAbsoluteTimeReference () const
 Absolute Time reference of this trajectory.
void SetAbsoluteTimeReference (double anAbsoluteTimeReference)
 Set Absolute time reference of this trajectory.
bool GetIntervalIndexFromTime (double t, unsigned int &j)
 Get the index of the interval according to the time.
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.
Setter and Getter@{
void SetNumberOfIntervals (unsigned int lNbOfIntervals)
 Set the number of Intervals for this trajectory.
void SetCoGHyperbolicCoefficients (std::vector< double > &lV, std::vector< double > &lW)
 Set the coefficients for the sinuse and cosinues function.
void SetStartingTimeIntervalsAndHeightVariation (std::vector< double > &lDeltaTj, std::vector< double > &lomegaj)
 Set the starting point and the height variation.
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.
void GetPolynomialDegrees (std::vector< unsigned int > &lPolynomialDegree) const
 Get the degree of each polynomials for the CoG.
void GetNumberOfIntervals (unsigned int &lNbOfIntervals) const
 Set the number of Intervals for this trajectory.
void GetHyperbolicCoefficients (std::vector< double > &lV, std::vector< double > &lW) const
 Get the coefficients for the sinuse and cosinues function.
void GetStartingPointAndHeightVariation (std::vector< double > &lTj, std::vector< double > &lomegaj)
 Get the starting point and the height variation.
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.
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.
void TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne (unsigned int IntervalIndex, double &lCOMZ, double &lZMPZ)
 Transfert the coefficients from the COG trajectory to the ZMP.
void Building3rdOrderPolynomial (unsigned int anIntervalj, double pjTjm1, double pjTj)

Protected Member Functions

void FreePolynomes ()

Protected Attributes

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

Friends

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

Detailed Description

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


Constructor & Destructor Documentation


Member Function Documentation

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.

Compute the current value according to time.

Parameters:
t,:the time,
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.
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:
t,:the time,
i,:the numero of the interval
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.

Compute the current CoM speed value according to time.

Parameters:
t,:the time,
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.
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:
t,:the time,
i,:the numero of the interval
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.

Compute the current value according to time.

Parameters:
t,:the time,
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.
bool PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::ComputeZMP ( double  t,
double &  r,
int  i 
)

Compute the current value according to time.

Parameters:
t,:the time,
i,:the numero of the interval
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.

Compute the current ZMP speed value according to time.

Parameters:
t,:the time,
r,:the result,
Returns:
Returns true if the function has been computed, false otherwise.

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

Intern method to free the polynomials

Absolute Time reference of this trajectory.

References m_AbsoluteTimeReference.

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

Referenced by PatternGeneratorJRL::operator<<().

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

Referenced by PatternGeneratorJRL::operator<<().

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

Get the coefficients for the sinuse and cosinues function.

Referenced by PatternGeneratorJRL::operator<<().

Get the index of the interval according to the time.

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.

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

Set the number of Intervals for this trajectory.

Referenced by PatternGeneratorJRL::operator<<().

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

Get the degree of each polynomials for the CoG.

Referenced by PatternGeneratorJRL::operator<<().

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

Get the starting point and the height variation.

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

Set Absolute time reference of this trajectory.

References m_AbsoluteTimeReference.

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

Set the coefficients for the sinuse and cosinues function.

Set the number of Intervals for this trajectory.

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.

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

Set the starting point and the height variation.

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:
lCOMZ,:Profile of the height CoM for each interval.
lZMPZ,:Profile of the height ZMP for each interval.
void PatternGeneratorJRL::AnalyticalZMPCOGTrajectory::TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne ( unsigned int  IntervalIndex,
double &  lCOMZ,
double &  lZMPZ 
)

Transfert the coefficients from the COG trajectory to the ZMP.

Parameters:
IntervalIndex,:Number of the interval.
lCOMZ,:Value of the CoM height for this interval.
lZMPZ,:Value of the ZMP height for this interval.

References PatternGeneratorJRL::Polynome::GetCoefficients().


Friends And Related Function Documentation

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

Member Data Documentation

List of temporal starting point.

List of polynomials for the COG

List of polynomials for the ZMP

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

List of polynomial degrees for the CoM

List of reference time for the interval.

List of coefficients for the hyperbolics cosine function

List of coefficients for the hyperbolics sine function

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines