Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
75d3c9a
feat(sim): default Newton rigid simulation to MJVBD V2
Sep 17, 2026
731a20d
fix(sim): tune MJVBD V2 manipulation examples and record limitations
Sep 18, 2026
51af322
fix(tutorial): align drawer damping across physics backends
Sep 20, 2026
bc5369b
docs(sim): clarify MJVBD V2 coupling and control limitations
Sep 20, 2026
5f19889
fix(sim): adapt examples to DexUni solver config
yuecideng Sep 29, 2026
1e9d5f9
Merge remote-tracking branch 'origin/main' into codex/dexuni-interfac…
yuecideng Sep 29, 2026
347ce76
fix(sim): unify Newton solver adaptation on DexUni
yuecideng Sep 29, 2026
aa9f0b6
feat(sim): expose DexUni contact sensor data
yuecideng Sep 29, 2026
1832e56
test(sim): cross-check DexUni contact impulses
yuecideng Sep 29, 2026
c763aad
test(sim): assert DexUni contact invariants
yuecideng Sep 29, 2026
32e08fc
Merge remote-tracking branch 'origin/main' into codex/dexuni-interfac…
yuecideng Oct 3, 2026
7049fcf
fix(sim): update DexUni migration validation
yuecideng Oct 3, 2026
a09bd7e
docs(sim): use DexUni terminology consistently
yuecideng Oct 3, 2026
ad9ba87
wip
yuecideng Oct 4, 2026
b589354
Merge latest main into DexUni interface adaptation
yuecideng Oct 10, 2026
9428020
feat(physics): support current DexUni two-way coupling contracts
yuecideng Oct 10, 2026
6e60b8e
fix(dexsim): adapt latest 0.5.1 runtime contracts
yuecideng Oct 20, 2026
794bbb9
feat(dexsim): consolidate two-way coupling adaptation from PR #720
yuecideng Oct 21, 2026
e8a6419
fix(dexsim): reconcile current particle material and task contracts
yuecideng Oct 21, 2026
b8922a0
Merge latest main into DexSim adaptation
yuecideng Oct 27, 2026
57d0262
fix(dexsim): follow current DexUni dispatch and device defaults
yuecideng Oct 27, 2026
1eef398
feat(sim): expose DexSim controls and deformable initialization
Oct 27, 2026
9a2d016
fix(sim): preserve continuous URDF joint limits for DexUni
yuecideng Oct 27, 2026
a48f07c
fix(examples): complete DexUni workflows and physical placement checks
yuecideng Oct 27, 2026
f9f128d
Merge main be57e1b97 into DexUni adaptation
yuecideng Oct 27, 2026
4d72509
fix(examples): preserve placement asset frames across renderers
yuecideng Oct 27, 2026
da67a3e
Merge main into codex/adapt-latest-dexsim
yuecideng Nov 2, 2026
37085da
Merge main and adapt DexSim 0.6 contact reports
yuecideng Nov 7, 2026
731427f
refactor(sim): narrow Newton articulation root options
yuecideng Nov 7, 2026
834f88d
refactor(sim): remove legacy AutoSolver compatibility
yuecideng Nov 7, 2026
a6c3693
docs(sim): standardize native DexUni automatic dispatch
yuecideng Nov 7, 2026
f249fbe
update dexsim version
yuecideng Nov 7, 2026
8f792d0
Merge branch 'main' into codex/adapt-latest-dexsim
yuecideng Nov 7, 2026
28f8b6a
fix(sensors): honor native contact sampling boundaries
yuecideng Nov 7, 2026
3aafa0c
Merge latest main into codex/adapt-latest-dexsim
yuecideng Nov 9, 2026
afe3e06
fix: validate placement frames, mesh indices and deployment fixtures
yuecideng Nov 9, 2026
c1af874
fix(docker): align rc1 runtime guidance and pinned installer fallback
yuecideng Nov 9, 2026
e14fc4e
Add basic fluid simulation and standalone tutorial (#777)
yuecideng Nov 9, 2026
722189a
docs: record rc1 wheel and container dependency qualification
yuecideng Nov 9, 2026
c6e991c
Merge concurrent fluid update and retain rc1 qualification
yuecideng Nov 9, 2026
17d096e
test(gym): initialize fluid registry in reset fixture
yuecideng Nov 9, 2026
df92813
Merge main into DexSim adaptation and resolve Atomic Skill migration
yuecideng Nov 10, 2026
feeea3b
fix(ci): report native test failures before subsequent hangs
yuecideng Nov 10, 2026
d9eef97
fix(ci): align camera reset fixture and ground visibility example
yuecideng Nov 10, 2026
ba80384
Merge latest main installation requirements into PR 829
yuecideng Nov 10, 2026
a8a85a0
fix(ci): isolate ground visibility checks from DLSS and renderer state
yuecideng Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions agent_context/MAP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ topics:
aliases: [simulation system, simulation manager, Newton physics backend, motion module, sim motion, camera attachment, 运动能力模块, 仿真系统, 仿真管理器]
keywords: [SimulationManager, SimulationManagerCfg, RenderCfg, DenoisingCfg, DenoisingMode, DLSSCfg,
NRDCfg, DLSS, NRD, frame_time_delta_ms, explicit physics stepping, simulation_time, arena, DexSim, PhysicsBackendCfg,
DefaultPhysicsCfg, NewtonPhysicsCfg, VisualObject, VisualObjectCfg, VisualMaterial, VisualMaterialCfg, VisualMaterialInst, preview-material, 材质预览, UsdSourceCfg, source_prim_path, add_visual_object, 纯渲染对象, AutoSolverCfg, DexUniSolverCfg, DexUni, runtime control, deformable, particle set,
DefaultPhysicsCfg, NewtonPhysicsCfg, VisualObject, VisualObjectCfg, VisualMaterial, VisualMaterialCfg, VisualMaterialInst, preview-material, 材质预览, UsdSourceCfg, source_prim_path, add_visual_object, 纯渲染对象, DexUniSolverCfg, DexUni, runtime control, deformable, particle set,
UsdSourceSnapshot, read_usd_source, LinkMesh,
PhysicalCollisionGeometry, capture_physical_collision_geometry,
ArticulationJointKinematics, get_parent_joint_chain, asset_physics_mode, joint_drive_props, enable_gravity,
fixed-cadence playback, quaternion, xyzw]
fixed-cadence playback, FluidObjectCfg, FluidSpawnCfg, FluidObject, SPHSolverCfg, revolved_volume, fill_level, 粒子采样, fluid, 流体, quaternion, xyzw]
paths: [topics/simulation-system/simulation-system.md]
source_of_truth:
- embodichain/lab/sim/motion/__init__.py
Expand All @@ -24,6 +24,7 @@ topics:
- embodichain/cli/_visualization.py
- embodichain/lab/sim/__init__.py
- embodichain/lab/sim/cfg/
- embodichain/compute/geometry/particles.py
- embodichain/lab/sim/physics/
- embodichain/lab/sim/spawn/
- embodichain/lab/sim/material.py
Expand All @@ -39,7 +40,7 @@ topics:
- embodichain/lab/sim/objects/gizmo.py
- embodichain/lab/gym/envs/base_env.py
watch_paths: [embodichain/lab/sim/sim_manager.py, embodichain/lab/sim/cfg/, embodichain/lab/sim/physics/,
embodichain/lab/sim/spawn/, embodichain/lab/sim/material.py, embodichain/lab/sim/_material_presets.py, embodichain/lab/scripts/preview_material.py, tests/lab/scripts/test_preview_material.py, embodichain/lab/sim/objects/, tests/sim/]
embodichain/lab/sim/spawn/, embodichain/lab/sim/material.py, embodichain/lab/sim/_material_presets.py, embodichain/lab/scripts/preview_material.py, tests/lab/scripts/test_preview_material.py, embodichain/lab/sim/objects/, embodichain/compute/geometry/particles.py, tests/compute/test_particles.py, tests/sim/]
related_topics: [env-framework, robot-system, sensor-system, sim-visualization, ik-solvers, motion-planning,
atomic-actions, rl-learning, configclass-pattern, robot-workspace]
status: active
Expand Down
32 changes: 32 additions & 0 deletions agent_context/topics/atomic-actions/atomic-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,38 @@ Author contact dimensions and material settings before `prepare()`, never by
rewriting captured solver arrays. The current values live in
`examples/sim/atomic_skill/support.py` and the selected physical components.

Scene-specific DexUni contact options are authored through
`create_tutorial_simulation(newton_solver_options=...)` before model construction.
`add_tutorial_robot` owns optional `newton_gripper_friction` and `arm_damping`
overrides; `scenario.add_dual_tutorial_robot` owns dual-arm friction and optional
mimic stabilization.
Scene modules retain calibrated close targets, fixture TCPs and grippers, including
Handover's Robotiq 2F-140 fixture. Read those example owners for current values;
calibration does not establish generic physical success or solver equivalence.
The coordinated-placement host opts into mimic stabilization and two-way DexUni
feedback, checks measured
lift and release placement, and retains commanded jaw preload when reconciling
measured arm/held-object state. A contact-blocked jaw measurement is not its
holding command. Its mesh fixtures use
the authored Z-up frame; shared pan geometry selects the handle and basin along
local Y. The three original-GLB benchmark suites instead declare
`support_mesh_frame: native_glb`, selecting along local Z in the native Y-up
mesh. Propagate this frame through grasp, target and footprint qualification;
retain each suite's matching asset scale and root pose. Keep these asset-specific
conventions in the scene/geometry owners.
The host caches textured OBJ geometry so native renderers and NoRender load the
same baked asset frame.
Release checks reuse complete projected mesh-footprint coverage and sampled
support-surface gaps. The example rejects negative sampled gaps and requires
an interior-floor witness within 8 mm to reject overhang, penetration, hovering
and rim-spanning outcomes while permitting curved undersides; the target-input
audit retains its separate collision-free-proposal semantics. This is finite
geometric evidence, not a proof of continuous 3D collision freedom or contact load.
Keep the base-to-table height invariant when raising the fixture.
Read held poses without resetting them at the replan boundary.
The launcher preserves an omitted device through simulation configuration so the
selected backend owns its default; explicit device selections retain priority.

## Semantic integration boundary

`semantics` contains:
Expand Down
21 changes: 21 additions & 0 deletions agent_context/topics/simulation-system/articulation-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ resolves source metadata before its first immutable build. Do not implement
initial configuration as finalize-then-rebuild or duplicate descriptor writes
inside `Articulation._apply_spawn_config()`.

URDF continuous joints retain unbounded source limits during resolution. Native
Skeleton metadata may expose zero-filled limits; those must not become a locked
joint at the Newton boundary. Caller-authored limits and later config overlays
retain precedence over the source default.

`ArticulationRootPropertiesCfg` separates root intent from link physics.
Fixed-base/self-collision settings enter common descriptors, independently of
the source overlay policy; explicit `None` preserves USD intent and selects
Expand All @@ -21,12 +26,26 @@ the native articulation before Direct GPU initialization and initial reset.
Iteration counts are configured together because the native setter is atomic.
Applying them only during facade binding is too late for captured GPU settings.

`root_props.newton_gravity_compensation` is Newton creation intent applied in
both asset physics modes; omission preserves the source/default policy. It
compensates articulation link weight without removing payload gravity or
contact reactions. DexSim checks the resolved solver's MuJoCo support.
URDF mimic joints on Newton keep the configured follower drives and the
native MuJoCo equality by default, matching a plain DexSim scene; reset starts
followers on their mimic relation. `root_props.newton_mimic_stabilizer=True`
opts in to the Default-parity stabilizer (follower drive = 1 % of the leader,
mirrored follower targets, retuned equality `solref`).

`joint_drive_props` is the sole joint-property entry point; sparse fields retain
source values. `drive_type` describes the response and `target_mode` the active
command components. Lowering masks inactive gains: none/effort clear both,
velocity clears position gain. Newton rejects active acceleration drives;
non-MuJoCo position mode is gain-based emulation with zero velocity target.
Exact field options and defaults remain in `cfg/articulation.py`.
Newton-specific `joint_drive_props.passive_damping` lowers to passive DOF
damping, separately from the drive's velocity gain. It retains the same
exact-name/regex/control-part matching and remains active for passive or effort
target modes. Applied Newton-only settings are rejected on Default.

## State order and batched writes

Expand Down Expand Up @@ -122,3 +141,5 @@ FREE-joint synchronization, mesh export and no-op root writes;
`tests/sim/objects/test_articulation.py` for topology/FK. Source configuration
and root timing are covered by `tests/sim/spawn/test_descriptors.py` and
`tests/sim/test_sim_manager.py`.
`tests/sim/test_dexuni_two_way.py` compares contact-limited dynamic fingers
against the same one-way commands, including CUDA Graph and reset.
24 changes: 23 additions & 1 deletion agent_context/topics/simulation-system/deformables.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ order; node selection for a runtime control is not a render vertex selection.
For surfaces requiring stable authored node indices, array-backed `MeshCfg`
preserves the supplied order; native file importers can reorder vertices.
Volume voxelization creates tetrahedral particles whose indices do not match
the source mesh vertices.
the source mesh vertices. When stable volume node ids matter (material lines,
benchmarks), set `VolumeDeformableObjectCfg.tetrahedra` with an array-backed
`shape`: its vertices become the particles in order, meshing is skipped, and
`shape.triangles` is the optional boundary (derived from the tets if omitted).
`set_nodal_state()` writes world `[position, velocity]` nodes, the inverse of
`data.nodal_state_w`, without changing the rest shape.

A surface's optional `visual_shape` can have independent indexing and UV seams;
`visual_binding_mode` controls mapping from particles. Visual material/UVs
Expand All @@ -49,6 +54,23 @@ Optional `attrs.contact_material` sets DexUni stiffness, damping and dynamic
friction per soft or cloth object; it is separate from element elasticity and
replaces removed flat solver-level soft-contact coefficients in examples.

Surface cloth can author a constant signed rest dihedral angle through
`attrs.edge_rest_angle`; omitting it preserves the mesh-inferred rest geometry.
The surface descriptor compiler validates and forwards it to native cloth
physics. This is a rest-shape choice separate from bending stiffness and is not
a volume-surface material field.

The contact material lowers to the native cloth/soft-body physics descriptor.
Native validation and pair-material mixing remain DexSim-owned. An explicit
block requires the native per-object material API.

Surface `attrs.pneumatic` optionally lowers a mapping to native
`PneumaticPhysicsDesc`. Closed-surface topology, pressure-law validation and
solver compatibility remain DexSim-owned. A closed cloth mesh alone has no
gas pressure; callers must author this block for an inflatable cavity. Omission
keeps ordinary cloth compatible with older wheels; explicit cavities fail
before declaration if the installed descriptor API cannot represent them.

## Kinematic node controls

Clear the Newton `ACTIVE` bit for all driven nodes in `particle_flags` before
Expand Down
86 changes: 86 additions & 0 deletions agent_context/topics/simulation-system/fluids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Initial-fill fluids

`cfg/fluid.py` owns source, object and render configuration. Fluids use DexUni,
which dispatches DFSPH when the scene contains fluid particles. Optional
numerical settings belong to DexSim `SPHSolverCfg`, nested under
`NewtonPhysicsCfg.solver_cfg.sph_cfg`; omitting them uses native DFSPH defaults.
`SimulationManager.add_fluid_object()` declares through SpawnScene and binds
`objects/fluid.py` in place at `prepare()`.

The fluid declaration owns density and spacing. Default native SPH values for
`rest_density` and `particle_diameter` are placeholders, equally for mappings
and native config objects; non-default solver values must match the fluid.
DexSim derives the effective solver values from the fluid descriptors.

## Runtime requirements

Fluid simulation requires Newton CUDA, a DexSim build exposing
`DexUniSolverCfg.sph_cfg`, no gradients and fixed particle topology.
Multiple environments require a DexSim SPH solver that explicitly advertises
both world isolation and selected-world reset; arena spacing alone does not
establish isolation. The repository's pinned `dexsim_engine==0.6.0rc1` build
provides the DexUni/DFSPH composition and both multi-world capabilities.

The current native DexUni/DFSPH implementation is a prototype: DFSPH follows
the rigid step with one-way rigid-to-fluid interaction. When rigid bodies are
present, it requires the pure MuJoCo rigid path; static collision shapes do not
require a rigid-body solver. It cannot mix fluids with cloth or soft-body particles.
Online robot pouring, Gym declarations and replay belong to the dependent task
layer; two-way fluid feedback is not implied by DexUni's rigid/soft coupling.

## State and sampling

Fluid state uses world-frame `(instances, particles, 3|6)` Torch snapshots.
Writes use Scene particle batches, invalidate captured graphs and reset
supported solver history. The legacy single-world solver rebaselines optional
SDF boundary pose history. Reset restores the immutable initial state or
transforms a saved local template without stepping the world. Explicit state
writes do not refresh density diagnostics until the next SPH step.

A spawn reference resolves a declared rigid body's initial pose once; it is
not a persistent attachment. Sources include explicit points/NPZ, primitives,
capped Z-axis revolved profiles and closed fill-volume meshes. Profile points
are ordered `(local Z, radius)` pairs. `fill_level` clips the full source Z
extent before sampling; clearance does not inset that free surface. Mesh
sources describe closed cavities, rather than container walls. Point imports
reject volume-only profile/fill-level controls.

Sampling math belongs to `compute/geometry/particles.py`, independent of lab.
The manager samples once at declaration and retains the local template;
binding and reset do not reopen source files. Particle count is fixed after
preparation, and all fluids share density and spacing. Adding, replacing or
removing rigid assets after preparing a particle scene requires a new scene.

`FluidObject(cfg, device)` creates an unregistered facade without sampling or
state allocation. The manager resolves the source recipe and reference pose,
then privately initializes the facade's local particle template, initial
rotation and write-invalidation hook. Spawn receives the same sampled points
and resolved pose. Derived caches never become additional config fields;
binding and reset reuse them while the input config remains a source recipe.

## Rendering and validation

Native fluids require FastRT (`fast-rt`) or OfflineRT (`rt`). Hybrid's Vulkan
primary surface lacks the OptiX liquid geometry, so the manager rejects Hybrid
before sampling or declaration, including an already initialized Hybrid
process. Use `no-render` for physics only; fluid mode `none` requires it.
Display clipping changes only a render copy. Viser consumes detached particle
point clouds. NoRender needs no optical material. Advanced optical parameters
follow the renderer requirements of the [material system](materials.md).

`scripts/tutorials/sim/create_fluid.py` demonstrates procedural box sampling,
five primitive container walls, prepare, step, state reads and reset. Pass
`--num-envs` to use multiple independent worlds on a capable SPH build. The
fixed container uses static SDF collision shapes, so DFSPH can collide with it
without running a rigid-body solver. It needs no robot, task configuration or downloaded assets:

```bash
python scripts/tutorials/sim/create_fluid.py --headless --renderer no-render
```

Focused checks are `tests/compute/test_particles.py`,
`tests/sim/test_fluid_cfg.py`, `tests/sim/objects/test_fluid_object.py` and
`tests/visualization/test_scene_exporter.py`. Serial CUDA lifecycle coverage is
`tests/sim/objects/test_fluid_runtime.py`; `test_fluid_visibility.py` checks
camera pixels after stepping and direct state writes. Tutorial checks remain
syntax/CLI smoke checks rather than tutorial import tests.
14 changes: 8 additions & 6 deletions agent_context/topics/simulation-system/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ rows before episode initialization events run.

Manager reset restores all selected Newton articulations before one complete
Scene batch clears drive targets, dynamics, warm-start state, kinematics and
external wrenches. MuJoCo-Warp cannot safely clear a selected world's solver
state with only some of its articulations; excluding a subset is rejected.
external wrenches. MuJoCo-Warp and DexUni cannot safely clear a selected world's
solver state with only some of its articulations; excluding a subset is rejected
before any facade state changes.
Other resource exclusions and environment selections remain honored.

`destroy(exit_process=False)` queues native cleanup. Flush with
Expand Down Expand Up @@ -86,11 +87,12 @@ must not reach into `_spawn_scene.builder`.
| `register_kinematic_joint_trajectory()` | Declare articulation first; positions `[env, frames, dof]` use public qpos order; optional root poses `[env, frames, 4, 4]` |
| `register_kinematic_nodal_trajectory()` | Declare deformable with selected nodes inactive; offsets `[env, samples, selected_nodes, 3]` are relative to finalized initial world positions |
| `register_contact_material_schedule()` | Declared rigid object/robot/articulation; piecewise-constant shape friction/stiffness/damping tracks |
| `register_particle_contact_material_schedule()` | Scene-wide particle-versus-rigid contact properties |
| `register_particle_contact_material_schedule()` | Targeted DexUni deformable material via `uid`; omitted UID retains legacy scene-wide particle properties |
| `add_runtime_control()` | Any DexSim `RuntimeControl` without a dedicated method (for example `RealtimeJointTargetControl`); pass one scene-wide instance or a `factory(arena_name, env_index)`; targets use `f"{arena_name}/{uid}"`; returns the registered controls |

All registrations reject finalized scenes. Joint and shape-material controls
remain graph-compatible; nodal trajectories and particle-material schedules
perform host writes and disable CUDA Graph replay. Nodal `fps` enables linear
All registrations reject finalized scenes. Joint, shape-material and targeted DexUni particle-material controls remain
graph-compatible; nodal trajectories and legacy scene-wide particle-material
schedules perform host writes and disable CUDA Graph replay. Nodal `fps` enables linear
substep interpolation; without it each substep consumes a sample. Particle
indexing rules are in [deformables](deformables.md).

Expand Down
Loading
Loading