Quadratic-program controllers for humanoids

Motivation

Although detailed formulations differ, most active research has converged to formulating the floating base inverse dynamics as a quadratic programming (QP) problem

Introduction

Problem definition

Atkeson: “All do QP to find acceleration and contact forces. Then compute torques using inverse dynamics.”

TODO Dynamics equation: free-floating and joint space configurations (show decoupled)

The problem we are trying to solve fits under the category of inverse dynamics. Wikipedia says: “Inverse rigid-body dynamics is a method for computing forces and/or moments of force (torques) based on the kinematics (motion) of a body and the body’s inertial properties (mass and moment of inertia)”. Forward dynamics is “given the current state and control input, calculate next state”: $FD(x_t,u_t)=x_{t+1}$. Inverse dynamics is roughly “given current state and desired next state, find control input to get us there”: $ID(x_t, x_{t+1})=u_t$.

For simple systems, this process can be done in closed-form. Even on humanoids, this was the dominant method before QP methods were introduced (Sentis and other Jacobian-based controllers). QPs are popular now because they provide more expressiveness, flexibility, robustness (constraints, cost functions, etc).

We have

We just encode all of these things into a quadratic program, and out pops the control

Main components

Costs and constraints - how they are formulated

Tasks

compute desired acceleration using PD control law

Dealing with contacts

No-slip conditions

We want to encode the reality that a robot link that is in contact with the ground will not slip with respect to it (note that “ground” could be replaced with any other static thing in the environment, e.g. stair rails, ladder).

We use the contact Jacobian $J_\text{contact}$, which maps the robot’s joint velocities to end effector velocities $\dot{p}_c=J_c\dot{q}$. We want everything to be formulated in terms of $\ddot{q}$ (or $\dot{v}$ in some papers, which is more correct because angular velocity is not equal to the time derivative of angle), so that all of the terms (in constraints and costs) can be linear in the decision variables. So we take the time derivative of $\dot{p}_c$, and using the product rule for derivatives we get $\ddot{p}_c=J_c\ddot{q}+\dot{J}_c\dot{q}$. Most of the derivations of no-slip condition constraints/costs are based on this (except MIT’s slack one, which is looser).

Friction cone constraints

All contacts that a humanoid encounters while walking are unilateral contacts. This means that, as opposed to bilateral contacts (e.g. gripping with hands), forces can only be transmitted in one direction.

To model the forces that can occur at the contact points, we use a friction cone. Linearized friction cone so that it fits in QP formulation. SOCP can handle full friction cone but it’s too slow. Friction cone model itself is an approximation of the real world anyways so it’s ok.

Note that contact between planar surfaces is approximated as point contacts at four corners.

Implementation details / variations

hard vs soft constraints

“high weight soft penalties is much more forgiving when given conflicting desired motions and numerically more stable”

hard vs soft prioritization

approaches typically ensure low priority objectives are within the null space of higher priority ones.

other

Papers

TODO include comments on each one

Multi-robot controller

Other references

Random

Continuity

We make the implicit assumption in this formulation that accelerations and contact forces can change instantaneously. This has proven to be an approximation that is good enough for this purpose, but it’s definitely not true in real life. At the lowest level, contact forces are caused by repulsion forces between atoms, which is a continuous quantity. This means that all derivatives of position can’t be discontinuous. However, the window in which contact forces “ramp up” is so small that we perceive/approximate contact to be a discrete event. Since accelerations depend on forces by Newton’s law (and torques by some electrical law), accelerations can’t change instantaneously either. Note: most physics simulators use some kind of “soft” contact simulation