Balancing and Pivoting
Balancing in the Plane:
Consider the block visualized in \cref{fig:balance}. Our goal is to balance
the block on the corner which means that it maintains: a) constant
angle with respect to the horizontal, and b) sticking contact at the corner
(which means zero relative velocity between the object and table). This problem
is static and inertial forces play no role. Our decision variable is the wrench
applied to the center of mass. We will discuss how this wrench can be supplied
via an external contact (e.g., exerted by a finger) in following subsections.
One approach to formalizing balancing the block in 2D is choosing a “minimal” wrench
value (in the 2-norm sense) by solving the following optimization program:
where and are both symmetric positive definite matrices
of appropriate size, , is the
gravitational acceleration (a linear acceleration applied to the center of mass with
no torsional contribution), and is the configuration dependent
Jacobian matrix. The Jacobian is a known and constant matrix given the object configuration.
We can formulate this into a standard QP form by defining:
and writing:
If gravity did not exist (i.e., we were trying to pivot in the plane orthogonal
to the gravitational vector), then by carefully inspecting the constraints to
this quadratic program, we note that the optimal solution must belong
to the null space of which comes from the force balance constraint.
Intuitively, this means we can scale the solution uniformly and it would still
satisfy the constraints. This is equivalent to saying if we increase the external
wrench applied to the object, the frictional force provided by the table will also
increase proportionally to cancel it out. However, we do note that this scaling
effect will increase the loss and so the optimal choice would be to let the object
rest against the support surface but to not apply any force. Since there are no
other forces (again we are in the plane orthogonal to gravity) then the object
would stay still and be “pivoting”.
The more interesting case is when gravity does exist – we can illustrate what
the solution space looks like by visualization the composite wrench cone due to
frictional contact and the gravity force in the object frame. \Cref{fig:sol-bal} shows
the composite wrench cone due to friction in orange. Any wrench on the “Cancel Gravity’’
plane will balance out the effect of gravity. This plane is characterized by the
gravity vector and its length. The intersection between this plane and the wrench
cone is the admissible set (satisfying the balance constraints). The smallest wrench
lies at the closest point to the origin at the intersection between the plane and the
cone. The composite wrench cone is open because defines an open cone
over the admissible contact reaction forces which allows for the arbitrary scaling up
of the reaction force to accommodate the scaling of the body wrench.
Worked Example
Let’s assume , the block is a square of side length , its
mass is , and the gravitational acceleration constant is 10 , the friction
coefficient , and use identity matrices for and . We will
first calculate the contact Jacobian :
where is defined in the local object
frame and the rotation matrix maps the reaction forces in the
contact frame into the object frame and is given by:
where . The gravity force vector is defined as:
with these, the constraints are defined as:
which can be passed to solvers such as Gurobi. If done correctly, Gurobi will return:
where Obj is the value of the objective function at the optimal point.
Balancing in 3D
When moving from 2D to 3D, we extend both the wrench and gravity vectors.
Specifically for the wrench, where
we add one linear and 2 torsional components.
Similarly, where the
last 3 entries (the moments) will be zero. With these changes, the static equilibrium
constraints are now written in 3D resulting in 6 equality constraints. The major change that
significantly complicates the transition from 2D to 3D is that the frictional force constraint.
The general friction cone in 3D is described by:
where are the projections of the tangential frictional force along
two orthogonal axes in the contact plane. Let and ,
then we can write the general friction cone as:
which is the standard Second Order Cone (SOC) form. Thus, in 3D, the friction
cone is a second order cone. A common technique to simplify the SOC constraint is
to approximate it using an inscribed polyhedral cone. This approximation has been used
extensively for modeling, planning, and controls. However, we will stay with the SOC form
due to the recent advances in solvers that work effectively and scale relatively well.
Using the SOC form, the problem is then a general SOCP (convex quadratic loss and convex
constraints composed of linear equalities, linear inequalities, and convex SOCs). Before
writing down the optimization, we write the friction cone constraint in an equivalent SOC
form that will be useful for optimization:
where , , , , and . Thus, we can write:
A Note on Feasibility
The problem of balancing a rigid object subject to external frictional contacts,
and an arbitrary wrench applied to COM is always feasible. Let’s re-visit the
optimization we first wrote down for the 2D case (the argument with no adjustment
holds for the 3D case):
We can always choose a wrench that cancels gravity, i.e.:
and re-write the static equilibrium equality constraint as:
The only way in which the original QP is \textbf{not} feasible is either
for the equality constraint to not have a solution or for the inequality
constraints to form an empty set (which results in an empty feasible set).
The latter is not a problem since the inequalities form a non-empty open
convex cone. The former is also not a problem. We first note that
has full row rank and therefore:
is always computable since the square matrix is invertible.
Thus, we can solve for the contact forces and re-write the optimization program
strictly as a function of the wrench which leads to a convex quadratic loss subject
to a non-empty set of inequalities which is always feasible. To illustrate, the
optimization becomes:
where all we did was to solve for as a function of , and
replace it into the optimization. By solving this slightly lower dimensional
optimization, we compute and from that . This result should not
be surprising. In theory, we could simply apply sufficient wrench to almost lift
the object off the contact, negating entirely the frictional force but maintaining “balancing”.
This trivial solution is evidence enough that at least the problem is feasible. However, it
turns out that this is not the smallest wrench solution, as demonstrated by the example we solved.
Simply put, it is inefficient to cancel both gravity and friction. Rather, choosing a
wrench that exploits both to balance will lead to lower effort.
Pivoting
The task of pivoting here means to maintain the sticking contact constraint
between the object and environment while tracking a desired orientation trajectory
. This problem may be formulated as a quasi-static, quasi-dynamic, or fully
dynamic task. Practically speaking, the quasi-dynamic formulation is the most prevalent.
This is because rarely is an object pivoted quickly enough for significant Coriolis or
Centrifugal terms to play a effect in the dynamics. The advantage of the quasi-dynamic
formulation is that we can ignore these complex nonlinear terms in the equations of motion.
Rigid-body Quasi-Dynamic Equations of Motion
The general rigid-body equations of motion can be written as:
where is the configuration of the object, is the
configuration dependent intertia matrix, are
the Centrifugal and Coriolis acceleration terms, is the gravitational
acceleration, are the generalized forces/torques, and
represent the contribution from externally applied forces. These expressions can
be discretized in time, for instance in the case of the explicit/forward Euler
approximation we may write:
where given the tuple ,
we can solve these equations for . The explicit
Euler approximation results in a linear system of equations that can be solved very
efficiently. We highlight that while this formulation computationally efficient, the
explicit Euler approximation suffer from numerical issues when integrating forward in time.
The quasi-dynamic assumption allows for short periods of dynamic motions but makes two
important assumptions about this motion: First, accelerations do not integrate into
significant velocities, and two the object velocity from the previous time step is 0.
The consequence of the first assumption is that the Coriolis and Centrifugal accelerations
are approximately zero. This is due to the presence of order terms in
terms. Note that this is fundamental to the continuous time derivation and is inherited by
the discrete dynamics, independent of the discretization scheme used. Thus, these terms are
set to zero. The consequence of the second assumption is that .
The equations of motion are then:
and we highlight that since $\dot{\mathbf q}{t+1} = \frac{1}{h}(\mathbf q{t+1} - \mathbf q_t)$, we only need this one expression to forward predict motion:
Effectively, we have reduced the number of variables needed by half. The physical
insight/intuition behind this formulation is that in general acceleration and velocity
point in different directions. However, in the particular case of quasi-dynamic motion,
these two vectors exist only instantaneously and are parallel.
Quasi-Dynamic Pivoting
Returning to our original balancing optimization program, we replace the
static equilibrium equation with the quasi-dynamic constraint and add a term to
the cost that captures the penalty for deviation from the desired trajectory:
Note that this optimization program is strictly tracking some desired trajectory along
time . For pivoting, we would choose to be an arc about the
contact point.
For the remainder of these notes, we will not continue to discuss pivoting since
the procedure to go from balancing to pivoting is the addition of a term in the cost
function and changing the static equilibrium constraint to quasi-dynamic motion.