Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
8d20b8d
Docs: rewrite install guide and make lerobot a required dependency (#…
yuecideng Apr 12, 2026
d2a8dad
Update cobotmagic arm asset. (#228)
matafela Apr 13, 2026
987d04f
Fix opw solver (#229)
matafela Apr 15, 2026
80368bd
Fix crashing when no grasp pose found. (#232)
matafela Apr 15, 2026
59021a4
add rl benchmark (#231)
matafela Apr 15, 2026
d860435
Enhance workspace analyzer computational efficiency (#230)
yuecideng Apr 15, 2026
d52ea77
Update CobotMagic default safe margin (#235)
matafela Apr 16, 2026
d5bf930
Fix demo action shape normalization and control-part mapping (#237)
yuecideng Apr 16, 2026
3bb2592
Refine URDF assembly component prefixes and name casing policy (#236)
chase6305 Apr 19, 2026
50843a5
Refactor: benchmark (#233)
matafela Apr 20, 2026
e0e16ae
Update pytorch kinematic solver benchmark param (#240)
matafela Apr 20, 2026
0497711
fix plan_trajectory (#242)
yhnsu Apr 22, 2026
ccce98a
docs: add NVIDIA driver guide and mesh loading tutorial (#245)
XuanchaoPENG Apr 23, 2026
386dc66
Add multi-version documentation build support (#234)
yuecideng Apr 24, 2026
9fb2204
Fix README docs link (#246)
yuecideng Apr 24, 2026
06258f1
docs: add AI coding agent skills and cross-reference throughout docum…
yuecideng Apr 28, 2026
72e9731
fix: correct the link of website (#249)
yangchen73 Apr 29, 2026
c824c86
docs: upgrade README badges and add auto-sync to introduction.rst (#250)
yuecideng Apr 29, 2026
8e92c08
upgrade pytorch kinematics (#244)
matafela Apr 30, 2026
72b5bb9
chore: upgrade black to 26.3.1 and fix code style (#251)
yuecideng Apr 30, 2026
fc54598
Improve API reference detail and coverage (#252)
yuecideng May 1, 2026
168f11c
feat: Add atomic action abstraction layer for embodied AI motion gene…
yuecideng May 1, 2026
c5e6f00
Fix pytorch solver qpos mapping (#253)
matafela May 7, 2026
23a1208
docs: Remove AI coding agent skills references (#254)
yuecideng May 7, 2026
076fc65
docs: add data generation tutorial for synthesized data pipeline (#238)
yvvonie May 8, 2026
f81b8a6
Update skills structure and roadmap docs (#257)
yuecideng May 8, 2026
9e34ec1
Adapt dexsim v0.4.0 (#226)
yuecideng May 9, 2026
72ffe43
docs: add uv installation support and update dependencies (#258)
yuecideng May 9, 2026
c6ce00f
Fix PyPI release workflow (#259)
yuecideng May 9, 2026
e11eb4e
docs: improve navigation, cross-references, and guides (#262)
yuecideng May 12, 2026
a251699
Fix multiversion docs overwrite on main branch push (#263)
yuecideng May 12, 2026
6e5f745
docs: add academic publications page (#265)
yuecideng May 12, 2026
c322584
Fix multiversion docs overwrite on main push (#266)
yuecideng May 12, 2026
5cdd9c2
ci: fix docs deployment to use GitHub Actions Pages source
yuecideng May 12, 2026
2a8b56c
ci: fix multiversion docs deployment (#267)
yuecideng May 12, 2026
5bc76ce
fix opw tcp (#261)
matafela May 13, 2026
c3f5b4d
Annotate full mesh (#260)
matafela May 19, 2026
83ef059
Adapt DexSim v0.4.1 (#272)
yuecideng May 19, 2026
498dce9
Add emissive light mode to randomize_indirect_lighting (#274)
yuecideng May 20, 2026
d46bedb
fix atomic action (#273)
XuanchaoPENG May 21, 2026
7823731
Add Newton physics backend support
yuecideng May 21, 2026
77963fa
sim-ready pipeline (#271)
XuanchaoPENG May 21, 2026
178c730
wip
yuecideng May 22, 2026
1773778
Fix multi-version GitHub Pages docs deployment (#277)
yuecideng May 22, 2026
010d3cd
update design docs
yuecideng May 23, 2026
2314a05
update cfg
yuecideng May 24, 2026
6878a9b
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng May 24, 2026
6c1e26e
wip
yuecideng May 25, 2026
65a8475
wip
yuecideng May 25, 2026
1d8d416
wip
yuecideng May 25, 2026
85a8ee4
wip
yuecideng May 25, 2026
1250aa0
style
yuecideng May 25, 2026
fef305e
standardize lerobot key (#280)
yhnsu May 26, 2026
41edaa4
wip
yuecideng May 26, 2026
bc1a8b3
Fix rigid object init ordering and reset after GPU physics setup (#283)
yuecideng May 26, 2026
a811b1d
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng May 26, 2026
87eedfe
wip
yuecideng May 26, 2026
389cfa9
Add YAML support for gym and RL training configs (#284)
yuecideng May 26, 2026
c5192b3
wip
yuecideng May 26, 2026
590211c
Add per-link articulation physics configuration (#278)
yuecideng May 26, 2026
aafc199
wip
yuecideng May 26, 2026
23feec1
wip
yuecideng May 26, 2026
1747cc4
wip
yuecideng May 28, 2026
3e4d4ee
Fix base solver fk (#285)
matafela May 28, 2026
cf5184e
wip
yuecideng May 28, 2026
7f09bb2
wip
yuecideng May 29, 2026
f87d885
wip
yuecideng May 29, 2026
0486c39
feat(newton): enable runtime mutation of physical properties via Newt…
yuecideng May 30, 2026
b3236fc
feat(sim): optimize Newton backend + expand rigid-object test coverage
yuecideng May 31, 2026
8c224a9
wip
yuecideng Jun 1, 2026
826d047
wip
yuecideng Jun 2, 2026
98c12d5
feat: add agent context routing system for EmbodiChain (#288)
yuecideng Jun 3, 2026
dd0f021
wip
yuecideng Jun 3, 2026
d93e61a
Add neural network IK solver (#286)
yangchen73 Jun 3, 2026
4b6852d
wip
yuecideng Jun 3, 2026
6034f7b
wip
yuecideng Jun 3, 2026
70dfc53
Add joint armature support for articulations (#290)
yuecideng Jun 4, 2026
1b86641
Align window controls with DexSim defaults (#291)
yuecideng Jun 4, 2026
9fcc807
Merge branch 'main' into feature/newton-physics-backend
yuecideng Jun 4, 2026
044877e
Improve installation guide and deduplicate gensim install docs (#293)
yuecideng Jun 4, 2026
1819048
Fix recording for PourWater (#292)
yangchen73 Jun 5, 2026
cb3240b
Auto-select default renderer based on GPU (#294)
yuecideng Jun 9, 2026
52e8a22
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Jun 10, 2026
74bf17a
wip
yuecideng Jun 11, 2026
d5007f0
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Jun 15, 2026
b338f4d
init articulation
yuecideng Jun 15, 2026
f8227f6
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Jun 16, 2026
ceec28f
wip
yuecideng Jun 16, 2026
8388b4b
wip
yuecideng Jun 16, 2026
61855dc
wip
yuecideng Jun 16, 2026
c3923a8
add physcis backend
yuecideng Jun 18, 2026
396009f
wip: prepare Newton backend wiring for add_robot
yuecideng Jun 19, 2026
6b4709a
feat: enable RigidObject runtime attr mutation on Newton backend
yuecideng Jun 19, 2026
59fa679
feat: enable add_robot on the Newton backend
yuecideng Jun 19, 2026
1e3e75d
feat: Newton-native physics-attribute config for RigidObject & Articu…
yuecideng Jun 19, 2026
30a6ffe
test: add backend capability parity matrix
yuecideng Jun 19, 2026
3ccce78
feat: push per-link mass live on Newton in Articulation.set_link_phys…
yuecideng Jun 19, 2026
4d43fbc
fix: harden RigidObject not-ready Newton setter paths to mirror to meta
yuecideng Jun 19, 2026
a439bcb
wip
yuecideng Jun 19, 2026
006d2a1
wip
yuecideng Jun 21, 2026
4d0257c
docs: add Newton backend PR design (multi-env + differentiable env)
yuecideng Jun 21, 2026
79d3252
docs: implementation plan for Newton backend PR (multi-env + APG)
yuecideng Jun 21, 2026
86ead01
feat(sim/newton): add _arenas_cloned lifecycle flag
yuecideng Jun 21, 2026
56d0fc6
Revert "feat(sim/newton): add _arenas_cloned lifecycle flag"
yuecideng Jun 21, 2026
fc33a76
docs: revise Newton PR plan — Target 4 already complete
yuecideng Jun 21, 2026
56f1c9a
feat(sim): SimulationManager delegators for Newton diff stepper
yuecideng Jun 21, 2026
611d735
test(sim): isolate grad-guard test with semi_implicit solver
yuecideng Jun 21, 2026
68e3341
feat(sim/diff): Warp-tape <-> PyTorch-autograd bridge
yuecideng Jun 21, 2026
65f4488
feat(gym): DifferentiableEmbodiedEnv for APG
yuecideng Jun 21, 2026
13b981f
feat(gym/tasks): Franka FR3 reach APG example
yuecideng Jun 21, 2026
dec2222
docs: Newton differentiable-env topic + design doc update
yuecideng Jun 21, 2026
b18cb77
Merge branch 'main' into feature/newton-physics-backend
yuecideng Jun 23, 2026
8e1becc
wip
yuecideng Jun 23, 2026
a2ad495
Merge branch 'main' into feature/newton-physics-backend
yuecideng Jul 1, 2026
75d3183
Merge branch 'main' into feature/newton-physics-backend
yuecideng Jul 1, 2026
c3d3cd6
fix num_envs issue
yuecideng Jul 1, 2026
f9dca60
wip
yuecideng Jul 13, 2026
1d4b9eb
docs: define Newton runtime integration contracts
yuecideng Jul 13, 2026
ee88d7f
docs: plan Newton runtime contracts stage 1
yuecideng Jul 13, 2026
a9be048
fix(diff): default environments use Newton solver dynamics
yuecideng Jul 14, 2026
495d3be
fix(diff): persist Newton solver trajectory
yuecideng Jul 14, 2026
a1c4fff
fix(diff): use manager-owned Newton trajectories
yuecideng Jul 15, 2026
b5ac98d
fix(diff): defer resets until Newton backward
yuecideng Jul 15, 2026
0234479
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Aug 5, 2026
8a40568
Merge branch 'main' into pr-276
yuecideng Aug 9, 2026
fe49dca
refactor: spawn
Aug 18, 2026
cd72a43
wip
Aug 18, 2026
a3a5c05
fix tutorial
Aug 19, 2026
75f9068
prepare envs
Aug 19, 2026
86ee783
add sim.prepare()
Aug 20, 2026
64b22be
Merge branch 'main' into feature/newton-physics-backend
yuecideng Aug 20, 2026
93b6bcb
Merge branch 'feature/newton-physics-backend' into xiemh
yuecideng Aug 20, 2026
f664125
wip
yuecideng Aug 20, 2026
bd25281
wip
Aug 21, 2026
59e063b
wip
Aug 21, 2026
5edfc80
0821fix example
Aug 21, 2026
d3fa5f6
modify default cfg
Aug 24, 2026
b448bd9
Adapt Spawn integration to DexSim 0.5 APIs (#546)
yuecideng Aug 27, 2026
145229a
refactor spawn (#516)
MahooX Aug 27, 2026
8fa5731
wip
yuecideng Aug 27, 2026
42cca74
Merge branch 'yueci/tmp-adapt' into feature/newton-physics-backend
yuecideng Aug 27, 2026
9483285
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Aug 27, 2026
89efc74
wip
yuecideng Aug 28, 2026
a58d226
wip
yuecideng Aug 28, 2026
74912dd
wip
yuecideng Aug 28, 2026
6d612e2
feat(sim)!: make deformables Newton-only
yuecideng Aug 28, 2026
55eef03
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Aug 29, 2026
f8d1436
wip
yuecideng Aug 30, 2026
1f6905e
Merge branch 'feature/newton-physics-backend' into codex/newton-only-…
yuecideng Aug 31, 2026
76fef95
refactor(gym)!: make differentiable env kinematics-only
yuecideng Aug 31, 2026
9d76bef
wip
yuecideng Aug 31, 2026
41769ba
wip
yuecideng Aug 31, 2026
88f74a8
wip
yuecideng Aug 31, 2026
918611d
support auto solver
yuecideng Sep 1, 2026
334505c
wip
yuecideng Sep 1, 2026
3067d68
Merge branch 'main' into feature/newton-physics-backend
yuecideng Sep 1, 2026
72b860a
feat(sim): add Newton deformable demos and controls
Sep 1, 2026
01f569a
wip
yuecideng Sep 2, 2026
092773a
Merge branch 'newton-contact'
Sep 3, 2026
682da25
fix(sim): restore camera attachments after topology rebuild
Sep 3, 2026
bf696da
wip
yuecideng Sep 3, 2026
cb926b8
Merge branch 'feature/newton-physics-backend' of https://github.com/D…
yuecideng Sep 3, 2026
67d8760
test(sim): lock complete contact reporting
Sep 4, 2026
577c502
wip
yuecideng Sep 4, 2026
f85e219
Merge branch 'main' into feature/newton-physics-backend
yuecideng Sep 6, 2026
c8bab37
Add full-horizon waypoint APG training foundation (#570)
yuecideng Sep 6, 2026
3697220
Merge branch 'feature/newton-physics-backend' of https://github.com/D…
yuecideng Sep 6, 2026
7ac83f9
Merge PR #564 into feature/newton-physics-backend
yuecideng Sep 6, 2026
d9b61fe
wip
yuecideng Sep 6, 2026
bfa9652
wip
yuecideng Sep 6, 2026
eb584cb
wip
yuecideng Sep 6, 2026
135116c
wip
yuecideng Sep 7, 2026
15f120b
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Sep 8, 2026
58031b4
wip
yuecideng Sep 8, 2026
7e735c0
Merge remote-tracking branch 'origin/main' into feature/newton-physic…
yuecideng Sep 8, 2026
d5b1c56
wip
yuecideng Sep 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .agents/skills/add-robot/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Every robot config subclasses `RobotCfg` and overrides two hooks:

- `_build_defaults(self, init_dict=None)` — read variant fields from `init_dict`,
set them on `self`, then populate `urdf_cfg` / `control_parts` / `solver_cfg` /
`drive_pros` / `attrs`.
`joint_drive_props` / `attrs`.
- `build_pk_serial_chain(self, device=...)` — return `{control_part: pk.SerialChain}`,
reading the PK URDF from a single `_pk_urdf_path` source.

Expand Down Expand Up @@ -46,8 +46,8 @@ A cfg's `_build_defaults` must populate:
- `urdf_cfg` (URDFCfg) or `fpath`
- `control_parts` (Dict[str, List[str]]; joint names support regex)
- `solver_cfg` (Dict[str, SolverCfg]; keys match `control_parts`)
- `drive_pros` (JointDrivePropertiesCfg)
- `attrs` (RigidBodyAttributesCfg)
- `joint_drive_props` (JointDrivePropertiesCfg)
- `attrs` (RigidBodyPhysicsCfg)

`build_pk_serial_chain` must read from `_pk_urdf_path` (a property for
constant-path robots, a method for variant-dependent paths). The PK chain's DOF
Expand All @@ -69,7 +69,7 @@ must match the matching `control_parts` entry (the test stub asserts this).
self.urdf_cfg = URDFCfg(components=[...])
self.control_parts = {"arm": ["JOINT[1-6]"]}
self.solver_cfg = {"arm": OPWSolverCfg(end_link_name="link6", root_link_name="base_link")}
self.drive_pros = JointDrivePropertiesCfg(stiffness={"JOINT[1-6]": 1e4})
self.joint_drive_props = JointDrivePropertiesCfg(stiffness={"JOINT[1-6]": 1e4})
```

Variant-aware template (reads version / arm_kind):
Expand All @@ -79,7 +79,7 @@ must match the matching `control_parts` entry (the test stub asserts this).
init_dict = init_dict or {}
self.version = MyRobotVersion(init_dict.get("version", "v1"))
self.arm_kind = MyRobotArmKind(init_dict.get("arm_kind", "default"))
... # then urdf_cfg / control_parts / solver_cfg / drive_pros / attrs
... # then urdf_cfg / control_parts / solver_cfg / joint_drive_props / attrs
```

4. **Implement `build_pk_serial_chain`** reading from `_pk_urdf_path`:
Expand Down Expand Up @@ -149,8 +149,8 @@ Do not copy those semantic declarations into the robot class.
| `urdf_cfg` | URDFCfg | URDF file and components |
| `control_parts` | Dict[str, List[str]] | Joint groups for control |
| `solver_cfg` | Dict[str, SolverCfg] | IK solver configurations |
| `drive_pros` | JointDrivePropertiesCfg | Joint stiffness, damping, force |
| `attrs` | RigidBodyAttributesCfg | Rigid-body physics attributes |
| `joint_drive_props` | JointDrivePropertiesCfg | Joint drive, limits, friction, and armature |
| `attrs` | RigidBodyPhysicsCfg | Rigid-body physics attributes |
| variant fields | enum / str / bool | Optional subclass fields |
| `_pk_urdf_path` | property or method → str | URDF for the FK/IK serial chain |

Expand All @@ -160,5 +160,5 @@ Do not copy those semantic declarations into the robot class.
- Registry: `embodichain/lab/sim/robots/__init__.py`
- Docs: `docs/source/resources/robot/<name>.md`
- Tests: `tests/sim/objects/test_robot_cfg.py`
- Base class: `embodichain/lab/sim/cfg.py` (`RobotCfg`)
- Base class: `embodichain/lab/sim/cfg/robot.py` (`RobotCfg`)
- Guide: `docs/source/guides/add_robot.rst` · Tutorial: `docs/source/tutorial/add_robot.rst`
2 changes: 1 addition & 1 deletion .agents/skills/add-solver/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ exactly:
`test_ur_solver.py`) to sample joint configs within limits with a safety
margin.
- A `BaseSolverTest` class with:
- `setup_simulation(self, sim_device)` — builds a `SimulationManagerCfg`,
- `setup_simulation(self, device)` — builds a `SimulationManagerCfg`,
a `RobotCfg` whose `solver_cfg={"arm": <Name>SolverCfg(...)}` uses the new
solver, and adds the robot via `self.sim.add_robot(cfg=cfg)`.
- `test_ik(self)` — the round-trip contract:
Expand Down
9 changes: 7 additions & 2 deletions .agents/skills/add-task-env/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ For new task-first compositions, prefer:
This is a component, not a runnable deployment. It owns:

- `environment_id`;
- exactly one explicit `physics: default|newton` backend and its optional,
backend-matching `physics_config`;
- ordinary environment values such as episode limits and environment count;
- physical simulation entities under `simulation`; and
- manager configuration under `env`.
Expand Down Expand Up @@ -117,8 +119,10 @@ embodiment:

The original inline Gym format remains supported. When extending an existing
inline `env.json` or `env.yaml`, preserve that representation unless the user
asked for component extraction. Never select a component and repeat its owned
inline fields in the same deployment.
asked for component extraction. Every inline runnable config declares exactly
one `physics: default|newton` backend. Never select a component and repeat its
owned inline fields, including `physics` or `physics_config`, in the same
deployment. Use separate environment files for backend-specific settings.

### Optional Python entry point

Expand Down Expand Up @@ -173,6 +177,7 @@ trainer-routing smoke test when dependencies permit.
- [ ] Task family, optional subdomain, task name, and runnable IDs are stable
- [ ] Python and config paths share the same task-first hierarchy
- [ ] Environment component and runnable deployment ownership are not mixed
- [ ] Each environment file declares one backend and only matching physics fields
- [ ] A Python task module exists only when the selected route needs it
- [ ] No solution-method directory or same-named task package was introduced
- [ ] Existing components and manager functors were reused where possible
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/add-test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ from embodichain.lab.sim import SimulationManager, SimulationManagerCfg

class TestMySimComponent:
def setup_method(self):
config = SimulationManagerCfg(headless=True, sim_device="cpu")
config = SimulationManagerCfg(headless=True, device="cpu")
self.sim = SimulationManager(config)
# ... setup ...

Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ omit the Python task module. Follow the authoritative
[configuration and registration contract](agent_context/topics/env-framework/configuration.md)
and `/add-task-env` before adding a deployment.

Every inline runnable Gym config and reusable physical environment declares
exactly one `physics: default|newton` backend. An environment component owns
its optional matching `physics_config`; a deployment cannot repeat or override
either field. Launcher `--physics` may confirm the file-owned backend but does
not switch it. Use a separate environment config for each backend.

## Code and validation

- Run **`black==26.3.1`**, using `black .`, before every commit.
Expand Down
63 changes: 46 additions & 17 deletions agent_context/MAP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,38 @@ defaults:
topics:
- id: simulation-system
title: Simulation System
aliases: [simulation system, simulation manager, motion module, sim motion, 运动能力模块, 仿真系统, 仿真管理器]
aliases: [simulation system, simulation manager, Newton physics backend, motion module, sim motion, camera attachment, 运动能力模块, 仿真系统, 仿真管理器]
keywords: [SimulationManager, SimulationManagerCfg, RenderCfg, DLSSCfg, DLSS, frame_time_delta_ms,
offscreen_dlss_enabled, explicit physics stepping, arena, DexSim, ArticulationJointKinematics,
get_parent_joint_chain, enable_gravity]
offscreen_dlss_enabled, explicit physics stepping, arena, DexSim, PhysicsBackendCfg,
DefaultPhysicsCfg, NewtonPhysicsCfg, AutoSolverCfg, DexUniSolverCfg, DexUni, runtime control, deformable, particle set,
ArticulationJointKinematics, get_parent_joint_chain, asset_physics_mode, joint_drive_props, enable_gravity, quaternion, xyzw]
paths: [topics/simulation-system/simulation-system.md]
source_of_truth:
- embodichain/lab/sim/motion/__init__.py
- embodichain/lab/sim/sim_manager.py
- embodichain/lab/sim/__init__.py
- embodichain/lab/sim/cfg.py
- embodichain/lab/sim/cfg/
- embodichain/lab/sim/physics/
- embodichain/lab/sim/spawn/
- embodichain/lab/sim/common.py
- embodichain/lab/sim/_startup_summary.py
- embodichain/lab/sim/_runtime_controls.py
- embodichain/lab/sim/objects/articulation.py
- embodichain/lab/sim/objects/backends/
- embodichain/lab/sim/objects/deformable/
- 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.py, embodichain/lab/sim/objects/,
tests/sim/]
watch_paths: [embodichain/lab/sim/sim_manager.py, embodichain/lab/sim/cfg/, embodichain/lab/sim/physics/,
embodichain/lab/sim/spawn/, embodichain/lab/sim/objects/, 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
- id: env-framework
title: Environment Framework
aliases: [env framework, environment framework, task registration, list task, 环境框架, 任务环境]
keywords: [BaseEnv, EmbodiedEnv, EnvCfg, register_env, list-task, run-env, target_control_frequency,
sim_steps_per_control, step_dt, environment.component, embodiment.component, ControllerAction, EnvProfiler]
sim_steps_per_control, step_dt, environment.component, embodiment.component, file-owned physics backend,
physics_config, ControllerAction, EnvProfiler, startup_summary, dexsim_startup_info]
paths: [topics/env-framework/env-framework.md]
source_of_truth:
- embodichain/cli/main.py
Expand All @@ -41,6 +49,7 @@ topics:
- embodichain/lab/gym/utils/_component_composition.py
- embodichain/lab/gym/utils/registration.py
- embodichain/lab/gym/envs/base_env.py
- embodichain/lab/gym/envs/_startup_summary.py
- embodichain/lab/gym/envs/embodied_env.py
- embodichain/lab/gym/envs/demo.py
- embodichain/lab/gym/utils/profiler.py
Expand Down Expand Up @@ -91,21 +100,23 @@ topics:
- id: robot-system
title: Robot System
aliases: [robot system, robot config, 机器人配置, 机器人系统]
keywords: [RobotCfg, control_parts, build_pk_serial_chain, DexforceW1Cfg, CobotMagicCfg, FrankaPandaCfg,
URRobotCfg, DualArmRobotCfg, merge_robot_cfg, JointDrivePropertiesCfg]
keywords: [RobotCfg, RobotPresetCfg, control_parts, build_pk_serial_chain, DexforceW1Cfg, CobotMagicCfg,
FrankaPandaCfg, URRobotCfg, DualArmRobotCfg, merge_robot_cfg, JointDrivePropertiesCfg,
asset_physics_mode, target_mode, mimic joint, quaternion, xyzw]
paths: [topics/robot-system/robot-system.md]
source_of_truth:
- embodichain/lab/sim/objects/robot.py
- embodichain/lab/sim/robots/
- embodichain/lab/sim/cfg.py
watch_paths: [embodichain/lab/sim/robots/, embodichain/lab/sim/objects/robot.py, embodichain/lab/sim/cfg.py]
- embodichain/lab/sim/cfg/
- embodichain/lab/gym/envs/embodied_env.py
watch_paths: [embodichain/lab/sim/robots/, embodichain/lab/sim/objects/robot.py, embodichain/lab/sim/cfg/]
related_topics: [simulation-system, ik-solvers, motion-planning, sensor-system, sim-visualization, robot-workspace]
status: active
- id: sensor-system
title: Sensor System
aliases: [sensor system, camera attachment, 传感器, 相机挂载]
keywords: [CameraCfg, StereoCameraCfg, ContactSensorCfg, SensorCfg, get_sensor_obs, resolve_parent_nodes,
scatter_contact_data, tiled image]
keywords: [CameraCfg, StereoCameraCfg, ContactSensorCfg, ContactQuery, Newton contact, SensorCfg,
get_sensor_obs, resolve_parent_nodes, scatter_contact_data, tiled image, quaternion, xyzw]
paths: [topics/sensor-system/sensor-system.md]
source_of_truth:
- embodichain/lab/sim/sensors/base_sensor.py
Expand All @@ -122,14 +133,15 @@ topics:
title: Simulation Visualization
aliases: [browser visualization, viser, sim visualization, 仿真可视化]
keywords: [VisualizationCfg, ViserServerCfg, SceneManifest, visualization, EntityGizmoManipulator, robot_ik_gizmo,
GizmoCfg, backpressure, capture_visualization]
GizmoCfg, backpressure, capture_visualization, Newton deformable, particle set, render topology, quaternion, xyzw]
paths: [topics/sim-visualization/sim-visualization.md]
source_of_truth:
- embodichain/lab/visualization/protocol.py
- embodichain/lab/visualization/runtime.py
- embodichain/lab/visualization/
- embodichain/lab/sim/sim_manager.py
- embodichain/lab/sim/objects/gizmo.py
- embodichain/lab/sim/objects/deformable/
- embodichain/lab/scripts/preview_asset.py
watch_paths: [embodichain/lab/visualization/, embodichain/lab/sim/objects/gizmo.py, embodichain/lab/sim/sim_manager.py,
tests/visualization/]
Expand All @@ -140,7 +152,7 @@ topics:
aliases: [motion planning, trajectory planning, motion expansion, trajectory expansion, trajectory augmentation, fixed scene trajectory augmentation, 轨迹扩增, 运动规划, 轨迹规划]
keywords: [BasePlanner, PlanState, PlanResult, MotionGenerator, ToppraPlanner, CuroboPlanner, NeuralPlanner,
expansion, GenerationSession, TrajectoryAugmentationCfg, CandidateTrajectoryBatch,
collision world, compute trajectory, trajectory resampling, trajectory warping]
collision world, compute trajectory, trajectory resampling, trajectory warping, quaternion, xyzw, wxyz]
paths: [topics/motion-planning/motion-planning.md]
source_of_truth:
- embodichain/lab/sim/motion/planners/base_planner.py
Expand All @@ -163,7 +175,8 @@ topics:
title: RL Learning Pipeline
aliases: [rl learning, rl config, reinforcement learning, 强化学习, 训练配置]
keywords: [train-rl, Trainer, trainer.gym_config, learning_env, RolloutKind, DifferentiableTrainer,
PPO, GRPO, APG, SyncCollector]
PPO, GRPO, APG, SyncCollector, ScheduledDifferentiableVecEnv, DifferentiableRolloutSpec,
complete rollout, full horizon, gradient accumulation, action adjoint, observation normalization]
paths: [topics/rl-learning/rl-learning.md]
source_of_truth:
- embodichain/learning/rl/train.py
Expand All @@ -172,12 +185,28 @@ topics:
- embodichain/learning/rl/utils/trainer.py
- embodichain/learning/rl/differentiable_trainer.py
- embodichain/learning/rl/evaluation.py
- embodichain/learning/rl/gradients.py
- embodichain/learning/rl/normalization.py
- embodichain/learning/rl/utils/config.py
- embodichain/learning/rl/algo/
- embodichain_tasks/configs/tasks/
watch_paths: [embodichain/learning/rl/, embodichain_tasks/configs/tasks/, tests/learning/]
related_topics: [simulation-system, env-framework, manager-functor, configclass-pattern]
status: active
- id: differentiable-env
title: Differentiable Environment (APG)
aliases: [differentiable env, DifferentiableEnv, apg, analytic policy gradient, differentiable rl,
Warp tape autograd, NewtonStepFunc, 可微环境]
keywords: [differentiable, gradient, apg, autograd, warp tape, requires_grad, semi_implicit,
DifferentiableEnv, NewtonStepFunc, quaternion, xyzw]
paths: [topics/differentiable-env/differentiable-env.md]
source_of_truth:
- embodichain/lab/gym/envs/differentiable_env.py
- embodichain/lab/sim/cfg/simulation.py
- embodichain/lab/sim/diff/
- embodichain_tasks/embodichain_tasks/special/franka_reach_apg.py
related_topics: [env-framework, rl-learning]
status: active
- id: configclass-pattern
title: Configclass Pattern
aliases: [configclass pattern, 配置类]
Expand Down Expand Up @@ -227,7 +256,7 @@ topics:
title: Embodied Task Program
aliases: [task program, semantic call, 任务程序, 语义调用]
keywords: [TaskProgramCfg, program.yaml, integration.yaml, scene_binding, SceneManifest, SkillPolicyPreset,
EffectAssurance, CompiledTaskProgram, TaskProgramDemoBridge, execution_policy]
EffectAssurance, CompiledTaskProgram, TaskProgramDemoBridge, execution_policy, SemanticPose, quaternion_xyzw]
paths: [topics/task-programs/task-programs.md]
source_of_truth:
- embodichain/lab/task_program/
Expand Down
6 changes: 6 additions & 0 deletions agent_context/topics/atomic-actions/atomic-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ a physical effect.
- [Planning and execution](execution.md): invocation resolution, control grid, row-local recovery and verification.
- [Articulation geometry](articulation-geometry.md): topology/mesh ownership and directional affordance contracts.

The `scripts/tutorials/atomic_action/place.py` tutorial configures matching
Newton contact stiffness and damping on the cube and gripper collision links
before `SimulationManager.prepare()`. MuJoCo-Warp's default response is too
compliant for this force-closure replay and otherwise lets the cube slip near
its pickup pose instead of reaching the place target.

## Semantic integration boundary

`semantics` contains:
Expand Down
97 changes: 97 additions & 0 deletions agent_context/topics/differentiable-env/differentiable-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# differentiable-env

> Topic: Newton-backed kinematic environments for analytic policy gradient
> (APG) through the Warp-tape ↔ PyTorch-autograd bridge.

## Public entry point

Use
`embodichain.lab.gym.envs.differentiable_env.DifferentiableEnv`.
It inherits `EmbodiedEnv`, preserves its scene lifecycle, and replaces the
normal physics step with a task-defined kinematics callback recorded on a
Warp tape.

The resolution path is:

DifferentiableEnv.step(action)
→ NewtonStepFunc.apply(action, sim_state)
→ _apply_action_kernel(action_wp, tape)
→ _make_kinematic_step_fn()()
→ _read_outputs(final_state)
→ Warp tape backward → action.grad

## Invariants

- The configured physics backend must be `NewtonPhysicsCfg`.
- `NewtonPhysicsCfg.requires_grad` must be `True`.
- Default physics and other backends fail during `DifferentiableEnv`
construction.
- `DifferentiableEnv` always supplies a named kinematics callback; its bridge
contract has no dynamics mode, solver substeps, or control buffer.
- The environment never invokes the configured Newton solver or collision
pipeline.
- Newton gradient configuration still selects the semi-implicit solver, but
`DifferentiableEnv` never advances it.
- Gradient mode disables Newton CUDA graph capture.

## Subclass contract

Task authors implement three hooks:

- `_apply_action_kernel(action_wp, tape)` launches Warp work that maps the
PyTorch action bridge array into task-owned kinematic state.
- `_make_kinematic_step_fn()` returns a zero-argument callback such as
`newton.eval_fk(...)`. The callback returns the state consumed by the output
hook.
- `_read_outputs(final_state)` returns `obs`, `reward`, `terminated`, and
`truncated`, plus `_order` and `_grad_track` metadata used by
`NewtonStepFunc`.

There is no public `_apply_dynamics_action_kernel` or
`differentiable_step_mode` extension point. Differentiable dynamics are a
future feature, not a `DifferentiableEnv` capability.

## Autograd and reset rules

Action, kinematics, and gradient-producing output kernels must execute while
the Warp tape is open. Each tracked output names its backing Warp array in
`_grad_track`; an output mapped to `None` does not seed Warp backward.

A grad-tracked terminal step returns the terminal observation and exposes
`requires_reset_after_backward` plus `deferred_reset_ids` in `info`. Reset
those rows only after backward. A no-grad terminal step resets them
synchronously.

## Franka reference task

`embodichain_tasks.special.franka_reach_apg.FrankaReachApgEnv` is the canonical
example. Its path is:

action → new_joint_q → newton.eval_fk → body_q → reward kernel → action.grad

The task snapshots live joint positions before opening the tape and writes the
detached next joint state back after the bridge returns. It does not exercise
Newton dynamics.

## Dynamics boundary

The public differentiable package exposes no solver stepper, trajectory, or
gradient-rollout API. Add those capabilities as a separate future design when
Newton dynamics are ready for end-to-end validation.

## Source of truth

- `embodichain/lab/gym/envs/differentiable_env.py`
- `embodichain/lab/sim/cfg/simulation.py`
- `embodichain/lab/sim/diff/`
- `embodichain_tasks/embodichain_tasks/special/franka_reach_apg.py`

## Focused validation

- `tests/gym/envs/test_differentiable_embodied_env.py`
- `tests/sim/test_sim_manager_cfg.py`

## Related topics

- env-framework
- rl-learning
Loading
Loading