The local solver
Realizing an edit: one success test for every realizer, and the mode-scheduled quasi-static realizer Λqs with its options.
Disk friction is a declared band, μdisk ∈ [0.3, 0.5], which stands in for a real disk on a real box until hardware is measured. The simulator runs at 0.3 by default (0.4 or 0.5 with CCG_DISK_FRICTION). The gate and the tracker use 0.3, the band’s lower end, as the disk’s sticking cone, so no plan counts on friction above it. Λqs’s six options described below are on by default. With them, the search finds the indirect lift from the scene alone (Results). A call refused after its approach returns the approach’s motion, so a box that falls while the disk repositions is seen by the dynamic test. Λqs plans held poses, not stick–slip plans; a stick–slip variant is built and left off (below).
What the solver must do
The local solver Λ gets an edit σ → σ′ that passed the hold gate, the current pose χ₀, and the transition pose χtr the gate found. It returns a simulated record, and the edit is accepted only if the record passes one success test, shared by every realizer:
- persistence: every kept contact is on at every sample; for a transfer c → d, one of c and d is on at every sample;
- departure: a contact dropped outright ends above εon;
- dwell: the recognized formation equals σ′ for the last samples, with no tie;
- overlap: no gap below −εpen;
- support while the disk lets go: at every sample the box is held by the formation present, which is σ̄ (the more-constrained end) before the transition, while the dropped disk contact is still on, and σ̲ (the kept contacts) from the transition on, as in the definition of a transition;
- the manipulator’s time limit, and progress toward the goal for transport.
The mode-scheduled realizer Λqs
The edit names the contacts before and after, and the gate’s sweep gives χtr, so Λqs plans on known contacts and tracks the plan in MuJoCo:
- plan: knots on the contact constraints (Gauss–Newton projection of an interpolation); phase I from χ₀ to χtr keeping σ; phase II by edit kind: a relaxing edit ends at the nearest pose recognized exactly as σ′ with σ′ holding; a constraining edit ends at χtr projected onto σ′ and pressed 2 mm past the closure; transport moves up to 0.05 toward the goal;
- feed-forward: the minimum-norm holding force at each knot (nonnegative least squares over the gate’s friction-cone rays): the least squeeze that holds the box there. The box moves because the reference moves, not because of the feed-forward;
- tracking: while the disk touches, a PD force along the box’s free directions, mapped through the contact and kept inside the disk’s sticking cone (μ = 0.3, the band’s lower end) and the ±1 N motor box; otherwise PD on the planned disk positions.
Options, on by default
roll_pivot: a constraining edit whose only environment contact is a point (the roll sv → t, the box on the step corner) is planned as a rotation about that point, the motion its sticking contacts allow, with the disk following without slip.ff0_hold: when a call starts with the disk already pressing on the box, the feed-forward starts from the holding force instead of ramping up from zero, so the box does not lose support at the start.settle_ext: after the planned horizon, keep tracking the last knot until the box is at rest, for at most one more plan length.qs_plan_check: before executing, every knot of the motion that keeps σ must be held by σ under the gate’s own hold test; otherwise the call is refused (plan_unheld) instead of executed.disk_path_fix: the disk’s place on the box’s face moves evenly from knot to knot. Without it the plan kept the disk in place and moved it in a phase’s last segment: a jump of 40–93 mm in edits and 10–73 mm in 69 of 237 transports.roll_press_fix: the roll’s press continues the rotation about the step corner V instead of pressing along a chord, so the planned slide over V is 0.02 mm instead of 25.6 mm.The contact rules (
touch_in_band,transfer_box_frame,transfer_done): the tracker’s touching control, whose normal-force floor grows with the gap, acts only while the disk’s planned contact is within εon; farther out the disk closes the gap by position feedback toward its planned place in the block’s frame. A disk transfer tracks its motion off the old contact and onto the new one in the block’s frame. When a transfer’s approach already ends recognized as the destination formation, the rest of the call is planned in that formation instead of re-imposing the old contact 1–11 mm away, and the success test reads a tie between the two exchanged contacts at the hand-over as the formation the recognizer reports. Without them, an out-of-band touching start saturated the motors and flung the disk (#52, #62). With them the headline search solves 199 of 200 held-out searches against 197 without them, losing none.CCG_TOUCH_IN_BAND,CCG_TRANSFER_BOX_FRAMEandCCG_TRANSFER_DONEset to 0 turn each off.
Every run records Λqs’s options at their values (ModeScheduledSolver.options(); the teacher’s instance rows and the chain search’s calls.json).
Replayed on 227 logged calls at five frictions across the band (gate and tracker 0.3), the three roll options raise the successes from 168–187 to 203–209. The rolls gain in 98 of 125 cells and lose in none. On the same 227 calls, with every option above on except the two path fixes, adding disk_path_fix and roll_press_fix changes the successes at μ = 0.3, 0.35, 0.4, 0.45, 0.5 from 195, 201, 198, 197, 193 to 203, 203, 198, 200, 199 (noise ±3), and plans with a disk jump over 10 mm from 73–74 to 0. qs_plan_check changes only 8 roll calls, which it refuses at every μ: they start from breaks below about 60° and are not held in their last 5–10°. The search is then steered to the branch whose roll is held at every knot.
Held poses, not stick–slip plans
Λqs’s plan fixes positions only: the disk keeps its planned place on the box’s face. The disk cannot rotate, so on a turning face that place is a slide at R·θ̇. The plan’s force model is the gate’s hold test at each knot, which keeps both edges of the disk’s friction cone: a sequence of static holds, not a motion under Coulomb’s law. Where a contact slides, Coulomb’s law leaves it only the cone’s edge opposite the slip.
With the path fixes off, the disk slid down the face in break(mx) at its friction limit (16.6, 11.9 and 9.4 mm at μ = 0.3, 0.4 and 0.5), and the chain search failed at 0.3. That plan also moved the disk along the face in one jump at the phase’s end (93 mm in break(mx)); disk_path_fix spreads it over the phase.
The gate stays at the hold level (a relaxation of Coulomb realizability, so it never refuses a realizable edge). A stick–slip variant of the realizer is built (stick_slip, off by default): each contact sticks or slides on each segment, the kinematics and the force program agree, and the feed-forward is the least squeeze inside those cones (see Certifying a whole box). Its transition search (ss_transition_search) takes an earlier transition pose of the plan’s own first phase when the gate’s pose has no feasible stick–slip plan. On the 227 replayed calls it realizes 187–192 per μ against the default’s 198–203, and its chain search solves at μ = 0.4 and 0.5 but not at 0.3, where break(gv)’s transition pose is the node itself. It stays off.
Other realizers in the code, off by default
- Learned skills. A soft actor-critic (SAC) policy per hard edit (the break, the pivot and the transfer) is in the code (
ccg/rl) as a fallback that a harder task could substitute in. It is not part of the method and its dispatch is off by default: with Λqs’s current options, no edit of the indirect lift needs it. - Receding-horizon re-planning. Λqs can rebuild its plan from the simulated state at a fixed interval and track its first segment. It is off by default.
- MPPI. The first realizer, a sampling-based model-predictive controller on the MuJoCo simulation, stays in the code; Λqs replaced it.
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_modesched.py