Repository navigation
KUKA iiwa14 cell: manipulator showcase with a crossing worker and joint-velocity CBF-QP - #404
Merged
Merged
Conversation
…capsule CBFs, OSC nominal, safe controller
… path moved onto the transfer arc
…ir overlay, HUD and side-by-side
…limits, class-K 1.0, relaxable CBF rows with logged slack; renderer uses the log's sphere set
… CBFs, fast QP solver at 1e-8, speed margin 0.15 s
… class-K 5.0; HUD h axis capped at 1 m
…es and a HUD pill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A fifth MuJoCo/MJX showcase, this time a fixed-base industrial arm: a KUKA iiwa14 on a pedestal cycles parts from a bin to a conveyor while a worker walks through its sweep. Without the filter the arm strikes the worker; with a CBF-QP on the commanded joint velocities it folds back, holds, and resumes the cycle.
What is in the branch
src/cbfkit/systems/mujoco/kuka_cell.py: scene assembled at runtime from the menagerie iiwa14 (pedestal, bin, conveyor, mocap worker mannequin);CellPlantwhose input carries the joint-velocity command and the worker pose (the worker is a kinematic MuJoCo body, so the unfiltered strike is a physical contact); 35 sphere–capsule barriersh = dist − r_i − r_j − d0 − τ|v_worker|evaluated through differentiablemjx.kinematics, plus 14 joint-limit barriers; an operational-space pick-and-place nominal whose cycle phase is held while the arm is displaced; the safe controller wired forsimulator.execute(plant=...).examples/mujoco/kuka_cell.py(simulate [--unfiltered]→ showcase-compatible npz, contact recomputed offline withmj_forward) andexamples/mujoco/kuka_cell_render.py(keep-out capsules coloured by barrier value, active sphere–capsule pair, tool trail, HUD, side-by-side, and a--slowmo T0 T1 FACTORwindow with frames interpolated from the 50 Hz log).iiwa14.xml+ LICENSE and a checksum manifest;assets.iiwa14_model_dir()fetches the meshes through the existing cache.showcase.apply_showcase_look(spec, floor)factored out ofrender_modelso spec-built scenes share the studio look.tests/test_mujoco/test_kuka_cell.py,test_kuka_cell_render.py(16 tests, marked slow) and one test each intest_assets.pyandtest_showcase.py.Measured (home box, CPU JAX, 10 s runs)
h_min+0.073 (never negative), relaxation slack ≤ 7 mm, intervention only during the crossing (2.1–5.2 s), cycle resumesDesign notes worth knowing
qpos + qdot·dtreaches only ~20 % of the commanded speed, so the servo target is integrated indata.ctrlat the physics rate and clamped toqpos ± 0.15 rad.get_solver("fast", tol=1e-8, max_iter=48). The CBF rows are relaxable with the generator's default penalty as a feasibility net; the slack is logged and shown in the HUD.Verification
pytest tests/test_mujoco/test_kuka_cell.py tests/test_mujoco/test_kuka_cell_render.py tests/test_mujoco/test_assets.py tests/test_mujoco/test_showcase.pygreen locally (macOS, CPU).JAX_PLATFORM_NAME=cpuandMUJOCO_GL=egl.