11 #include <dynamic-graph/factory.h> 26 "FeedbackController(" + inName +
")::input(vector)::state"),
28 "FeedbackController(" + inName +
")::output(double)::force"),
42 boost::function2<double&, double&, const int&> ftest =
47 std::string docstring;
51 " Set gain of controller\n" 52 " takes a tuple of 4 floating point numbers as input\n" 55 new ::dynamicgraph::command::Setter<FeedbackController, Matrix>(
61 " Get gain of controller\n" 62 " return a tuple of 4 floating point numbers\n" 65 new ::dynamicgraph::command::Getter<FeedbackController, Matrix>(
75 if (state.size() != 4)
77 "state signal size is ",
78 "%d, should be 4.", state.size());
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(MyEntity, "MyEntity")
SignalTimeDependent< double, int > forceSOUT
Force computed by the control law.
void signalRegistration(const SignalArray< int > &signals)
virtual void setConstant(const T &t)
::dynamicgraph::Matrix getGain() const
Get feedback gain.
Feedback controller for an inverted pendulum.
void setGain(const ::dynamicgraph::Matrix &inGain)
Get feedback gain.
virtual void setConstant(const T &t)
::dynamicgraph::Matrix gain_
Gain of the controller.
double & computeForceFeedback(double &force, const int &inTime)
FeedbackController(const std::string &inName)
Constructor by name.
void addCommand(const std::string &name, command::Command *command)
SignalPtr< ::dynamicgraph::Vector, int > stateSIN
State of the inverted pendulum.
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)