Skip to content

Take dependency-safe joint and tendon deletion from myo_sim - #927

Draft
M-Colley wants to merge 2 commits into
MyoHub:fix/arm-reach-edit-v2-handfrom
M-Colley:refactor/arm-reach-spec-edit-myo-sim
Draft

M-Colley wants to merge 2 commits into
MyoHub:fix/arm-reach-edit-v2-handfrom
M-Colley:refactor/arm-reach-spec-edit-myo-sim

Conversation

@M-Colley

@M-Colley M-Colley commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Category: cross-repository MjSpec refactor (blocked:myo-sim, stack:stacked on #748; Draft in Milestone 3.2 until MyoHub/myo_sim#209 ships in a myo-sim release).

Summary

Stacked on #748 (fix/arm-reach-edit-v2-hand). Delegates generic, dependency-safe MjSpec joint and tendon deletion in myosuite/utils/spec_processing.py (delete_joint, delete_tendon) to myo_sim.build.spec_edit (MyoHub/myo_sim#209), while keeping task-specific recursive_immobilize flags and the arm-reach, table-tennis, and MuscleMimic recipes in MyoSuite.

Ownership & Reuse (REVIEW.md)

  • Owner: myo_sim (MyoHub/myo_sim#209, myo_sim.build.spec_edit) owns reusable, task-independent MjSpec structural edits (delete_joint, delete_tendon); MyoSuite (myosuite/utils/spec_processing.py) retains thin lazy forwarding wrappers and task-recipe immobilization helpers.
  • Existing primitives reused: myo_sim.build.spec_edit.{delete_joint, delete_tendon} (MyoHub/myo_sim#209, requires MuJoCo >= 3.11 from Require MuJoCo 3.11 and mjlab 1.6 #928 to avoid copied-wrap null dereferences).
  • Code removed/simplified: Removed 49 lines of in-tree actuator/tendon/joint dependency pruning (_delete_actuator, wrap cleanup) from myosuite/utils/spec_processing.py.

Compatibility, Release Gate & Checks

  • Compatibility & release gate: Preserves the public myosuite.utils.spec_processing.{delete_joint, delete_tendon} signatures and behavior once MyoHub/myo_sim#209 is installed. myo-sim==0.2.5 does not yet include myo_sim.build.spec_edit, so calling delete_joint / delete_tendon on 0.2.5 raises an actionable ImportError across the 26 test_registry.py environments that edit specs. Keep in Draft until MyoHub/myo_sim#209 is released and pyproject.toml bumps the myo-sim floor.
  • Checks run (Windows 11, Python 3.11):
    • Against #748 + MyoHub/myo_sim#209: test_myoedits_arm.py, test_hand_model_variants.py, test_tabletennis_cpu.py (23 passed, 3 skipped) and all 5 AGENTS.md verification modules (348 passed, 3 skipped), matching #748 head identically.
    • Against myo-sim==0.2.5: verified actionable ImportError behavior; GitHub CI (cpu, mjlab, docs, pre-commit) green.
  • Pre-existing note on MyoHub/myo_sim#147 (feat/hand-rebuild): Both #748 alone and #748 + #927 hit an access violation inside spec.compile() after edit_fn_arm_reaching on MuJoCo 3.8.1 (resolved by MuJoCo 3.11 in Require MuJoCo 3.11 and mjlab 1.6 #928; re-verify with Tutorial 6_ID: implementation updates #147 on MuJoCo 3.11 before Tutorial 6_ID: implementation updates #147 lands).

delete_tendon and delete_joint in spec_processing now import
myo_sim.build.spec_edit lazily (MyoHub/myo_sim#209), raising an
actionable ImportError on myo-sim 0.2.5. recursive_immobilize with
remove_dependents uses the same delete_joint. The local _delete_actuator
is dropped.
@fl0fischer fl0fischer added this to the 3.2 milestone Nov 30, 2026
@M-Colley M-Colley added refactor Internal cleanup or delegation behind existing public APIs stack:stacked Builds on another open PR or unmerged branch — merge after base blocked:myo-sim Depends on unreleased myo-sim (>0.2.5 / 0.3.0) APIs or models area:core-envs Core ModelBuilder, physics/math/trace utils, Athletic & ChaseTag envs labels Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core-envs Core ModelBuilder, physics/math/trace utils, Athletic & ChaseTag envs blocked:myo-sim Depends on unreleased myo-sim (>0.2.5 / 0.3.0) APIs or models refactor Internal cleanup or delegation behind existing public APIs stack:stacked Builds on another open PR or unmerged branch — merge after base

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants