A sparse MPC solver for walking motion generation.
|
The main walking module class. More...
#include <oru_walk.h>
Public Member Functions | |
oru_walk (ALPtr< ALBroker > broker, const string &name) | |
~oru_walk () | |
void | init () |
void | stopWalkingRemote () |
An interface function that is called remotely to stop the execution. More... | |
void | initPosition () |
void | setStiffness (const float &) |
Set stiffness of joints. More... | |
void | walk () |
Construct and initialize all necessary classes and register callback function. More... | |
Private Member Functions | |
void | initFastRead (const vector< string > &) |
Initializes variables, that are necessary for fast reading of data from memory. More... | |
void | initFastWrite (const vector< string > &) |
Initializes variables, that are necessary for fast sending of parameters to DCM. More... | |
void | initWalkCommands () |
Initialize commands, that will be sent to DCM. More... | |
void | initJointAngles (ALValue &) |
void | initWalkPattern (WMG &) |
Initialize selected walk pattern. More... | |
void | initWalkPattern_Straight (WMG &) |
Initializes walk pattern. More... | |
void | initWalkPattern_Diagonal (WMG &) |
Initializes walk pattern. More... | |
void | initWalkPattern_Circular (WMG &) |
Initializes walk pattern. More... | |
void | initSolver () |
Initialize solver. More... | |
void | readSensors (jointState &) |
Update joint angles. More... | |
bool | solveMPCProblem (WMG &, smpc_parameters &) |
Solve the MPC problem. More... | |
void | solveIKsendCommands (const smpc_parameters &, const smpc::state_com &, const int, WMG &) |
Solve inverse kinematics and send commands to the controllers. More... | |
void | correctNextSupportPosition (WMG &) |
The position of the next support foot may change from the targeted, this function moves it to the right place. More... | |
void | feedbackError (smpc::state_com &) |
Correct state and the model based on the sensor data. More... | |
void | halt (const char *, const char *) |
Log a message, remove stiffness and die. More... | |
void | stopWalking (const char *) |
Unregister callback and log a message. More... | |
void | walkControl () |
A control loop, that is executed in separate thread. More... | |
void | dcmCallback () |
Wake up walk control thread periodically. More... | |
Private Attributes | |
ProcessSignalConnection | dcm_callback_connection |
ALPtr< ALMemoryFastAccess > | access_sensor_values |
int * | last_dcm_time_ms_ptr |
ALValue | joint_commands |
nao_igm | nao |
double | ref_joint_angles [LOWER_JOINTS_NUM] |
walkParameters | wp |
smpc::solver * | solver |
int | dcm_loop_counter |
int | last_dcm_time_ms |
ALPtr< DCMProxy > | dcm_proxy |
ALPtr< ALMemoryProxy > | memory_proxy |
boost::condition_variable | walk_control_condition |
boost::mutex | walk_control_mutex |
The main walking module class.
Definition at line 73 of file oru_walk.h.
oru_walk::oru_walk | ( | ALPtr< ALBroker > | broker, |
const string & | name | ||
) |
Constructor for oru_walk object
broker | The parent broker |
name | The name of the module |
Definition at line 18 of file oru_walk.cpp.
oru_walk::~oru_walk | ( | ) |
Destructor for oru_walk object
Definition at line 48 of file oru_walk.cpp.
|
private |
The position of the next support foot may change from the targeted, this function moves it to the right place.
Definition at line 115 of file walking.cpp.
|
private |
Wake up walk control thread periodically.
Definition at line 95 of file walking.cpp.
|
private |
Correct state and the model based on the sensor data.
[in,out] | init_state | expected state |
Definition at line 338 of file walking.cpp.
|
private |
Log a message, remove stiffness and die.
[in] | message | a message |
[in] | function | name of the calling function. |
Definition at line 441 of file walking.cpp.
void oru_walk::init | ( | ) |
Definition at line 66 of file oru_walk.cpp.
|
private |
Initializes variables, that are necessary for fast reading of data from memory.
Definition at line 14 of file oru_walk_init.cpp.
|
private |
Initializes variables, that are necessary for fast sending of parameters to DCM.
Definition at line 40 of file oru_walk_init.cpp.
|
private |
Definition at line 128 of file oru_walk_init.cpp.
void oru_walk::initPosition | ( | ) |
Definition at line 203 of file oru_walk.cpp.
|
private |
Initialize solver.
Definition at line 126 of file walking.cpp.
|
private |
Initialize commands, that will be sent to DCM.
Definition at line 109 of file oru_walk_init.cpp.
|
private |
Initialize selected walk pattern.
Definition at line 16 of file walk_patterns.cpp.
|
private |
Initializes walk pattern.
Definition at line 133 of file walk_patterns.cpp.
|
private |
Initializes walk pattern.
Definition at line 89 of file walk_patterns.cpp.
|
private |
Initializes walk pattern.
Definition at line 48 of file walk_patterns.cpp.
|
private |
Update joint angles.
Definition at line 72 of file walking.cpp.
void oru_walk::setStiffness | ( | const float & | stiffnessValue | ) |
Set stiffness of joints.
[in] | stiffnessValue | value of stiffness [0;1] |
Definition at line 151 of file oru_walk.cpp.
|
private |
Solve inverse kinematics and send commands to the controllers.
[in] | mpc | MPC parameters |
[in] | CoM | CoM position |
[in] | control_loop_num | number of control loops in future (>= 1). |
[in,out] | wmg | WMG |
Definition at line 278 of file walking.cpp.
|
private |
Solve the MPC problem.
[in,out] | wmg | WMG |
[in,out] | mpc | MPC parameters |
Definition at line 388 of file walking.cpp.
|
private |
Unregister callback and log a message.
[in] | message | a message |
Definition at line 426 of file walking.cpp.
void oru_walk::stopWalkingRemote | ( | ) |
An interface function that is called remotely to stop the execution.
Definition at line 454 of file walking.cpp.
void oru_walk::walk | ( | ) |
Construct and initialize all necessary classes and register callback function.
Definition at line 17 of file walking.cpp.
|
private |
A control loop, that is executed in separate thread.
Definition at line 173 of file walking.cpp.
|
private |
Definition at line 127 of file oru_walk.h.
|
private |
Definition at line 124 of file oru_walk.h.
|
private |
Definition at line 140 of file oru_walk.h.
|
private |
Definition at line 143 of file oru_walk.h.
|
private |
Definition at line 131 of file oru_walk.h.
|
private |
Definition at line 141 of file oru_walk.h.
|
private |
Definition at line 128 of file oru_walk.h.
|
private |
Definition at line 144 of file oru_walk.h.
|
private |
Definition at line 134 of file oru_walk.h.
|
private |
Definition at line 135 of file oru_walk.h.
|
private |
Definition at line 138 of file oru_walk.h.
|
private |
Definition at line 146 of file oru_walk.h.
|
private |
Definition at line 147 of file oru_walk.h.
|
private |
Definition at line 137 of file oru_walk.h.