Inverted Pendulum on a cart. More...
#include <dynamic-graph/tutorial/inverted-pendulum.hh>
Public Member Functions | |
InvertedPendulum (const std::string &inName) | |
Constructor by name. More... | |
~InvertedPendulum () | |
virtual const std::string & | getClassName (void) const |
Each entity should provide the name of the class it belongs to. More... | |
virtual std::string | getDocString () const |
Header documentation of the python class. More... | |
void | incr (double inTimeStep) |
Integrate equation of motion over time step given as input. More... | |
Parameters | |
void | setCartMass (const double &inMass) |
Set the mass of the cart. More... | |
double | getCartMass () const |
Get the mass of the cart. More... | |
void | setPendulumMass (const double &inMass) |
Set the mass of the cart. More... | |
double | getPendulumMass () const |
Get the mass of the pendulum. More... | |
void | setPendulumLength (const double &inLength) |
Set the length of the cart. More... | |
double | getPendulumLength () const |
Get the length of the pendulum. More... | |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Inverted Pendulum on a cart.
This class represents the classical inverted pendulum on a cart. The equation of motion is:
where
A more natural form of the above equation for roboticists is
where
In order to make the system intrinsically stable, we add some viscosity by rewriting:
where is a positive coefficient.
dynamicgraph::tutorial::InvertedPendulum::InvertedPendulum | ( | const std::string & | inName | ) |
Constructor by name.
dynamicgraph::tutorial::InvertedPendulum::~InvertedPendulum | ( | ) |
|
inline |
Get the mass of the cart.
|
inlinevirtual |
Each entity should provide the name of the class it belongs to.
|
inlinevirtual |
Header documentation of the python class.
|
inline |
Get the length of the pendulum.
|
inline |
Get the mass of the pendulum.
void dynamicgraph::tutorial::InvertedPendulum::incr | ( | double | inTimeStep | ) |
Integrate equation of motion over time step given as input.
|
inline |
Set the mass of the cart.
|
inline |
Set the length of the cart.
|
inline |
Set the mass of the cart.
|
static |