PatternGeneratorJRL::PreviewControl Class Reference

Class to implement the preview control. More...

#include <PreviewControl/PreviewControl.hh>

List of all members.

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.
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.
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)
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)
void ComputeOptimalWeights (unsigned int mode)
 Compute optimal weights.
void print ()
 Overloading of << operator.
virtual void CallMethod (std::string &Method, std::istringstream &astrm)
 Overloading method of SimplePlugin.
Methods to access the basic variables of the preview control.
double SamplingPeriod () const
 Getter for the sampling period.
double PreviewControlTime () const
double GetHeightOfCoM () const
void SetSamplingPeriod (double lSamplingPeriod)
 Setter for the sampling period.
void SetPreviewControlTime (double lPreviewControlTime)
void SetHeightOfCoM (double lZc)
bool IsCoherent ()
 Indicates if the weights are coherent with the parameters.

Detailed Description

Class to implement the preview control.


Constructor & Destructor Documentation

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

Constructor

References MAL_MATRIX_RESIZE.


Member Function Documentation

Getter for the height position of the CoM.

Indicates if the weights are coherent with the parameters.

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 
)
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)

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]out]x: Current state of the CoM along the axis.
[in]out]sxzmp: Summed error.
[in]ZMPPositions,:Vector of ZMP reference positions.
[in]lindex,:Starting index in the array of ZMP reference positions.
[out]zmpx2,:Resulting ZMP value.
[in]Simulation,:This should be set to false.

Overloading of << operator.

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

void PreviewControl::SetHeightOfCoM ( double  lZc)

Getter for the height position of the CoM.

References ComputeOptimalWeights().

Referenced by CallMethod().

void PreviewControl::SetPreviewControlTime ( double  lPreviewControlTime)

Setter for the preview control time.

References ComputeOptimalWeights().

Referenced by CallMethod().

void PreviewControl::SetSamplingPeriod ( double  lSamplingPeriod)

Setter for the sampling period.

References ComputeOptimalWeights().

Referenced by CallMethod().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines