centroidal_control_collection
|
Linear MPC of translational z-component motion. More...
#include <LinearMpcZ.h>
Classes | |
class | ModelContactPhase |
State-space model for contact phase. More... | |
class | ModelNoncontactPhase |
State-space model for non-contact phase. More... | |
struct | WeightParam |
Weight parameter. More... | |
Public Types | |
using | _StateSpaceModel = StateSpaceModel< state_dim_, Eigen::Dynamic, Eigen::Dynamic > |
Type of state-space model. More... | |
using | StateDimVector = _StateSpaceModel::StateDimVector |
Type of state vector. More... | |
using | InitialParam = Eigen::Vector2d |
Initial parameter. More... | |
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | LinearMpcZ (double mass, double horizon_dt, int horizon_steps, const WeightParam &weight_param=WeightParam(), QpSolverCollection::QpSolverType qp_solver_type=QpSolverCollection::QpSolverType::Any) |
Constructor. More... | |
double | planOnce (const std::function< bool(double)> &contact_func, const std::function< double(double)> &ref_pos_func, const InitialParam &initial_param, double current_time) |
Plan one step. More... | |
Public Attributes | |
double | mass_ = 0 |
Robot mass [kg]. More... | |
double | horizon_dt_ = 0 |
Discretization timestep in horizon [sec]. More... | |
int | horizon_steps_ = 0 |
Number of steps in horizon. More... | |
WeightParam | weight_param_ |
Objective weight parameter. More... | |
std::shared_ptr< _StateSpaceModel > | model_contact_ |
State-space model for contact phase. More... | |
std::shared_ptr< _StateSpaceModel > | model_noncontact_ |
State-space model for non-contact phase. More... | |
std::shared_ptr< QpSolverCollection::QpSolver > | qp_solver_ |
QP solver. More... | |
QpSolverCollection::QpCoeff | qp_coeff_ |
QP coefficients. More... | |
std::pair< double, double > | force_range_ |
Min/max z-component force [N]. More... | |
Static Public Attributes | |
static constexpr int | state_dim_ = 2 |
State dimension. More... | |
Protected Member Functions | |
double | procOnce (const std::vector< std::shared_ptr< _StateSpaceModel >> &model_list, const StateDimVector ¤t_x, const Eigen::VectorXd &ref_pos_seq) |
Process one step. More... | |
Linear MPC of translational z-component motion.
Definition at line 14 of file LinearMpcZ.h.
using CCC::LinearMpcZ::_StateSpaceModel = StateSpaceModel<state_dim_, Eigen::Dynamic, Eigen::Dynamic> |
Type of state-space model.
Definition at line 21 of file LinearMpcZ.h.
using CCC::LinearMpcZ::InitialParam = Eigen::Vector2d |
Initial parameter.
First element is CoM position, and second element is CoM velocity.
Definition at line 31 of file LinearMpcZ.h.
Type of state vector.
Definition at line 24 of file LinearMpcZ.h.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CCC::LinearMpcZ::LinearMpcZ | ( | double | mass, |
double | horizon_dt, | ||
int | horizon_steps, | ||
const WeightParam & | weight_param = WeightParam() , |
||
QpSolverCollection::QpSolverType | qp_solver_type = QpSolverCollection::QpSolverType::Any |
||
) |
Constructor.
mass | robot mass [kg] |
horizon_dt | discretization timestep in horizon [sec] |
horizon_steps | number of steps in horizon |
weight_param | objective weight parameter |
qp_solver_type | QP solver type |
double CCC::LinearMpcZ::planOnce | ( | const std::function< bool(double)> & | contact_func, |
const std::function< double(double)> & | ref_pos_func, | ||
const InitialParam & | initial_param, | ||
double | current_time | ||
) |
Plan one step.
contact_func | function of contact/non-contact phases (returns true for contact phase) |
ref_pos_func | function of reference position [m] |
initial_param | initial parameter |
current_time | current time (i.e., start time of horizon) [sec] |
|
protected |
Process one step.
std::pair<double, double> CCC::LinearMpcZ::force_range_ |
Min/max z-component force [N].
Definition at line 177 of file LinearMpcZ.h.
double CCC::LinearMpcZ::horizon_dt_ = 0 |
Discretization timestep in horizon [sec].
Definition at line 156 of file LinearMpcZ.h.
int CCC::LinearMpcZ::horizon_steps_ = 0 |
Number of steps in horizon.
Definition at line 159 of file LinearMpcZ.h.
double CCC::LinearMpcZ::mass_ = 0 |
Robot mass [kg].
Definition at line 153 of file LinearMpcZ.h.
std::shared_ptr<_StateSpaceModel> CCC::LinearMpcZ::model_contact_ |
State-space model for contact phase.
Definition at line 165 of file LinearMpcZ.h.
std::shared_ptr<_StateSpaceModel> CCC::LinearMpcZ::model_noncontact_ |
State-space model for non-contact phase.
Definition at line 168 of file LinearMpcZ.h.
QpSolverCollection::QpCoeff CCC::LinearMpcZ::qp_coeff_ |
QP coefficients.
Definition at line 174 of file LinearMpcZ.h.
std::shared_ptr<QpSolverCollection::QpSolver> CCC::LinearMpcZ::qp_solver_ |
QP solver.
Definition at line 171 of file LinearMpcZ.h.
|
staticconstexpr |
State dimension.
Definition at line 18 of file LinearMpcZ.h.
WeightParam CCC::LinearMpcZ::weight_param_ |
Objective weight parameter.
Definition at line 162 of file LinearMpcZ.h.