Tendon Pulley
Baseline video
Basic tendon distance scene showing a single cable span under XPBD stretch constraints.
Open MP4
Status for mmacklin/cable-sim. This report summarizes the current Cable
Joints path in Newton's XPBD solver and the current VBD implementation using the
same routed tendon model: rolling pulleys, frictional pinhole slip transfer,
and the unified finite-slip capstan extension controlled by mu.
The pre-split finite capstan baseline is commit 1a87f7a2.
The tendon solver now has three XPBD stages:
update_tendon_attachments recomputes route contacts and applies
mu-scaled rolling surface transfer, solve_tendon_stretch
enforces taut free-span stretch, and solve_tendon_slip applies the
capstan-limited spin-axis pulley torque. Pinholes transfer length between adjacent
taut spans in the same route update, with mu=0 recovering
frictionless slip and finite mu limiting transfer by the local
bend-angle capstan bound.
Rolling contact motion follows the Cable Joints surfaceDist(old, new)
update. Contact points are stored on the pulley in body-local coordinates and updated
every solver iteration, so pulley motion and cable length redistribution happen within
the same timestep. The stretch row carries cable load; the rolling slip row uses the
same capstan cone so mu=0 removes rolling transfer and pulley torque,
finite mu allows partial grip, and high mu recovers the
no-slip baseline. There is no separate pulley-angle state and no separate dynamic,
kinematic, slip, or no-slip path.
VBD now uses the same routed tendon rows as XPBD. It allocates the shared tendon
state and lambdas, updates the route/rest transfer with
update_tendon_attachments, projects taut free-span stretch with
solve_tendon_stretch, and applies the separated capstan
slip/spin row with solve_tendon_slip. There is no VBD global
routed-length force and no VBD-only tendon force/Hessian path in the current
solve.
In each VBD rigid iteration the tendon projection runs before and after the AVBD body sweep. The pre-pass gives joint/contact rows the current cable correction, and the post-pass prevents driven pulleys from outrunning exhausted spans before the next iteration.
| Example / Area | Status | Current expectation |
|---|---|---|
pinhole |
Expected good | Pinhole slip is part of the baseline and has CPU/CUDA Atwood, slack-preservation, and mu=0/mid/high friction-sweep regressions. The report now includes a three-case friction sweep and a top-side multi-pinhole cam route driven by a prismatic endpoint. |
pinhole_routing |
Baseline pass | Four pinholes share one passive non-spherical cam body: left and right centerline points plus two upper internal guide points. The right prismatic endpoint drives first, then releases while the left prismatic endpoint drives back; slack spans render as downward sag curves and material tick marks show slip through the routed pinholes. |
tendon_mujoco_wrap |
XPBD active-set pass | MuJoCo-style fixed topology with three active-set wrap candidates. The model authors each candidate as an initially inactive rolling link, and the XPBD solver owns the active route state that either skips the link or routes over the cylinder. The example only updates the active set from the straight-span intersection test. CPU/CUDA tests verify the authored rolling-link topology, start/end inactive state, activation/deactivation, signed wrap sides, zero inactive lateral error, no active centerline overshoot, visible active routing, and finite positive rest lengths. |
tendon_mujoco_switch |
XPBD active-set pass | Diagram-style route switch with a lower required rolling guide, an optional middle rolling guide, and a tendon endpoint attached to a rotating top capsule. When the endpoint swings left the middle capstan activates; when it swings right the route skips the middle capstan and wraps only around the lower guide. CPU/CUDA tests verify the authored lower/middle rolling links, initial inactive middle link, active-set transitions, restored/skipped route segments, and middle tangent points on the capstan surface. |
tendon_mujoco_switch_matrix |
XPBD active-set pass | Four-lane active-set switch matrix covering optional rolling candidates between attachment/attachment, rolling/attachment, attachment/rolling, and rolling/rolling neighbors. Rolling neighbors are internal route links with an anchor on the far side, so their winding arcs are exercised while the optional candidate switches in and out. CPU/CUDA tests verify one contiguous active interval, restored/skipped segment rows, tangent-point radii, expected candidate-side tangency, and bounded render lines for every neighbor combination. |
rolling pulley |
Expected good | Rolling angular Jacobian, per-iteration rest transfer, dynamic pulley rotation, zero-span saturation, and bounded pulley-contact behavior are covered by CPU/CUDA regressions. |
motorized rolling pulley |
Expected good | A driven dynamic pulley must produce slider motion and rest-length transfer in the same solve step; covered by CPU/CUDA regressions. |
tendon_xy_table |
XPBD passVBD hard fail | XPBD drives the cross-base cable route along the expected diagonal trajectory. VBD CUDA fails the shared example hook during test_post_step(): the route winding drifts to [-0.0283, -0.2314, 0.000013] where the reference point is (-0.03, -0.225, 0.0). The freshly rendered VBD clip also goes non-finite at frame 9 and freezes the remaining diagnostic frames. |
| Capstan finite friction | XPBD passVBD focused pass | Dynamic and kinematic capstan VBD focused regressions pass on CUDA using the separated stretch and capstan slip/spin rows. XPBD now also has a kinematic capstan hysteresis benchmark: loading slips at T_app/T_fix = exp(mu theta), unloading first sticks on the static plateau, then reverse slip follows T_fix/T_app = exp(mu theta). |
compound |
XPBD passVBD focused pass | XPBD keeps the balanced compound-pulley scene near equilibrium. The reworked VBD path now passes the 220-frame compound-pulley CPU and CUDA focused checks. |
equilibrium |
XPBD passVBD CPU pass | The equal-weight Atwood unit coverage is stable in the current VBD CPU slice. The full CUDA VBD slice did not finish inside the 420-second report timeout, so CUDA-wide status remains WIP rather than fully cleared. |
tendon_gear_pulley |
VBD CPU passCUDA xfail | XPBD follows the expected block-and-tackle direction. VBD now passes the CPU direction/mechanical-advantage check, but CUDA remains a real expected failure at the shared relaxation: direct CUDA ratio was 2.145 against the >2.5 threshold. |
3d_routing |
Baseline pass | Non-coplanar cable route over multiple rolling pulleys. The test checks iterative tangent generation, pulley rotation, and total cable length accounting when slack can develop. |
cable_machine |
Baseline pass | Multi-pulley cable-machine route with moving weights and explicit guide pulleys. The test checks pulley rotation, axis stability, cable attachment bounds, and smooth frame-to-frame motion. |
XPBD CUDA regression pass
This benchmark holds one cable end fixed, drives the applied end through a
kinematic rolling pulley with mu=0.2 and near-pi
wrap (theta=3.132 rad), and reads both span tensions from the XPBD segment
extension/compliance. The measured peak is T_app=195.4 N,
T_fix=104.5 N, with alpha=exp(mu theta)=1.871.
On loading, the applied side is the tight side and the measured curve
lands on T_fix=T_app/alpha. On unloading, the fixed-side
tension remains on a static stick plateau until the lower bound is
reached; in this run reverse slip starts below
T_app≈55.8 N and then lands on T_fix=alpha T_app.
This reproduces the expected capstan hysteresis band without requiring
separate static and kinetic friction coefficients.
These XPBD clips were re-rendered from the current workspace on 2026-05-12. The MuJoCo-style dynamic wrap example now uses solver-owned active-set routing over three simultaneous in/out capstans from alternating sides. A second diagram-style route switch with a rotating top capsule and optional middle capstan was added and rendered on 2026-05-19. The switch-matrix clip covers all four attachment/rolling neighbor combinations for an optional rolling candidate. Pinhole Friction Sweep and Kinematic Capstan were refreshed again without hard travel stops: the pinhole sweep uses shorter horizontal spans and a milder mass ratio, while the kinematic capstan uses a milder drive split with stronger tendon damping. The VBD clips below are intentionally left unchanged for this review pass.
Baseline video
Basic tendon distance scene showing a single cable span under XPBD stretch constraints.
Open MP4Pinhole friction pass
Three fixed-pinhole Atwood cases: mu=0 slips freely, mid friction reduces through-pinhole transfer, and high friction locks cable transfer against the guide point.
Pinhole routing pass
Four pinholes are attached to one passive non-spherical cam guide. The right endpoint drives first, then the left endpoint drives back; slack spans sag downward like a hanging cable, and white/yellow material ticks make pinhole slip visible.
Open MP4XPBD active-set pass
Three capstans move horizontally into a vertical cable path at the same time from alternating sides. The model keeps the fixed sequence of rolling-link candidates; the example only writes the solver active set. The shared tendon route builder skips inactive candidates as straight spans and restores wrapped free spans when they become active.
CPU/CUDA tests verify that the authored links remain rolling links, that the candidate links start inactive, and that the active route starts/end straight, wraps on the expected side, and deactivates before crossing past the centerline.
Open MP4XPBD active-set pass
A tendon is attached to the tip of a rotating top capsule. The lower guide is always active; the middle capstan is authored as an initially inactive rolling link and is activated only when the lower-guide tangent-to-endpoint bypass span intersects it.
As the top capsule swings left the route wraps over the middle capstan. As it swings right the solver skips the middle link and the tendon wraps only around the lower guide.
Open MP4XPBD active-set pass
Four vertical tendons exercise the optional rolling-link activation path across attachment-to-attachment, rolling-to-attachment, attachment-to-rolling, and rolling-to-rolling neighbor cases. The rolling-neighbor lanes include anchors on the far side so the neighbor capstans are true internal rolling links.
The moving candidate capstans start outside the bypass span, move into the active window from the appropriate side, then retreat along the same path. Candidate winding orientation is chosen from the approach side so the active route does not flip across the capstan at activation. Gray guide lines show the inactive tangent-aware bypass span; green indicates the candidate is active.
Open MP4Baseline target
Dynamic rolling pulley scene showing cable motion coupled to pulley rotation and the attached weights.
Open MP4CUDA test pass
Cross-base cable route inspired by the MathWorks XY-table example. Coordinated drive pulleys move the table along the expected diagonal path while passive guide pulleys follow the cable motion.
Open MP4Finite-slip pass
Three dynamic capstan cases: zero friction leaves the pulley nearly torque-free, finite friction gives partial pulley rotation, and high friction approaches no-slip rim motion.
Open MP4Finite-slip pass
Three fixed-pulley capstan cases: zero friction slips freely, finite friction reduces slip, and high friction locks the cable against the kinematic pulley.
Open MP4Baseline pass
Balanced compound-pulley setup where two equal left weights are coupled together and balance the right-side weight.
Open MP4New baseline pass
Five-pulley block-and-tackle route demonstrating mechanical advantage. The lighter free weight descends while the moving block rises through the expected gear ratio.
Open MP4Baseline pass
Non-coplanar route over multiple rolling pulleys, demonstrating tangent generation and cable length accounting in three dimensions.
Open MP4Baseline pass
Multi-pulley cable-machine scene with moving weights and guide pulleys, used to exercise coupled cable motion across a longer routed path.
Open MP4
These clips use the same scene definitions as the XPBD examples, with
the solver replaced by SolverVBD. VBD now mirrors XPBD's
routed-tendon sequence: route/rest update, taut stretch projection, and
the separated capstan slip/spin row. These clips were re-rendered from
the current workspace on 2026-05-11 with 2x supersampling.
VBD example-hook pass
Single-span routed tendon stretch rendered through the shared XPBD-style tendon projection rows inside VBD.
Open MP4VBD example-hook pass
Dynamic rolling pulley using the same routed rest transfer and separated stretch/slip rows as XPBD.
Open MP4VBD hard fail
Cross-base cable-driven table rendered through the shared VBD tendon projection path. CUDA VBD still hard-fails the reference winding check, and this render freezes after frame 9 because the body state becomes non-finite.
Open MP4VBD example-hook pass
Dynamic capstan friction sweep rendered through VBD's XPBD-mirrored stretch plus capstan slip/spin rows. The focused CUDA regression passes.
Open MP4VBD focused pass
Fixed-pulley capstan sweep rendered with the shared stretch and capstan slip rows. The focused CUDA slip/locking regression passes.
Open MP4VBD focused pass
Balanced compound-pulley route rendered after removing the global VBD length force. The 220-frame CPU and CUDA focused checks now pass.
Open MP4CPU passCUDA xfail
Five-pulley block-and-tackle route rendered through VBD. CPU now passes direction/mechanical advantage, but CUDA remains an expected failure at the shared relaxation.
Open MP4VBD example-hook pass
Non-coplanar rolling-pulley route rendered through the shared VBD tendon projection path.
Open MP4VBD example-hook pass
Longer multi-pulley cable-machine route rendered with the shared VBD tendon projection path.
Open MP4
The routed massless cable feature is a reduced constraint model for
cable-driven mechanisms. It is distinct from Newton's rod-style
JointType.CABLE and from MuJoCo's scalar tendon model:
Newton's rolling links are physical pulley contacts with body inertia,
tangent-point updates, and local capstan friction projection.
The dedicated design note compares the current XPBD formulation with MuJoCo spatial tendons, MuJoCo fixed tendons, the original Cable Joints method, explicit rope/contact simulation, rod-style cables, and joint equality/mimic constraints.
The mathematical white paper describes the split stretch/slip formulation, the equations of motion, the capstan rest-length projection, the spin coupling derivation, a focused capstan SVG figure, the rolling spin row, and the hysteresis benchmark.
The XPBD requirements checklist records the acceptance contract for future routed-cable changes: one capstan friction path, split stretch/slip rows, kinematic and dynamic capstan behavior, hysteresis, pinhole friction, and tension-reporting tests.
Open XPBD routed cable requirements
uv run --extra examples python -m unittest newton.tests.test_tendon_capstan newton.tests.test_tendon_equilibrium -q
Result: capstan and pinhole regression suite passed across CPU and CUDA.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_capstan.TestTendonCapstan -k pinhole -q
Result: 6 pinhole tests passed across CPU and CUDA, including free slip, slack preservation, and the mu=0/mid/high friction sweep.
uv run --extra dev -m newton.tests -k test_kinematic_capstan_hysteresis_matches_capstan_band_cuda_0
Result: passed on CUDA. The measured loading branch tracks T_app/T_fix=exp(mu theta), early unloading sticks on the fixed-side plateau, and reverse slip tracks T_fix/T_app=exp(mu theta).
uv run --extra dev --extra examples python -m unittest newton.tests.test_examples.TestCableExamples -k pinhole -q
Result: 6 pinhole example-hook tests passed across CPU and CUDA, including the new friction sweep and alternating two-prismatic passive-cam routing scene with slack-curve and material tick diagnostics.
uv run --extra examples python -m unittest newton.tests.test_examples.TestCableExamples -k capstan -k rolling_pulley -q
Result: 6 capstan and rolling-pulley example tests passed across CPU and CUDA.
uv run --extra examples python -m unittest newton.tests.test_examples.TestCableExamples -k xy_table -k compound -k 3d_routing -k cable_machine -k gear -q
Result: 10 routed example tests passed across CPU and CUDA.
NEWTON_RENDER_EXAMPLES=tendon_pinhole_routing NEWTON_RENDER_SUPERSAMPLE=2 uv run --extra examples python render_all_examples.py
Result: the alternating two-prismatic passive-cam routing clip with downward sag slack curves and material tick marks was rendered as a 240-frame 960x720 MP4 from 2x supersampled frames and decoded as nonblank video.
timeout 420s uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k cpu -q
Result: VBD CPU routed-tendon slice passed: 28 tests in 210.215 s, with 10 CUDA-only tests skipped.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_compound_pulley_stays_balanced_cpu -q
Result: passed.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_compound_pulley_stays_balanced_cuda -q
Result: passed.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_dynamic_capstan_mu_controls_pulley_rotation_cuda_0 -q
Result: passed.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_kinematic_capstan_mu_controls_slip_and_locking_cuda_0 -q
Result: passed.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_rolling_transfer_saturates_at_zero_span_cuda_0 -q
Result: passed.
uv run --extra dev --extra examples python - <<'PY' ... test_vbd_gear_pulley_direction_and_mechanical_advantage(..., 'cuda:0') ... PY
Result: hard failure remains; CUDA VBD gear ratio was 2.145 against the >2.5 threshold, so the CUDA expected failure is still real.
uv run --extra dev --extra examples python -m unittest newton.tests.test_tendon_vbd.TestTendonVBD -k vbd_xy_table_tracks_reference_prefix_cuda -q
Result: hard failure through the XY-table example test_post_step(): route winding [-0.0283, -0.2314, 0.000013] against expected (-0.03, -0.225, 0.0).
NEWTON_RENDER_SOLVER=vbd NEWTON_RENDER_SUPERSAMPLE=2 uv run --extra examples python render_all_examples.py
Result: VBD videos re-rendered as 960x720 MP4s from 2x supersampled frames on 2026-05-11. The XY-table VBD render hit non-finite state at frame 9 and froze the remaining diagnostic frames.