PatternGeneratorJRL::PreviewControl Class Reference

Class to implement the preview control. More...

#include <PreviewControl/PreviewControl.hh>

Inheritance diagram for PatternGeneratorJRL::PreviewControl:
Collaboration diagram for PatternGeneratorJRL::PreviewControl:

Public Member Functions

 PreviewControl (SimplePluginManager *lSPM, unsigned int defaultMode=OptimalControllerSolver::MODE_WITH_INITIALPOS, bool computeWeightsAutomatically=false)
 
 ~PreviewControl ()
 
void ReadPrecomputedFile (string aFileName)
 Read the file of parameters aFileName and set the sampling period, the preview control time, Ks, Kx, and F. More...
 
int OneIterationOfPreview (MAL_MATRIX(&x, double), MAL_MATRIX(&y, double), double &sxzmp, double &syzmp, deque< PatternGeneratorJRL::ZMPPosition > &ZMPPositions, unsigned int lindex, double &zmpx2, double &zmpy2, bool Simulation)
 One iteration of the preview control. More...
 
int OneIterationOfPreview1D (MAL_MATRIX(&x, double), double &sxzmp, deque< double > &ZMPPositions, unsigned int lindex, double &zmpx2, bool Simulation)
 One iteration of the preview control along one axis (using queues) More...
 
int OneIterationOfPreview1D (MAL_MATRIX(&x, double), double &sxzmp, vector< double > &ZMPPositions, unsigned int lindex, double &zmpx2, bool Simulation)
 One iteration of the preview control along one axis (using vectors) More...
 
void ComputeOptimalWeights (unsigned int mode)
 Compute optimal weights. More...
 
void print ()
 Overloading of << operator. More...
 
virtual void CallMethod (std::string &Method, std::istringstream &astrm)
 Overloading method of SimplePlugin. More...
 
Methods to access the basic variables of the preview control.
double SamplingPeriod () const
 Getter for the sampling period. More...
 
double PreviewControlTime () const
 
double GetHeightOfCoM () const
 
void SetSamplingPeriod (double lSamplingPeriod)
 Setter for the sampling period. More...
 
void SetPreviewControlTime (double lPreviewControlTime)
 
void SetHeightOfCoM (double lZc)
 
bool IsCoherent ()
 Indicates if the weights are coherent with the parameters. More...
 

Detailed Description

Class to implement the preview control.

Constructor & Destructor Documentation

◆ PreviewControl()

PreviewControl::PreviewControl ( SimplePluginManager *  lSPM,
unsigned int  defaultMode = OptimalControllerSolver::MODE_WITH_INITIALPOS,
bool  computeWeightsAutomatically = false 
)

Constructor

References i, and MAL_MATRIX_RESIZE.

◆ ~PreviewControl()

PreviewControl::~PreviewControl ( )

Destructor

Member Function Documentation

◆ CallMethod()

void PreviewControl::CallMethod ( std::string &  Method,
std::istringstream &  astrm 
)
virtual

◆ ComputeOptimalWeights()

◆ GetHeightOfCoM()

double PreviewControl::GetHeightOfCoM ( ) const

Getter for the height position of the CoM.

◆ IsCoherent()

bool PreviewControl::IsCoherent ( )

Indicates if the weights are coherent with the parameters.

◆ OneIterationOfPreview()

int PreviewControl::OneIterationOfPreview ( MAL_MATRIX &,  double,
MAL_MATRIX &,  double,
double &  sxzmp,
double &  syzmp,
deque< PatternGeneratorJRL::ZMPPosition > &  ZMPPositions,
unsigned int  lindex,
double &  zmpx2,
double &  zmpy2,
bool  Simulation 
)

◆ OneIterationOfPreview1D() [1/2]

int PatternGeneratorJRL::PreviewControl::OneIterationOfPreview1D ( MAL_MATRIX &,  double,
double &  sxzmp,
deque< double > &  ZMPPositions,
unsigned int  lindex,
double &  zmpx2,
bool  Simulation 
)

One iteration of the preview control along one axis (using queues)

Referenced by OneIterationOfPreview().

◆ OneIterationOfPreview1D() [2/2]

int PatternGeneratorJRL::PreviewControl::OneIterationOfPreview1D ( MAL_MATRIX &,  double,
double &  sxzmp,
vector< double > &  ZMPPositions,
unsigned int  lindex,
double &  zmpx2,
bool  Simulation 
)

One iteration of the preview control along one axis (using vectors)

Parameters
[in]

◆ PreviewControlTime()

double PreviewControl::PreviewControlTime ( ) const

Getter for the preview control time.

Referenced by PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::SetPreviewControl().

◆ print()

void PreviewControl::print ( )

Overloading of << operator.

References i.

◆ ReadPrecomputedFile()

void PreviewControl::ReadPrecomputedFile ( string  aFileName)

Read the file of parameters aFileName and set the sampling period, the preview control time, Ks, Kx, and F.

References i, in, and MAL_MATRIX_RESIZE.

◆ SamplingPeriod()

double PreviewControl::SamplingPeriod ( ) const

◆ SetHeightOfCoM()

void PreviewControl::SetHeightOfCoM ( double  lZc)

Getter for the height position of the CoM.

References ComputeOptimalWeights().

Referenced by CallMethod().

◆ SetPreviewControlTime()

void PreviewControl::SetPreviewControlTime ( double  lPreviewControlTime)

Setter for the preview control time.

References ComputeOptimalWeights().

Referenced by CallMethod().

◆ SetSamplingPeriod()

void PreviewControl::SetSamplingPeriod ( double  lSamplingPeriod)

Setter for the sampling period.

References ComputeOptimalWeights().

Referenced by CallMethod().