Skip to content

Unify Newton solver adaptation on DexUni - #720

Draft
yuecideng wants to merge 10 commits into
mainfrom
codex/dexuni-interface-adaptation
Draft

yuecideng wants to merge 10 commits into
mainfrom
codex/dexuni-interface-adaptation

Conversation

@yuecideng

@yuecideng yuecideng commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Unify the Newton/MJVBD integration changes on the current public DexUni interface.

This PR absorbs the retained simulation, reset, mimic, robot-preset, task-config, tutorial, and example adaptations from PR #645, while migrating their old mjvbd_v2 configuration identity to the current DexSim DexUniSolverCfg contract.

The unified configuration uses:

  • solver_type: dexuni
  • joint_mode and contact_mode for dispatch
  • vbd_options, mujoco_options, and collision_options for namespaced expert options
  • collision_cfg: null where DexUni owns contact generation

The Newton default remains DexSim AutoSolverCfg; explicitly selected DexUni scenes use the current MJVBD V2 implementation through DexUniSolverCfg. This avoids depending on the removed MJVBDV2SolverCfg export and preserves explicit automatic solver selection.

PR #645 is superseded by this unified PR.

Dependencies: current DexSim DexUniSolverCfg interface (0.5.1rc1-style); no EmbodiChain package dependency changes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Validation

  • black --check --diff --color . passed (1171 files unchanged).
  • python docs/scripts/check_api_docs.py passed (2387/2387 exports documented).
  • Focused simulation/config/tutorial tests: 281 passed.
  • Task/environment utility tests: 178 passed.
  • Headless DexUni smoke run passed:
    python examples/sim/demo/fold_tshirt.py --headless --steps 1 --disable-cuda-graph
    reached Scene ready and completed one frame with DexSim 0.5.1rc1.
  • Existing W1 asset inertia/normal warnings remain non-fatal.

Checklist

  • I have run the black . command to format the code base.
  • I reviewed affected documentation and agent context, updated the relevant guidance, or explained why no update was needed.
  • Public API changes are reflected in the API docs, if applicable.
  • I have added or updated tests that prove the fix is effective.
  • Dependencies have been updated, if applicable.

DexUni ContactSensor support

This PR also enables the backend-neutral ContactSensor for DexUni after solver resolution:

  • pure_mujoco: geometry, normal impulse, and tangential impulse are available when MuJoCo runs on CUDA.
  • Other DexUni paths: geometry rows remain available where the rigid-contact buffer is populated; impulse and friction capabilities are disabled and their output columns are placeholders.
  • Particle/soft contacts remain outside the rigid ContactQuery contract.

Validation:

  • Contact capability/unit tests: 40 passed.
  • Newton contact E2E tests: 3 passed on CUDA, including pure-MuJoCo full data and VBD geometry-only data.
  • Pure-MuJoCo native-force oracle cross-check passed: the sensor's summed normal impulse matches DexUni's force · normal × substep_dt within a 2e-3 relative tolerance, with finite geometry, unit normals, tangent orthogonality, and valid actor IDs checked.

xiemenghong and others added 5 commits September 17, 2026 09:48
Migrate DexUni example settings to the current namespaced solver interface and preserve the existing cloth contact values. Update the Newton config regression test and document the new mapping contract.
@yuecideng yuecideng added bug Something isn't working physics Things related to physics dexsim Things related to dexsim labels Sep 29, 2026
Port the retained MJVBD V2 integration consumers to the current DexUni public interface, while keeping AutoSolver as the Newton default. Preserve namespaced solver options, tutorial calibration, reset/mimic handling, and current task configuration.
@yuecideng yuecideng changed the title Adapt DexUni examples to current solver interface Unify Newton solver adaptation on DexUni Sep 29, 2026
@yuecideng yuecideng mentioned this pull request Sep 29, 2026
3 of 6 tasks
Allow geometry-only ContactQuery data for DexUni VBD paths and full impulse/friction data for pure MuJoCo. Add capability tests and GPU end-to-end coverage.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dexsim Things related to dexsim physics Things related to physics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant