feedback-controller.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010 CNRS
3  *
4  * Florent Lamiraux
5  */
6 
7 #ifndef DG_TUTORIAL_FEEDBACK_CONTROLLER_HH
8 #define DG_TUTORIAL_FEEDBACK_CONTROLLER_HH
9 
10 #include <dynamic-graph/entity.h>
14 
15 namespace dynamicgraph {
16 namespace tutorial {
23 class FeedbackController : public Entity {
24  public:
28  FeedbackController(const std::string& inName);
29 
31 
33  virtual const std::string& getClassName(void) const { return CLASS_NAME; }
34 
36  virtual std::string getDocString() const {
37  return "Feedback controller aimed at maintaining the pendulum vertical\n";
38  }
46  void setGain(const ::dynamicgraph::Matrix& inGain) { gain_ = inGain; }
47 
51  ::dynamicgraph::Matrix getGain() const { return gain_; }
52 
57  public:
58  /*
59  \brief Class name
60  */
61  static const std::string CLASS_NAME;
62 
63  private:
67  double& computeForceFeedback(double& force, const int& inTime);
68 
77 
80 };
81 } // namespace tutorial
82 } // namespace dynamicgraph
83 
84 #endif // DG_TUTORIAL_FEEDBACK_CONTROLLER_HH
SignalTimeDependent< double, int > forceSOUT
Force computed by the control law.
virtual std::string getDocString() const
Header documentation of the python class.
::dynamicgraph::Matrix getGain() const
Get feedback gain.
Feedback controller for an inverted pendulum.
void setGain(const ::dynamicgraph::Matrix &inGain)
Get feedback gain.
virtual const std::string & getClassName(void) const
Each entity should provide the name of the class it belongs to.
::dynamicgraph::Matrix gain_
Gain of the controller.
double & computeForceFeedback(double &force, const int &inTime)
FeedbackController(const std::string &inName)
Constructor by name.
Eigen::MatrixXd Matrix
SignalPtr< ::dynamicgraph::Vector, int > stateSIN
State of the inverted pendulum.


dynamic-graph-tutorial
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:37:04