The hold gate
Before any motion is computed: can the contacts that persist through an edit hold the box, and where can the edit happen?
What the gate asks
Each edit links a formation to one it contains (or the reverse). At the instant a contact is made or broken it carries no force, so the box must be held by the less-constrained end of the edit alone: the new formation for a break, the current one for a make. Multi-contact planners use the same rule. Hauser et al. (IJRR 2008): at a transition the robot “can support itself only with forces applied at the contact in [σ]”, because “the applied force is zero at the instant of time when the contact is made or broken”. Escande et al. (RAS 2013) require “the geometric constraints of the biggest (for the inclusion) of the two sets and the stability constraints of the smallest one”.
The gate H answers two questions before the local solver is called:
- Does the less-constrained end hold the box? A linear program over contact forces, with the disk’s motor limits, answered with a witness or a certificate and a margin.
- Where? If not at the current pose χ₀, then at a nearby pose where the edit could happen: the transition sweep.
Holding against gravity
A formation holds the box if contact forces in their Coulomb cones cancel gravity, force and moment, and the disk’s motors can supply the disk’s share. In the plane:
- each friction cone has two edge rays, so a contact force is a nonnegative mix of two vectors. μ = 0.2 for the box on E. For the disk, the disk–box friction is a declared band μdisk ∈ [0.3, 0.5], standing in for a real disk on a real box until hardware is measured; the gate uses the band’s lower end, 0.3, so a hold it certifies holds at every μ in the band (the cone at 0.3 lies inside the others);
- a contact along a segment acts through its two endpoints (the moment is linear in the point of application), so each contact contributes at most four generators;
- the disk is held still by two slide motors of ±1 N, which must supply its push on the box plus its own weight (0.196 N). Its push is therefore bounded, and the disk alone cannot hold the box up: lifting box and disk takes 1.18 N.
The margin is how large a disturbance the contacts can absorb: the largest r such that the needed wrench plus r·D is still supported, with D the ℓ₁ unit ball of pushes and twists (forces in units of the box’s weight mg, moments in mg·a/2). Negative margins measure how far from holding. A box flat on the floor has margin 0.2 = μ: the smallest pure sideways push that makes it slide.
The margin the gate reports is a certified lower bound: each exit program’s float32 witness is checked by a residual bound with rounding accounted for, and the margin is the least of those bounds (it sits below the float64 optimum by at most 10−4). “Held” is certified when a witness proves a margin of at least γmin, “not held” when a Farkas certificate proves it; anything else is reported as uncertain.
The gate certifies holds only: whether some forces inside the cones balance gravity at a pose. That is a relaxation of what a motion under Coulomb’s law needs (a sliding contact gets only one edge of its cone), so the gate never refuses a realizable edit; which contacts stick and which slide along the motion belongs to the realizer’s plan (Certifying a whole box).
The test is a set of small linear programs, solved in float32 inside JAX and batched over poses. Background: deciding support derives it from first principles, starting from the exact cone test that still serves as a cross-check.
Where the edit happens: the transition sweep
The gate does not have to pass at χ₀ itself: the solver may first move the box within the current contacts and then change them. So H searches near χ₀ for a transition pose χtr:
- It takes the more-constrained end’s contacts as constraints (one point constraint per vertex or disk contact, two per edge–edge contact) and finds their free directions (the null space of the constraints’ Jacobian, in a canonical basis; at most three).
- It lays about 64 poses on the directions that are actually free (8 × 8 for two directions), within ±0.05 in scaled coordinates (a 50 mm translation or 0.8 rad of rotation), then refines twice with a 3 × 3 × 3 grid at half the spacing around the recognized pose of largest margin: 118 poses in all. Each pose is projected back onto the constraints.
- It keeps the poses the recognizer labels exactly as the more-constrained end, with no tie, and runs the hold test on the less-constrained end at each.
H accepts if the less-constrained end holds, with margin at least γmin = 10−5 (just above float32 rounding), at χ₀ or at a kept pose. A make or a constraining transfer must close the added contact: its accepted pose is one where the added contact touches (χ₀ counts only if it is already closed there), as the definition of a transition pose requires. The pose handed to the solver as χtr is the nearest accepted pose with margin at least γtr = 0.1, so the solver aims at a pose held with room to spare; failing that, the accepted pose of largest margin.
The sweep moves the disk as well as the box: it can accept at a pose with the disk elsewhere on the face than at χ₀.
The paper proves that the idealized gate (the exact, continuous sweep, no recognition filter, γmin = 0) never refuses an edit a quasi-static motion could realize (Theorem B); the sampled gate keeps this only under stated hypotheses (a Lipschitz margin and a grid that covers the region, above a margin band that depends on the covering distance).
Accuracy
The gate’s LPs are checked against an independently coded float64 LP (SciPy’s HiGHS) with the same motor limits, and its certified margin against the interval certificate: on 106 pivot poses it admits nothing that cannot hold and refuses one of the 81,595 that can, a pose its float32 simplex leaves undecided, which it flags as uncertain (Certifying a whole box). The acceptance threshold γmin = 10−5 sits just above float32 rounding: at a pose exactly on the support boundary the float32 margin is at most 2·10−7, so such a pose is not accepted.
A make’s less-constrained end is the current formation, which already holds, so the gate rarely refuses a make; it prunes the breaks and transfers, the edits that drop or shrink support.
Reproduce
cd ~/repos/research/ccg && git switch master && git pull && cd ccg
JAX_PLATFORMS=cpu PYTHONPATH=tests .venv314/bin/python -m pytest -q tests/test_planar_step2.py tests/test_step3.py