Skip to content

Adapt Spawn integration to DexSim 0.5 APIs - #546

Open
yuecideng wants to merge 8 commits into
xiemhfrom
yueci/adapt-dexsim-050
Open

Adapt Spawn integration to DexSim 0.5 APIs#546
yuecideng wants to merge 8 commits into
xiemhfrom
yueci/adapt-dexsim-050

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

Stack

Description

This PR adapts EmbodiChain's Spawn integration to the updated DexSim public APIs on top of #516.

  • Delegate row and DOF selection to Spawn batches and surface native failure statuses.
  • Compile rigid-body, link, joint, mesh-load, and qpos-limit overrides before backend finalization, including USD articulation descriptors.
  • Prepare the runtime, bind facades, and attach sensors within the Spawn runtime-initialization scope.
  • Extend rigid-object property support and update affected robot configs, tutorials, tests, and simulation-system context.

Dependencies: #516 and the matching DexSim Spawn implementation.

Refs #516

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

Screenshots

Not applicable.

Validation

  • black --check --diff --color on all 709 tracked Python files.
  • 168 passed, 68 skipped across isolated focused suites for Spawn descriptors/batches/scene binding, SimulationManager, articulations, rigid objects/groups, and robots in Conda environment open.
  • The combined 37-module changed-test run did not complete cleanly: tests/sim/test_differentiable_stepper.py retains two Newton failures because draft: refactor spawn #516 removes the independently owned NewtonManager while the differentiable-stepper API still delegates to it; the native runtime can also segfault during teardown. DexSim does not yet expose an equivalent Spawn-owned public API, so this dependency gap is recorded rather than hidden with a speculative compatibility layer.

Checklist

  • I have run the black . equivalent over all tracked Python files to format the code base.
  • I have made corresponding changes to the simulation-system context documentation.
  • I have added tests that prove the Spawn adapter changes work.
  • Dependencies have been updated, if applicable.

@yuecidengyuecideng added enhancement New feature or request dexsim Things related to dexsim physics Things related to physics labels Aug 24, 2026
@greptile-apps

greptile-appsBot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adapts the simulation lifecycle and object facades to DexSim 0.5 Spawn APIs.

  • Moves descriptor compilation, backend runtime preparation, facade binding, and sensor attachment into the Spawn lifecycle.
  • Delegates batched row and DOF operations to native Spawn batch selections and propagates native failure statuses.
  • Updates object properties, robot configurations, standalone scripts, tutorials, tests, and simulation-system documentation for the new preparation boundary.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

FilenameOverview
embodichain/lab/sim/sim_manager.pyMoves scene commitment, backend preparation, facade binding, and deferred sensor attachment behind the common retryable prepare boundary.
embodichain/lab/sim/spawn/scene.pyCoordinates source resolution, finalization or rebuilding, and in-place binding of declared facades.
embodichain/lab/sim/spawn/descriptors.pyCompiles rigid-body, collision, link, joint, load-option, and articulation overrides into source-resolved Spawn descriptors.
embodichain/lab/sim/objects/backends/spawn.pyReplaces full-batch read-modify-write operations with native row and DOF selections and checks native failure statuses.
embodichain/lab/sim/objects/articulation.pyUpdates articulation binding and property initialization to use Spawn-backed runtime data.
embodichain/lab/sim/objects/rigid_object.pyExtends Spawn-backed rigid-object property support and binding behavior.
embodichain/lab/sim/cfg.pyAdds the Newton Warp-log suppression setting and forwards it to DexSim configuration.

Sequence Diagram

sequenceDiagram
participant Caller
participant Manager as SimulationManager
participant Scene as SpawnScene
participant Result as SpawnResult
participant Facades
participant Sensors
Caller->>Manager: add robots and objects
Manager->>Scene: declare descriptors and facades
Caller->>Manager: prepare()
Manager->>Scene: commit pending topology
Scene->>Result: finalize or rebuild
Manager->>Result: prepare_runtime()
Manager->>Scene: bind()
Scene->>Facades: bind_spawn(result)
Manager->>Sensors: attach_to_parent()
Manager-->>Caller: runtime ready
Loading

Reviews (3): Last reviewed commit: "wip" | Re-trigger Greptile

@greptile-apps

Copy link
Copy Markdown

Too many files changed for review (110 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

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

Labels

dexsimThings related to dexsimenhancementNew feature or requestphysicsThings related to physics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yuecideng