humoto
|
#include <model.h>
Public Member Functions | |
Model () | |
Default constructor. More... | |
Model (const humoto::pepper_mpc::RobotParameters &robot_parameters) | |
Construct and initialize robot parameters. More... | |
EIGENTOOLS_CONSTANT_SIZE_VECTOR (12) getMPCState() const | |
Get MPC state. More... | |
etools::Matrix3 | getAd3 (const double T) const |
Create intermediate Ad3 matrix. More... | |
etools::Matrix3 | getAs3 (const double T) const |
Create intermediate As3 matrix. More... | |
double | getBaseHeight () const |
Get base height. More... | |
double | getBaseMass () const |
Get base mass. More... | |
double | getBaseOrientation () const |
Get base orientation. More... | |
humoto::rigidbody::RigidBodyState | getBaseState () const |
Returns current base state. More... | |
etools::Vector3 | getBd3 (const double T) const |
Create intermediate Bd3 matrix. More... | |
double | getBodyHeight () const |
Get body height. More... | |
double | getBodyMass () const |
Get body mass. More... | |
humoto::rigidbody::PointMassState | getBodyState () const |
Returns current body state. More... | |
etools::Vector3 | getBs3 (const double T) const |
Create intermediate Bs3 matrix. More... | |
etools::Vector2 | getCoP () const |
Get CoP position. More... | |
etools::Vector2 | getCoP (const humoto::pepper_mpc::ModelState &model_state) const |
Get CoP position. More... | |
etools::Matrix1x3 | getDjs3 (const double T) const |
Create intermediate Dc6 matrix of final model. More... | |
etools::Matrix1x3 | getDpd3 (const double body_height, const double base_mass, const double body_mass) const |
Create Dpd3 matrix. More... | |
etools::Matrix1x3 | getDps3 (const double base_height, const double base_mass, const double body_mass) const |
Create Dps3 matrix. More... | |
double | getEjs3 (const double T) const |
Create intermediate Esc6 matrix of final model. More... | |
etools::Vector6 | getMPCBaseState () const |
Get base state. More... | |
etools::Vector6 | getMPCBaseState (const humoto::pepper_mpc::ModelState &model_state) const |
Get base state. More... | |
etools::Vector6 | getMPCBodyState () const |
Get body state. More... | |
etools::Vector6 | getMPCBodyState (const humoto::pepper_mpc::ModelState &model_state) const |
Get body state. More... | |
void | getNextState (humoto::pepper_mpc::ModelState &model_state, const double T, const double Ts, const etools::Vector2 &base_control, const etools::Vector2 &body_control, const double base_height, const double body_height, const double theta) const |
Get next state from the current state. More... | |
void | getNextState (humoto::pepper_mpc::ModelState &model_state, const double T, const double Ts, const EIGENTOOLS_CONSTANT_SIZE_VECTOR(12) &preceding_mpcstate, const etools::Vector2 &base_control, const etools::Vector2 &body_control, const double base_height, const double body_height, const double theta) const |
Get next state from the given state. More... | |
double | getTheta () const |
Get theta angle of the current state. More... | |
double | getTheta (const humoto::pepper_mpc::ModelState &model_state) const |
Get theta angle of the given state. More... | |
void | log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="model") const |
Log. More... | |
void | noop () const |
void | setParameters (const humoto::pepper_mpc::RobotParameters &robot_parameters) |
Initialize robot parameters. More... | |
void | updateState (const humoto::ModelState &model_state) |
Update model state. More... | |
Public Attributes | |
etools::Vector2 | current_base_position_ |
2d position of the base More... | |
const std::size_t | Ns_ |
const std::size_t | Nu_ |
humoto::pepper_mpc::RobotParameters | robot_parameters_ |
robot parameters More... | |
humoto::pepper_mpc::ModelState | state_ |
state of the model More... | |
Static Protected Member Functions | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAAcc (const double T) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAJerk (const double T) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAPos (const double T) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAsAcc (const double T, const double Ts) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAsPos (const double T, const double Ts) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAsVel (const double T, const double Ts) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getAVel (const double T) |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBAcc (const double T) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBJerk (const double T) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBPos (const double T) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBsAcc (const double T, const double Ts) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBsPos (const double T, const double Ts) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBsVel (const double T, const double Ts) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getBVel (const double T) |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getDAcc (const double T) |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getDPos (const double T) |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getDVel (const double T) |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getEAcc (const double T) |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getEPos (const double T) |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
template<std::size_t t_number_of_integrators> | |
static EIGENTOOLS_CONSTANT_SIZE_MATRIX | getEVel (const double T) |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position]. More... | |
Private Member Functions | |
void | finalize () |
Determines position of the base. More... | |
|
inline |
|
inlineexplicit |
|
inline |
|
inlineprivate |
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 67 of file triple_integrator.h.
|
inlineinherited |
Create intermediate Ad3 matrix.
[in] | T | timestep |
Definition at line 66 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 53 of file triple_integrator.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 93 of file triple_integrator.h.
|
inlineinherited |
Create intermediate As3 matrix.
[in] | T | timestep |
Definition at line 54 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 118 of file triple_integrator.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 146 of file triple_integrator.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 132 of file triple_integrator.h.
|
inlinestaticinherited |
Create A matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 80 of file triple_integrator.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 188 of file triple_integrator.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Create intermediate Bd3 matrix.
[in] | T | timestep |
Definition at line 90 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 174 of file triple_integrator.h.
|
inline |
|
inline |
|
inline |
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 214 of file triple_integrator.h.
|
inlineinherited |
Create intermediate Bs3 matrix.
[in] | T | timestep |
Definition at line 78 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 238 of file triple_integrator.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 266 of file triple_integrator.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
[in] | Ts | subsampling time |
Definition at line 252 of file triple_integrator.h.
|
inlinestaticinherited |
Create B matrix of the model, suffix of the function name indicates the type of control [jerk, acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 201 of file triple_integrator.h.
|
inline |
|
inline |
|
inlinestaticinherited |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 294 of file triple_integrator.h.
|
inlineinherited |
Create intermediate Dc6 matrix of final model.
[in] | T | timestep |
Definition at line 142 of file two_point_mass_model.h.
|
inlineinherited |
Create Dpd3 matrix.
[in] | body_height | CoM of body height |
[in] | base_mass | base mass |
[in] | body_mass | body mass |
Definition at line 123 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 316 of file triple_integrator.h.
|
inlineinherited |
Create Dps3 matrix.
[in] | base_height | CoM of base height |
[in] | base_mass | base mass |
[in] | body_mass | body mass |
Definition at line 104 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create D matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 305 of file triple_integrator.h.
|
inlinestaticinherited |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 340 of file triple_integrator.h.
Create intermediate Esc6 matrix of final model.
[in] | T | timestep |
Definition at line 155 of file two_point_mass_model.h.
|
inlinestaticinherited |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 362 of file triple_integrator.h.
|
inlinestaticinherited |
Create E matrix of the model, suffix of the function name indicates the type of control [acc = acceleration, vel = velocity, pos = position].
t_number_of_integrators | number of integrators in the system |
[in] | T | sampling time |
Definition at line 351 of file triple_integrator.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get next state from the current state.
[out] | model_state | next model state |
[in] | T | timestep |
[in] | Ts | subsampling timestep (use Ts = T if not needed) |
[in] | base_control | control vector |
[in] | body_control | control vector |
[in] | base_height | base height |
[in] | body_height | body height |
[in] | theta | orientation of the base |
|
inline |
Get next state from the given state.
[out] | model_state | next model state |
[in] | T | timestep |
[in] | Ts | subsampling timestep (use Ts = T if not needed) |
[in] | preceding_mpcstate | mpc state |
[in] | base_control | control vector |
[in] | body_control | control vector |
[in] | base_height | base height |
[in] | body_height | body height |
[in] | theta | orientation of the base |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
etools::Vector2 humoto::pepper_mpc::Model::current_base_position_ |
|
inherited |
Definition at line 33 of file two_point_mass_model.h.
|
inherited |
Definition at line 35 of file two_point_mass_model.h.
humoto::pepper_mpc::RobotParameters humoto::pepper_mpc::Model::robot_parameters_ |
humoto::pepper_mpc::ModelState humoto::pepper_mpc::Model::state_ |