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 (Eigen::MatrixXd &x, Eigen::MatrixXd &y, double &sxzmp, double &syzmp, deque< PatternGeneratorJRL::ZMPPosition > &ZMPPositions, unsigned long int lindex, double &zmpx2, double &zmpy2, bool Simulation)
 One iteration of the preview control. More...
 
int OneIterationOfPreview1D (Eigen::MatrixXd &x, double &sxzmp, deque< double > &ZMPPositions, unsigned long int lindex, double &zmpx2, bool Simulation)
 One iteration of the preview control along one axis (using queues) More...
 
int OneIterationOfPreview1D (Eigen::MatrixXd &x, double &sxzmp, vector< double > &ZMPPositions, unsigned long 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

◆ ~PreviewControl()

PreviewControl::~PreviewControl ( )

Destructor

Member Function Documentation

◆ CallMethod()

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

Overloading method of SimplePlugin.

◆ ComputeOptimalWeights()

void PreviewControl::ComputeOptimalWeights ( unsigned int  mode)

Compute optimal weights.

Parameters
[in]modewith initial pos (OptimalControllerSolver::MODE_WITH_INITIALPOS), without initial position (OptimalControllerSolver:: MODE_WITHOUT_INITIALPOS).

Solver to compute optimal weights

◆ 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 ( Eigen::MatrixXd &  x,
Eigen::MatrixXd &  y,
double &  sxzmp,
double &  syzmp,
deque< PatternGeneratorJRL::ZMPPosition > &  ZMPPositions,
unsigned long int  lindex,
double &  zmpx2,
double &  zmpy2,
bool  Simulation 
)

One iteration of the preview control.

◆ OneIterationOfPreview1D() [1/2]

int PreviewControl::OneIterationOfPreview1D ( Eigen::MatrixXd &  x,
double &  sxzmp,
deque< double > &  ZMPPositions,
unsigned long int  lindex,
double &  zmpx2,
bool  Simulation 
)

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

◆ OneIterationOfPreview1D() [2/2]

int PreviewControl::OneIterationOfPreview1D ( Eigen::MatrixXd &  x,
double &  sxzmp,
vector< double > &  ZMPPositions,
unsigned long 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.

◆ print()

void PreviewControl::print ( )

Overloading of << operator.

◆ 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.

◆ SamplingPeriod()

double PreviewControl::SamplingPeriod ( ) const

Getter for the sampling period.

◆ SetHeightOfCoM()

void PreviewControl::SetHeightOfCoM ( double  lZc)

Getter for the height position of the CoM.

◆ SetPreviewControlTime()

void PreviewControl::SetPreviewControlTime ( double  lPreviewControlTime)

\biref Setter for the preview control time.

◆ SetSamplingPeriod()

void PreviewControl::SetSamplingPeriod ( double  lSamplingPeriod)

Setter for the sampling period.


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