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... | |
Public Member Functions inherited from dynamicgraph::Entity | |
Entity (const std::string &name) | |
virtual | ~Entity () |
const std::string & | getName () const |
bool | hasSignal (const std::string &signame) const |
SignalBase< int > & | getSignal (const std::string &signalName) |
const SignalBase< int > & | getSignal (const std::string &signalName) const |
std::ostream & | displaySignalList (std::ostream &os) const |
virtual std::ostream & | writeGraph (std::ostream &os) const |
virtual std::ostream & | writeCompletionList (std::ostream &os) const |
virtual void | display (std::ostream &os) const |
virtual void | commandLine (const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os) |
virtual SignalBase< int > * | test () |
virtual void | test2 (SignalBase< int > *) |
const std::string & | getCommandList () const |
CommandMap_t | getNewStyleCommandMap () |
command::Command * | getNewStyleCommand (const std::string &cmdName) |
SignalMap | getSignalMap () const |
Static Protected Attributes | |
static const std::string | CLASS_NAME |
More... | |
Additional Inherited Members | |
Public Types inherited from dynamicgraph::Entity | |
typedef std::map< std::string, SignalBase< int > * > | SignalMap |
typedef std::map< const std::string, command::Command * > | CommandMap_t |
Protected Member Functions inherited from dynamicgraph::Entity | |
void | addCommand (const std::string &name, command::Command *command) |
void | entityRegistration () |
void | entityDeregistration () |
void | signalRegistration (const SignalArray< int > &signals) |
void | signalDeregistration (const std::string &name) |
Protected Attributes inherited from dynamicgraph::Entity | |
std::string | name |
SignalMap | signalMap |
CommandMap_t | commandMap |
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.
Implements dynamicgraph::Entity.
References CLASS_NAME.
|
inlinevirtual |
Header documentation of the python class.
Reimplemented from dynamicgraph::Entity.
References incr().
|
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.
Referenced by getDocString().
|
inline |
Set the mass of the cart.
|
inline |
Set the length of the cart.
|
inline |
Set the mass of the cart.
|
staticprotected |
Referenced by getClassName().