Go to the documentation of this file.
9 #ifndef DG_TUTORIAL_INVERTED_PENDULUM_HH
10 #define DG_TUTORIAL_INVERTED_PENDULUM_HH
12 #include <dynamic-graph/entity.h>
13 #include <dynamic-graph/linear-algebra.h>
14 #include <dynamic-graph/signal-ptr.h>
86 return "Classical inverted pendulum dynamic model\n";
90 void incr(
double inTimeStep);
99 void setCartMass(
const double& inMass) { cartMass_ = inMass; }
140 SignalPtr<double, int> forceSIN;
144 Signal< ::dynamicgraph::Vector, int> stateSOUT;
149 double pendulumMass_;
151 double pendulumLength_;
158 ::dynamicgraph::Vector computeDynamics(const ::dynamicgraph::Vector& inState,
159 const double& inControl,
Definition: feedback-controller.hh:15
double getCartMass() const
Get the mass of the cart.
Definition: inverted-pendulum.hh:104
virtual std::string getDocString() const
Header documentation of the python class.
Definition: inverted-pendulum.hh:85
void incr(double inTimeStep)
Integrate equation of motion over time step given as input.
double getPendulumLength() const
Get the length of the pendulum.
Definition: inverted-pendulum.hh:124
InvertedPendulum(const std::string &inName)
Constructor by name.
static const std::string CLASS_NAME
Definition: inverted-pendulum.hh:134
void setPendulumLength(const double &inLength)
Set the length of the cart.
Definition: inverted-pendulum.hh:119
void setCartMass(const double &inMass)
Set the mass of the cart.
Definition: inverted-pendulum.hh:99
double getPendulumMass() const
Get the mass of the pendulum.
Definition: inverted-pendulum.hh:114
void setPendulumMass(const double &inMass)
Set the mass of the cart.
Definition: inverted-pendulum.hh:109
Inverted Pendulum on a cart.
Definition: inverted-pendulum.hh:72
virtual const std::string & getClassName(void) const
Each entity should provide the name of the class it belongs to.
Definition: inverted-pendulum.hh:82