centroidal_control_collection
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CCC::LinearMpcZmp1d Class Reference

QP-based linear MPC for one-dimensional CoM-ZMP model. More...

#include <LinearMpcZmp.h>

Classes

struct  RefData
 Reference data. More...
 

Public Types

using InitialParam = Eigen::Vector3d
 Initial parameter. More...
 

Public Member Functions

 LinearMpcZmp1d (double com_height, double horizon_duration, double horizon_dt, QpSolverCollection::QpSolverType qp_solver_type=QpSolverCollection::QpSolverType::Any)
 Constructor. More...
 
double planOnce (const std::function< RefData(double)> &ref_data_func, const InitialParam &initial_param, double current_time, double control_dt=-1)
 Plan one step. More...
 

Protected Member Functions

double procOnce (const std::vector< RefData > &ref_data_seq, const InitialParam &initial_param, double current_time, double control_dt)
 Process one step. More...
 

Protected Attributes

double horizon_dt_ = 0
 Discretization timestep in horizon [sec]. More...
 
int horizon_steps_ = -1
 Number of steps in horizon. More...
 
std::shared_ptr< ComZmpModelJerkInputmodel_
 State-space model. More...
 
std::shared_ptr< InvariantSequentialExtension< 3, 1, 1 > > seq_ext_
 Sequential extension of state-space model. More...
 
std::shared_ptr< QpSolverCollection::QpSolver > qp_solver_
 QP solver. More...
 
QpSolverCollection::QpCoeff qp_coeff_
 QP coefficients. More...
 

Friends

class LinearMpcZmp
 

Detailed Description

QP-based linear MPC for one-dimensional CoM-ZMP model.

See the following for a detailed formulation.

Definition at line 20 of file LinearMpcZmp.h.

Member Typedef Documentation

◆ InitialParam

using CCC::LinearMpcZmp1d::InitialParam = Eigen::Vector3d

Initial parameter.

First element is CoM position, second element is CoM velocity, and third element is CoM acceleration.

Definition at line 36 of file LinearMpcZmp.h.

Constructor & Destructor Documentation

◆ LinearMpcZmp1d()

CCC::LinearMpcZmp1d::LinearMpcZmp1d ( double  com_height,
double  horizon_duration,
double  horizon_dt,
QpSolverCollection::QpSolverType  qp_solver_type = QpSolverCollection::QpSolverType::Any 
)

Constructor.

Parameters
com_heightheight of robot CoM [m]
horizon_durationhorizon duration [sec]
horizon_dtdiscretization timestep in horizon [sec]
qp_solver_typeQP solver type

Member Function Documentation

◆ planOnce()

double CCC::LinearMpcZmp1d::planOnce ( const std::function< RefData(double)> &  ref_data_func,
const InitialParam initial_param,
double  current_time,
double  control_dt = -1 
)

Plan one step.

Parameters
ref_data_funcfunction of reference data
initial_paraminitial parameter (CoM position, velocity, and acceleration)
current_timecurrent time (i.e., start time of horizon) [sec]
control_dtcontrol timestep used to calculate ZMP (if omitted, horizon_dt is used)
Returns
planned ZMP

◆ procOnce()

double CCC::LinearMpcZmp1d::procOnce ( const std::vector< RefData > &  ref_data_seq,
const InitialParam initial_param,
double  current_time,
double  control_dt 
)
protected

Process one step.

Friends And Related Function Documentation

◆ LinearMpcZmp

friend class LinearMpcZmp
friend

Definition at line 22 of file LinearMpcZmp.h.

Member Data Documentation

◆ horizon_dt_

double CCC::LinearMpcZmp1d::horizon_dt_ = 0
protected

Discretization timestep in horizon [sec].

Definition at line 71 of file LinearMpcZmp.h.

◆ horizon_steps_

int CCC::LinearMpcZmp1d::horizon_steps_ = -1
protected

Number of steps in horizon.

Definition at line 74 of file LinearMpcZmp.h.

◆ model_

std::shared_ptr<ComZmpModelJerkInput> CCC::LinearMpcZmp1d::model_
protected

State-space model.

Definition at line 77 of file LinearMpcZmp.h.

◆ qp_coeff_

QpSolverCollection::QpCoeff CCC::LinearMpcZmp1d::qp_coeff_
protected

QP coefficients.

Definition at line 86 of file LinearMpcZmp.h.

◆ qp_solver_

std::shared_ptr<QpSolverCollection::QpSolver> CCC::LinearMpcZmp1d::qp_solver_
protected

QP solver.

Definition at line 83 of file LinearMpcZmp.h.

◆ seq_ext_

std::shared_ptr<InvariantSequentialExtension<3, 1, 1> > CCC::LinearMpcZmp1d::seq_ext_
protected

Sequential extension of state-space model.

Definition at line 80 of file LinearMpcZmp.h.


The documentation for this class was generated from the following file: