Class to implement the preview control. More...
#include <PreviewControl/PreviewControl.hh>
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... | |
Class to implement the preview control.
| PreviewControl::PreviewControl | ( | SimplePluginManager * | lSPM, |
| unsigned int | defaultMode = OptimalControllerSolver::MODE_WITH_INITIALPOS, |
||
| bool | computeWeightsAutomatically = false |
||
| ) |
Constructor
References i.
| PreviewControl::~PreviewControl | ( | ) |
Destructor
|
virtual |
Overloading method of SimplePlugin.
References ComputeOptimalWeights(), PatternGeneratorJRL::OptimalControllerSolver::MODE_WITH_INITIALPOS, PatternGeneratorJRL::OptimalControllerSolver::MODE_WITHOUT_INITIALPOS, SetHeightOfCoM(), SetPreviewControlTime(), and SetSamplingPeriod().
Referenced by print().
| void PreviewControl::ComputeOptimalWeights | ( | unsigned int | mode | ) |
Compute optimal weights.
| [in] | mode | with initial pos (OptimalControllerSolver::MODE_WITH_INITIALPOS), without initial position (OptimalControllerSolver:: MODE_WITHOUT_INITIALPOS). |
Solver to compute optimal weights
References PatternGeneratorJRL::OptimalControllerSolver::ComputeWeights(), PatternGeneratorJRL::OptimalControllerSolver::GetF(), PatternGeneratorJRL::OptimalControllerSolver::GetK(), i, j, PatternGeneratorJRL::OptimalControllerSolver::MODE_WITH_INITIALPOS, PatternGeneratorJRL::OptimalControllerSolver::MODE_WITHOUT_INITIALPOS, and OneIterationOfPreview().
Referenced by CallMethod(), SetHeightOfCoM(), SetPreviewControlTime(), SetSamplingPeriod(), and PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::Setup().
| double PreviewControl::GetHeightOfCoM | ( | ) | const |
Getter for the height position of the CoM.
| bool PreviewControl::IsCoherent | ( | ) |
Indicates if the weights are coherent with the parameters.
| 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.
References i, OneIterationOfPreview1D(), and x.
Referenced by ComputeOptimalWeights(), PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::CreateExtraCOMBuffer(), PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::FirstStageOfControl(), and PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::SecondStageOfControl().
| 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)
Referenced by OneIterationOfPreview().
| int PreviewControl::OneIterationOfPreview1D | ( | Eigen::MatrixXd & | x, |
| double & | sxzmp, | ||
| vector< double > & | ZMPPositions, | ||
| unsigned long int | lindex, | ||
| double & | zmpx2, | ||
| bool | Simulation | ||
| ) |
| double PreviewControl::PreviewControlTime | ( | ) | const |
Getter for the preview control time.
Referenced by PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::SetPreviewControl().
| void PreviewControl::print | ( | ) |
Overloading of << operator.
References CallMethod(), and i.
Referenced by OneIterationOfPreview1D().
| void PreviewControl::ReadPrecomputedFile | ( | string | aFileName | ) |
| double PreviewControl::SamplingPeriod | ( | ) | const |
Getter for the sampling period.
Referenced by PatternGeneratorJRL::ZMPPreviewControlWithMultiBodyZMP::SetPreviewControl().
| 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 | ) |