dart
|
StateMachine for Atlas robot. More...
#include <StateMachine.hpp>
Public Member Functions | |
StateMachine (const std::string &_name) | |
Constructor. | |
virtual | ~StateMachine () |
Destructor. | |
void | setName (const std::string &_name) |
Set name. | |
const std::string & | getName () const |
Get name. | |
void | addState (State *_state) |
Add state. | |
void | setInitialState (State *_state) |
Set initial state. | |
void | begin (double _currentTime) |
Initiate state. More... | |
void | computeControlForce (double _dt) |
Compute control force and apply it to Atlas robot. | |
void | end (double _currentTime) |
Finalize state. More... | |
State * | getCurrentState () |
Get current state. | |
void | transiteToNextState (double _currentTime) |
Transite to the next state manually. | |
void | transiteTo (State *_state, double _currentTime) |
Change state to _state. | |
void | transiteTo (std::string &_stateName, double _currentTime) |
Change state to a state whose names is _stateName. | |
void | transiteTo (std::size_t _idx, double _currentTime) |
Change state to a state whose index is _idx. | |
void | setVerbosity (bool verbosity) |
Set the verbosity. | |
StateMachine (const std::string &_name) | |
Constructor. | |
virtual | ~StateMachine () |
Destructor. | |
void | setName (const std::string &_name) |
Set name. | |
const std::string & | getName () const |
Get name. | |
void | addState (State *_state) |
Add state. | |
void | setInitialState (State *_state) |
Set initial state. | |
void | begin (double _currentTime) |
Initiate state. More... | |
void | computeControlForce (double _dt) |
Compute control force and apply it to Atlas robot. | |
void | end (double _currentTime) |
Finalize state. More... | |
State * | getCurrentState () |
Get current state. | |
void | transiteToNextState (double _currentTime) |
Transite to the next state manually. | |
void | transiteTo (State *_state, double _currentTime) |
Change state to _state. | |
void | transiteTo (std::string &_stateName, double _currentTime) |
Change state to a state whose names is _stateName. | |
void | transiteTo (std::size_t _idx, double _currentTime) |
Change state to a state whose index is _idx. | |
Protected Attributes | |
std::string | mName |
Name. | |
std::vector< State * > | mStates |
States. | |
State * | mCurrentState |
Current state. | |
double | mBeginTime |
Started time. | |
double | mEndTime |
Stopped time. | |
int | mFrame |
Frame number. | |
double | mElapsedTime |
Elapsed time which is stopped time minus started time. | |
StateMachine for Atlas robot.
void StateMachine::begin | ( | double | _currentTime | ) |
Initiate state.
This is called when the contoller change the current state machine to this.
void StateMachine::begin | ( | double | _currentTime | ) |
Initiate state.
This is called when the contoller change the current state machine to this.
void StateMachine::end | ( | double | _currentTime | ) |
Finalize state.
This is called when the state machine stransite from this state to the next state.
void StateMachine::end | ( | double | _currentTime | ) |
Finalize state.
This is called when the state machine stransite from this state to the next state.