upkie  10.1.0
Open-source wheeled biped robots
MPCBalancer Class Reference

Model-predictive controller for sagittal balance control. More...

Public Member Functions

def __init__ (self, float fall_pitch=1.0, float leg_length=0.58, float max_ground_accel=10.0, float max_ground_velocity=3.0, int nb_timesteps=50, float sampling_period=0.02, float stage_input_cost_weight=1e-3, float stage_state_cost_weight=1e-3, float terminal_cost_weight=1.0, bool warm_start=True)
 Initialize balancer. More...
 
def reset (self)
 Reset the internal state of the controller.
 
float step (self, float target_ground_velocity, dict spine_observation, float dt, str qp_solver="proxqp")
 Compute a new ground velocity. More...
 

Public Attributes

 commanded_velocity
 Current commanded ground velocity in m/s.
 
 fall_pitch
 Pitch angle threshold for fall detection in radians.
 
 fallen
 Flag indicating whether the robot has fallen.
 
 max_ground_velocity
 Maximum ground velocity constraint in m/s.
 
 mpc_problem
 Model predictive control problem definition.
 
 mpc_qp
 Quadratic program formulation of the MPC problem.
 
 pendulum
 Wheeled inverted pendulum model.
 
 proxqp
 ProxQP solver workspace for the MPC optimization.
 
 warm_start
 Flag to enable warm-starting the QP solver.
 

Detailed Description

Model-predictive controller for sagittal balance control.


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