diff --git a/README.md b/README.md
index f1745c6..666afaf 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,8 @@ All four covers are **AI-generated editorial illustrations**, not footage, measu
## Latest study
+[Installing a Skillspace on a simulated arm](reports/Installing%20a%20Skillspace%20on%20a%20simulated%20arm.md) publishes the first public-link-to-execution product path. A local installer binds DVIDIA task metadata to one authored native-contact placement controller. The same controller completes six changed scenes; no-motion and identical arm commands with open jaws each complete 0/6. [Run the local lab, inspect the source or replay the arm](topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md). This virtual box/arm profile has no learned video policy or physical qualification.
+
[Offline cable training environment](reports/Offline%20cable%20training%20environment.md) publishes the first executable practice-to-pack loop. The selected controller and fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. The selected controller did not outperform the baseline. [Run the source, open its replay or inspect the pack](topics/physical-grounding/runs/2026-10-07-cable-env/README.md). This remains an ideal-attachment, privileged-state CPU simulation prototype.
[Fast accurate robot training simulation](reports/Fast%20accurate%20robot%20training%20simulation.md) translates observation-to-skill research into an offline training-environment design. The published [contact fixture](topics/physical-grounding/runs/2026-10-07-contact-fixture/) contains byte-identical benchmark code and recorded outputs for 54 CPU trials. Contact-force fidelity, deformable calibration, GPU throughput and physical transfer remain separate gates.
@@ -49,7 +51,7 @@ npm test
python3 -m http.server 8201 --directory docs
```
-Open `http://localhost:8201`. Edit report Markdown and `publications.json` for publications; edit topic metadata and bibliographies for questions. `npm run build` generates the topic catalog, seven publication readers, four topic readers, portable downloads, RSS and sitemap. Commit source edits and generated output. The static `docs/` directory supports the custom research subdomain and a subfolder preview through relative links. Validation checks references, safe links, source provenance and deterministic output.
+Open `http://localhost:8201`. Edit report Markdown and `publications.json` for publications; edit topic metadata and bibliographies for questions. `npm run build` generates the topic catalog, eight publication readers, four topic readers, portable downloads, RSS and sitemap. Commit source edits and generated output. The static `docs/` directory supports the custom research subdomain and a subfolder preview through relative links. Validation checks references, safe links, source provenance and deterministic output.
The journal lists actual research footprints and distinguishes source reviews, proposed protocols and executed fixtures. DVIDIA is the publisher and `hello@dvidia.org` is the team contact. Individual contributor attribution is intentionally empty pending confirmation; `@IAMMRRIVR` is a general follow link, not an asserted author identity. Raw authenticated research sessions, environment files and private execution paths are excluded from the public archive.
diff --git a/docs/downloads/reports/Installing a Skillspace on a simulated arm.md b/docs/downloads/reports/Installing a Skillspace on a simulated arm.md
new file mode 100644
index 0000000..6af9f91
--- /dev/null
+++ b/docs/downloads/reports/Installing a Skillspace on a simulated arm.md
@@ -0,0 +1,37 @@
+# From public skill metadata to a contact-based arm execution
+
+Research note, 7 October 2026. The current bridge makes a narrow part of the proposed skill workflow executable: import a DVIDIA skill envelope, install an explicitly authored local simulation adapter, create a scene, and run an articulated arm. It provides a concrete place to investigate observation-to-simulation-to-skill packaging. It does not yet infer an executable policy, object geometry, material properties, or robot calibration from human video.
+
+The public example is [DVIDIA place_cup](https://dvidia.org/store/dvidia/place_cup), whose metadata is served at [place_cup/skill.json](https://dvidia.org/packs/dvidia/place_cup/skill.json). The recorded 360-byte source is `vdia:0`, version `0.3.0`, with task “Set a cup on the mark.” Its exact-byte SHA-256 is `16b4e1ef0f3799345c1d18ce9f1da83b072863ab00ce30a83424080fb467d4ec`. The envelope declares a demonstration count, recording format and robot identifier; these declarations do not supply trajectories, observations, trained weights, or an evaluated controller. The installation receipt preserves the source bytes, URL, source hash, separate grounding hash, adapter identity and `physical_robot_ready: false`. A later download may differ; its receipt must identify its own bytes.
+
+In the local studio, one click installs the compatible public envelope and binds `contact-pick-place-box-v0` to `dvidia-authored-6dof-parallel-jaw-v0`. A bundled envelope supports installation without fetching the public site. JSON upload/drop accepts the supported DVIDIA formats. Missing grounding is supplied through a visible, locally authored adapter; inline grounding remains separately validated. Installation downloads metadata and executes the already installed local controller. Object and target coordinates belong to the scene and can change between executions. The browser displays recorded native simulation poses rather than inventing an object trajectory. Execution and replay are designed to work with installed dependencies and local assets; the broader product's air-gapped deployment remains a separate validation task.
+
+The embodiment is an original six-hinge arm with two actuated sliding jaws. Native MuJoCo 3.15.0 simulates a free rigid box, gravity and jaw/object/table contact. The default proxy is a 40 mm cube weighing 40 g on a table at 0.29 m. No weld, mocap attachment, or object-state update carries the object during execution. Arm controls use bounded position servos, model-based bias compensation and current-state damped Jacobian control. The declared limits are 40 N·m per arm actuator and 15 N per jaw. Physics uses a 1 ms timestep, implicitfast integration, Newton solving and an elliptic Coulomb friction cone. These choices describe an authored fixture, not measured hardware or calibrated material fidelity.
+
+Contact provenance matters. At equal geometry priority, MuJoCo mixes sliding friction by taking the maximum, as described in its [contact-parameter documentation](https://mujoco.readthedocs.io/en/stable/modeling.html#contact-parameters). Consequently jaw/object friction is `max(1.0, object_friction)` and table/object friction is `max(0.8, object_friction)`; lowering the object parameter below those floors does not produce a low-friction grasp. Only the jaws, object and table collide. Arm links and palm are collision-excluded, so obstacle avoidance and self-collision are unqualified. Observations expose simulator positions, velocities and contacts directly. The controller has no camera perception, tactile sensor model, cup handle geometry, deformable object, or learned recovery policy. A cup-labelled envelope currently selects a declared box proxy.
+
+Success requires bilateral loaded jaw contact, a table-free lift of at least 55 mm retained for 100 ms, subsequent open jaws with no object contact, and a hand at least 100 mm above the object. The object must contact the table, remain within its target tolerance, have linear speed below 35 mm/s and angular speed below 0.3 rad/s, and satisfy the complete condition for the declared dwell, normally 250 ms. Textual engine warnings and native warning counters invalidate execution. A 0.56 m radial guard supplements rectangular placement bounds. Qualification should include identical arm-command replay with open jaws, deliberate release, varied scene positions and contact/retention traces. Changing seeds with scene jitter disabled is repetition, not new scene coverage. Full accepted-domain reach checks, contact calibration, perception and physical robot transfer remain pending.
+
+
+## Frozen scene evaluation
+
+The six-layout protocol was fixed in source before evaluation, using the same authored controller with no parameter training. It covers six different object/target coordinate pairs. The default and two layout families had been exercised during development, so these results are regression and scene-variation evidence rather than a claim of unseen generalization. Seeds 400–405 label the runs; jitter is disabled, and additional seeds alone would not create new physical layouts.
+
+| Scene | Outcome | Final target error (mm) | Object lift (mm) | Active simulation (s) | Episode wall (s) |
+|---|---|---:|---:|---:|---:|
+| default | success | 0.286 | 128.9 | 11.310 | 0.642 |
+| cross_right | success | 0.400 | 128.2 | 13.356 | 0.739 |
+| cross_left | success | 0.353 | 124.1 | 11.334 | 0.567 |
+| forward | success | 0.329 | 129.0 | 11.591 | 0.616 |
+| reverse | success | 0.330 | 124.7 | 13.594 | 0.684 |
+| wide | success | 0.437 | 127.7 | 12.715 | 0.665 |
+
+Placement completed **6/6** scenes; no-motion and replayed joint commands with the jaws held open each completed **0/6**. The open-jaw replay uses the successful run's exact joint targets, forcing an 80 mm jaw gap and holding the last command if the control horizon is longer. It provides a contact-coupling control, not the same object trajectory. Each failed control exhausts its 18-second horizon. Placement totals 73.90 active simulated seconds in 3.91 wall seconds, approximately 18.9×, on Apple M5 CPU. Wall time includes model compilation, reset/settling, IK, physics, observations and trace collection. UI, process startup, installation and output I/O are excluded. Another test process was running during this local measurement. No GPU throughput or minimum-memory requirement was measured.
+
+Three of the qualified scene layouts also completed under macOS's process-level network-denial sandbox, after a native libc connection self-test returned EPERM. This tests installed runtime on this host and repeats existing layouts. It does not test downloading dependency wheels into an air-gapped server. An extracted-source reproduction, using the preinstalled pinned dependencies, matched all recorded control frames, commanded actions and final diagnostics exactly after JSON normalization for the first three placement scenes. Sixty-five distinct tests cover native contact execution, installation/HTTP boundaries, provenance integrity and the existing cable foundation.
+
+## Product and evidence
+
+The public release provides a [standalone arm replay](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html), an [executable source adapter archive](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip), [full control evidence, gzip JSON](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz), [compact metrics](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json), [integrity manifest](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json), [reproduction receipt](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json), [native offline receipt](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json), and a [local product guide](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md). The replay samples recorded observations every 100 ms; full evidence retains 20 ms control observations and action commands. Hashes establish content consistency, not publisher authenticity or physical competence.
+
+This implements the link-to-compatible-arm execution path within an explicit simulated skill space. The environment supplies metric object/target state, the installed adapter converts current state into joint/jaw actions, and the verifier checks the resulting object state. The initial thesis's spatial operating region becomes a bounded task contract; feedback supplies the missing connection between a skill name and effective movement. Demonstrations becoming learned policies, calibrated objects, realistic perception, repair policies and robot-specific physical qualification remain the next capability gates.
diff --git a/docs/downloads/topics/physical-grounding/README.md b/docs/downloads/topics/physical-grounding/README.md
index e0f6b0b..ab60ff1 100644
--- a/docs/downloads/topics/physical-grounding/README.md
+++ b/docs/downloads/topics/physical-grounding/README.md
@@ -1,5 +1,9 @@
# Physical grounding
+## Skillspace link to articulated arm — 7 October 2026
+
+[Installing a Skillspace on a simulated arm](../../reports/Installing%20a%20Skillspace%20on%20a%20simulated%20arm.md) publishes a one-click local installer, authored placement adapter and native articulated-arm environment. The same controller completes 6/6 changed layouts; no-motion and replayed joint commands with jaws held open each complete 0/6. Three layouts repeat successfully under native network denial. [Local product guide and source](runs/2026-10-07-skillspace-arm/PRODUCT.md). DVIDIA metadata provides task identity, not a learned policy; the box proxy, privileged state and collision-excluded arm links bound the result.
+
## Runnable cable environment — 7 October 2026
[Offline cable training environment](../../reports/Offline%20cable%20training%20environment.md) publishes the first practice-to-pack prototype: native CPU cable dynamics, local controller search, frozen simulated evaluation, replay and hashed export. The selected controller and fixed feedback baseline both completed 10/10 held-out episodes; zero-force and release controls completed 0/10. Search did not improve held-out completion. A separate native macOS network-denial check completed 3/3 additional episodes. [Runnable archive and instructions](runs/2026-10-07-cable-env/README.md). Ideal endpoint attachment and privileged state remain explicit; this is not the retrieval baseline, physical gripping, calibrated rope accuracy or GPU qualification.
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/ARM_RESEARCH.md b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/ARM_RESEARCH.md
new file mode 100644
index 0000000..6af9f91
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/ARM_RESEARCH.md
@@ -0,0 +1,37 @@
+# From public skill metadata to a contact-based arm execution
+
+Research note, 7 October 2026. The current bridge makes a narrow part of the proposed skill workflow executable: import a DVIDIA skill envelope, install an explicitly authored local simulation adapter, create a scene, and run an articulated arm. It provides a concrete place to investigate observation-to-simulation-to-skill packaging. It does not yet infer an executable policy, object geometry, material properties, or robot calibration from human video.
+
+The public example is [DVIDIA place_cup](https://dvidia.org/store/dvidia/place_cup), whose metadata is served at [place_cup/skill.json](https://dvidia.org/packs/dvidia/place_cup/skill.json). The recorded 360-byte source is `vdia:0`, version `0.3.0`, with task “Set a cup on the mark.” Its exact-byte SHA-256 is `16b4e1ef0f3799345c1d18ce9f1da83b072863ab00ce30a83424080fb467d4ec`. The envelope declares a demonstration count, recording format and robot identifier; these declarations do not supply trajectories, observations, trained weights, or an evaluated controller. The installation receipt preserves the source bytes, URL, source hash, separate grounding hash, adapter identity and `physical_robot_ready: false`. A later download may differ; its receipt must identify its own bytes.
+
+In the local studio, one click installs the compatible public envelope and binds `contact-pick-place-box-v0` to `dvidia-authored-6dof-parallel-jaw-v0`. A bundled envelope supports installation without fetching the public site. JSON upload/drop accepts the supported DVIDIA formats. Missing grounding is supplied through a visible, locally authored adapter; inline grounding remains separately validated. Installation downloads metadata and executes the already installed local controller. Object and target coordinates belong to the scene and can change between executions. The browser displays recorded native simulation poses rather than inventing an object trajectory. Execution and replay are designed to work with installed dependencies and local assets; the broader product's air-gapped deployment remains a separate validation task.
+
+The embodiment is an original six-hinge arm with two actuated sliding jaws. Native MuJoCo 3.15.0 simulates a free rigid box, gravity and jaw/object/table contact. The default proxy is a 40 mm cube weighing 40 g on a table at 0.29 m. No weld, mocap attachment, or object-state update carries the object during execution. Arm controls use bounded position servos, model-based bias compensation and current-state damped Jacobian control. The declared limits are 40 N·m per arm actuator and 15 N per jaw. Physics uses a 1 ms timestep, implicitfast integration, Newton solving and an elliptic Coulomb friction cone. These choices describe an authored fixture, not measured hardware or calibrated material fidelity.
+
+Contact provenance matters. At equal geometry priority, MuJoCo mixes sliding friction by taking the maximum, as described in its [contact-parameter documentation](https://mujoco.readthedocs.io/en/stable/modeling.html#contact-parameters). Consequently jaw/object friction is `max(1.0, object_friction)` and table/object friction is `max(0.8, object_friction)`; lowering the object parameter below those floors does not produce a low-friction grasp. Only the jaws, object and table collide. Arm links and palm are collision-excluded, so obstacle avoidance and self-collision are unqualified. Observations expose simulator positions, velocities and contacts directly. The controller has no camera perception, tactile sensor model, cup handle geometry, deformable object, or learned recovery policy. A cup-labelled envelope currently selects a declared box proxy.
+
+Success requires bilateral loaded jaw contact, a table-free lift of at least 55 mm retained for 100 ms, subsequent open jaws with no object contact, and a hand at least 100 mm above the object. The object must contact the table, remain within its target tolerance, have linear speed below 35 mm/s and angular speed below 0.3 rad/s, and satisfy the complete condition for the declared dwell, normally 250 ms. Textual engine warnings and native warning counters invalidate execution. A 0.56 m radial guard supplements rectangular placement bounds. Qualification should include identical arm-command replay with open jaws, deliberate release, varied scene positions and contact/retention traces. Changing seeds with scene jitter disabled is repetition, not new scene coverage. Full accepted-domain reach checks, contact calibration, perception and physical robot transfer remain pending.
+
+
+## Frozen scene evaluation
+
+The six-layout protocol was fixed in source before evaluation, using the same authored controller with no parameter training. It covers six different object/target coordinate pairs. The default and two layout families had been exercised during development, so these results are regression and scene-variation evidence rather than a claim of unseen generalization. Seeds 400–405 label the runs; jitter is disabled, and additional seeds alone would not create new physical layouts.
+
+| Scene | Outcome | Final target error (mm) | Object lift (mm) | Active simulation (s) | Episode wall (s) |
+|---|---|---:|---:|---:|---:|
+| default | success | 0.286 | 128.9 | 11.310 | 0.642 |
+| cross_right | success | 0.400 | 128.2 | 13.356 | 0.739 |
+| cross_left | success | 0.353 | 124.1 | 11.334 | 0.567 |
+| forward | success | 0.329 | 129.0 | 11.591 | 0.616 |
+| reverse | success | 0.330 | 124.7 | 13.594 | 0.684 |
+| wide | success | 0.437 | 127.7 | 12.715 | 0.665 |
+
+Placement completed **6/6** scenes; no-motion and replayed joint commands with the jaws held open each completed **0/6**. The open-jaw replay uses the successful run's exact joint targets, forcing an 80 mm jaw gap and holding the last command if the control horizon is longer. It provides a contact-coupling control, not the same object trajectory. Each failed control exhausts its 18-second horizon. Placement totals 73.90 active simulated seconds in 3.91 wall seconds, approximately 18.9×, on Apple M5 CPU. Wall time includes model compilation, reset/settling, IK, physics, observations and trace collection. UI, process startup, installation and output I/O are excluded. Another test process was running during this local measurement. No GPU throughput or minimum-memory requirement was measured.
+
+Three of the qualified scene layouts also completed under macOS's process-level network-denial sandbox, after a native libc connection self-test returned EPERM. This tests installed runtime on this host and repeats existing layouts. It does not test downloading dependency wheels into an air-gapped server. An extracted-source reproduction, using the preinstalled pinned dependencies, matched all recorded control frames, commanded actions and final diagnostics exactly after JSON normalization for the first three placement scenes. Sixty-five distinct tests cover native contact execution, installation/HTTP boundaries, provenance integrity and the existing cable foundation.
+
+## Product and evidence
+
+The public release provides a [standalone arm replay](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html), an [executable source adapter archive](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip), [full control evidence, gzip JSON](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz), [compact metrics](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json), [integrity manifest](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json), [reproduction receipt](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json), [native offline receipt](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json), and a [local product guide](https://research.dvidia.org/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md). The replay samples recorded observations every 100 ms; full evidence retains 20 ms control observations and action commands. Hashes establish content consistency, not publisher authenticity or physical competence.
+
+This implements the link-to-compatible-arm execution path within an explicit simulated skill space. The environment supplies metric object/target state, the installed adapter converts current state into joint/jaw actions, and the verifier checks the resulting object state. The initial thesis's spatial operating region becomes a bounded task contract; feedback supplies the missing connection between a skill name and effective movement. Demonstrations becoming learned policies, calibrated objects, realistic perception, repair policies and robot-specific physical qualification remain the next capability gates.
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md
new file mode 100644
index 0000000..a322e53
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md
@@ -0,0 +1,81 @@
+# DVIDIA Simulation Lab
+
+## Skillspace link → install → arm execution
+
+The local Skillspace lab now accepts a public DVIDIA store link such as `https://dvidia.org/store/dvidia/place_cup`. Click **Install skill**, create an environment by setting the object and target coordinates, then **Run installed skill**. The same installed controller can execute in a changed scene. Installations persist on disk and reload without downloading the source again.
+
+```sh
+.venv/bin/python -m simlab.studio
+# Open http://127.0.0.1:8240/
+```
+
+The installer downloads the public task envelope, preserves its exact bytes/hash and binds a locally authored placement controller to one original six-joint, parallel-jaw simulation profile. DVIDIA's existing metadata exports have no trained robot policy. The tool supports `place_cup` and `place_object`; the first implementation explicitly represents them with a rigid box proxy. Unsupported skills, unreachable positions and incompatible profiles produce a reason instead of execution.
+
+The arm uses native MuJoCo joint actuators and real jaw/object/table contacts. It lifts a free object, carries it, opens its jaws, retreats, and checks stable placement. No object teleport, weld or mocap carries the object. The browser renders actual recorded poses with a simplified link view. Success requires a retained bilateral grasp and lift, released object, table support, hand clearance and 250 ms of stable target dwell. Arm link/palm collisions are excluded; camera perception, cup geometry, physical hardware and demonstration-based policy learning remain unqualified.
+
+Run the whole lab with `--offline` to disable new URL downloads. **Install bundled source · offline** and JSON drop still work. Physics executes in one isolated CPU worker with Python socket calls denied; the loopback browser/server connection stays available. A separate installed-runtime test under macOS's native `(deny network*)` sandbox completed three distinct scene layouts after a direct libc connection was denied with `EPERM`. This repeats qualified layouts and does not test air-gapped dependency installation.
+
+The frozen six-layout protocol completed **6/6 placements**; no-motion and identical joint-command replay with jaws held open each completed **0/6**. Successful runs totalled 73.90 simulated seconds in 3.91 episode wall seconds on Apple M5 CPU, about 18.9×, including compilation/reset, controller, physics and trace collection. These are bounded workload measurements recorded while another test process ran; UI, process startup, installation and file I/O are excluded. All scenes use a 40 mm, 40 g box and authored contact parameters. Changing seeds with jitter disabled repeats a scene; the six configurations differ in object and target positions.
+
+```sh
+.venv/bin/python -m simlab.arm_runner install --url https://dvidia.org/store/dvidia/place_cup
+.venv/bin/python -m simlab.arm_runner run INSTALLATION_ID --output runs/placement
+.venv/bin/python -m simlab.arm_qualify --output runs/arm-v0
+/usr/bin/sandbox-exec -p '(version 1) (allow default) (deny network*)' .venv/bin/python -m simlab.arm_native_offline_check runs/arm-native-offline
+```
+
+See `runs/arm-v0/` for full control traces/action commands, sampled standalone replay and an integrity-checked source adapter archive. See [ARM_RESEARCH.md](ARM_RESEARCH.md) for the installation contract, source provenance, effective friction floors and remaining research. This is the first working link-to-execution product path, limited to its declared virtual arm and placement adapter. A physical robot needs calibrated embodiment/sensing and measured qualification before any motor driver is connected.
+
+## Cable training foundation
+
+A local training environment, episode runner and inspectable skill-pack export. The first task, `CableEndReach-v0`, bends an anchored cable by applying bounded world-frame forces at its actual terminal site. Native MuJoCo performs the dynamics. A small feedback controller uses the measured simulator state; local cross-entropy search can train its proportional, damping and gravity-bias parameters.
+
+This is a **simulation-only prototype** with ideal endpoint attachment and privileged simulator observations. It does not model gripping jaws, slipping/regrasping, cameras, tactile sensors, rope stretch or shoe knots. Authored elasticity/contact coefficients have not been calibrated to a physical lace. Its downloadable pack is compatible with this declared simulation profile; it is not a qualified physical-robot controller.
+
+## Run locally
+
+Python 3.12, MuJoCo 3.15.0 and NumPy 2.5.3 are pinned. The first build was exercised on Apple M5/arm64 with no GPU or renderer. Use the existing isolated environment here, or install the lock file once on another server:
+
+```sh
+python3.12 -m venv .venv
+.venv/bin/python -m pip install -r requirements.lock.txt
+.venv/bin/python -m simlab run --seeds 0,1,2 --offline --output runs/demo
+.venv/bin/python -m simlab train --seeds 0,1,2 --eval-seeds 200,201,202 --offline --output runs/training
+.venv/bin/python -m simlab verify-pack runs/training/skill-pack.zip
+.venv/bin/python -m unittest discover -s tests -v
+.venv/bin/python -m simlab.qualify runs/release-v0
+```
+
+`run` exports `run.json`, `policy.json`, `RESULTS.md`, a self-contained `replay.html`, and `skill-pack.zip`. Open the HTML directly in a browser: playback, episode selection, frame scrubbing and view rotation work without a server or network. An optional local server can serve the saved outputs; it is not needed for training. `train` records every candidate, keeps training and evaluation seeds disjoint, freezes its selected parameters, and evaluates the held-out suite once. These are explicit controller parameters, not vision-language weights.
+
+For air-gapped installation, pre-stage wheels for the matching Python/OS/architecture using `pip download -r requirements.lock.txt -d wheelhouse`, then install with `--no-index --find-links wheelhouse`. That installation procedure remains untested on an air-gapped machine. The runtime contains no hosted inference, online asset loader, telemetry or credentials. `--offline` denies Python socket construction, DNS and connections during execution and records an intentional guard self-test. It does not intercept native C networking.
+
+## Environment contract
+
+`Config` declares SI units, 1 ms physics steps, 20 ms controls, a six-second horizon, 25 mm goal tolerance and 200 ms continuous dwell. Default force commands have a two-newton norm bound. Seeded variations cover cable length, radius, density, bending/twisting coefficients and target jitter within an authored profile. Goals must require movement and pass a conservative reach test. The settled tip defines the local goal offset; a target is not teleported to the cable.
+
+`reset(seed)` returns observations and provenance. `step(force_xyz)` advances real dynamics and returns observations, reward, termination/truncation and diagnostics. Reward does not establish success: the actual terminal point must remain in the target throughout the dwell period. Invalid actions are rejected before mutation. Divergence, solver warnings, invalid workspace, rejected starts and horizon exhaustion cannot become successful episodes.
+
+Snapshots preserve MuJoCo's complete integration state, plugin state, target and task counters. Restoring a snapshot validates its configuration and generated scene. The first implementation serializes its own MuJoCo callback sections because warning callbacks are process-global; it does not claim threaded world batching.
+
+## Evidence and cost boundaries
+
+The runner stores per-seed outcomes, complete sampled traces, scene/configuration hashes, authored material parameters, solver warnings, dependency versions and memory/timing observations. Episode wall time includes construction, reset/settling, policy, dynamics, observations and trace collection. Control-loop latency excludes reset and trace append. Output I/O, visualization and installation are reported outside those clocks. Peak RSS is the process's lifetime maximum, not a minimum memory requirement.
+
+The exported archive includes the exact Python source, dependency lock, controller parameters, fixed evaluation results and a SHA-256 manifest. Verification detects altered artifacts and inconsistent qualification counts. It establishes content consistency, not publisher authenticity or physical competence. The archive does not bundle dependency wheels; prepare those separately for offline installation.
+
+The frozen qualification trained nine parameter candidates on three seeds each, then evaluated the selected controller on ten distinct seeds. Trained and baseline feedback each passed 10/10; zero force and early release each passed 0/10. Baseline feedback completed in 4.18 cumulative active simulated seconds and the trained controller in 4.56 seconds. The small training-score improvement did not improve held-out success or completion time. The complete local qualification took 22.81 wall seconds including training, comparisons and numerical probes. These are workload-specific CPU measurements.
+
+See `runs/release-v0/` for the final frozen run and `runs/release-v0/qualification.json` for the full protocol. `reproduction.json` records an unpacked-pack replay on seeds 200–202 with exact trace and final-diagnostic agreement using the preinstalled dependencies. Earlier `runs/` directories are development executions. The original [contact fixture](README.md) and its recorded results remain separate and unchanged.
+
+The installed runtime also passed three new seeds under macOS's native network-denial policy. A direct libc connection self-test returned `EPERM`, confirming the policy was active before rollouts. This is stronger than the Python-only guard for this tested host; it still does not establish another OS or air-gapped installation. Reproduce on macOS with:
+
+```sh
+/usr/bin/sandbox-exec -p '(version 1) (allow default) (deny network*)' .venv/bin/python -m simlab.native_offline_check runs/native-offline
+```
+
+## Next capability gates
+
+The current product establishes an offline author-to-practice-to-pack path. Next, add measured bend/twist and force calibration, contact-based jaws with slipping/regrasping, a known eyelet fixture, and realistic observations. Qualify a GPU backend with the same task semantics and frozen action tapes before measuring batch throughput. Independent rollout processes can then be sharded across owned GPUs/servers; this first build has no GPU backend or cluster scheduler. Physical task success requires calibrated hardware trials and a separate compatibility manifest.
+
+Original product code uses MIT. Dependencies retain their own licenses; no dependency code or weights are bundled. The cable implementation builds on the installed MuJoCo cable plugin and its generated MJCF API.
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/examples/arm_place_skillspace.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/examples/arm_place_skillspace.json
new file mode 100644
index 0000000..f5dca23
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/examples/arm_place_skillspace.json
@@ -0,0 +1,65 @@
+{
+ "format": "dvidia-contribution-brief",
+ "schemaVersion": 1,
+ "state": "local-proposal",
+ "skillspaceTitle": "Tabletop placement simulation",
+ "brief": {
+ "id": "brief-00000000-0000-4000-8000-000000000001",
+ "skillspaceId": "space-00000000-0000-4000-8000-000000000001",
+ "version": 1,
+ "taskId": "task-00000000-0000-4000-8000-000000000001",
+ "taskTitle": "Place an object",
+ "goal": "In an authored simulation, pick up a free box with contacting parallel jaws, transfer it to the mark, release it onto the table, and verify that it remains there. This is a box placement fixture, not a cup model or a video-derived robot policy.",
+ "captureChecklist": [
+ "The scene coordinates and authored controller are declared in simulation_grounding.",
+ "No human recording, permission grant, trained policy, or physical robot evaluation accompanies this fixture."
+ ],
+ "creatorHandle": "",
+ "createdAt": "2026-10-07T00:00:00.000Z"
+ },
+ "creatorIdentity": "self-declared-local",
+ "permissions": {
+ "publicReuseGranted": false,
+ "contributorPermissionRequired": true
+ },
+ "commercialProposal": {
+ "status": "draft",
+ "premium": "paid",
+ "price": null,
+ "necklace": "planned-included",
+ "hardware": "TBA",
+ "proposedFounderShareBps": 8000,
+ "revenueDenominator": null,
+ "remainingShareRecipients": null,
+ "contributorPermissionRequired": true,
+ "sourceAccess": "open"
+ },
+ "simulation_grounding": {
+ "schema_version": 1,
+ "task_type": "place_object",
+ "provenance": "authored_simulation_adapter",
+ "adapter_id": "contact-pick-place-box-v0",
+ "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0",
+ "frame": "world",
+ "units": "m",
+ "language_aliases": ["place an object", "place the object on the mark"],
+ "workspace": {
+ "min": [0.25, -0.20, 0.29],
+ "max": [0.60, 0.20, 0.55]
+ },
+ "table_height": 0.29,
+ "object": {
+ "kind": "box",
+ "position": [0.42, -0.04, 0.31],
+ "size": [0.04, 0.04, 0.04],
+ "mass": 0.04,
+ "friction": 0.8
+ },
+ "target": {
+ "position": [0.54, 0.10, 0.31],
+ "position_tolerance": 0.025,
+ "dwell_seconds": 0.25
+ },
+ "procedure": ["approach", "descend", "close", "lift", "transfer", "place", "release", "retreat", "verify"]
+ }
+}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json
new file mode 100644
index 0000000..370b389
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json
@@ -0,0 +1,8 @@
+{
+ "platform": "macOS sandbox-exec",
+ "policy": "(version 1) (allow default) (deny network*)",
+ "native_connect_self_test": "libc connect to 127.0.0.1:9 denied before rollouts",
+ "errno": 1,
+ "passed": true,
+ "scope": "Installed runtime only. Repeats three qualified scenes under process-level denial; no air-gapped dependency installation or other OS qualification."
+}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/replay.html b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/replay.html
new file mode 100644
index 0000000..690db8b
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/replay.html
@@ -0,0 +1,64 @@
+
+
+
DVIDIA · Skillspace lab
+
+
DVIDIA Skillspace lab
CPU · local execution · simulation v0
+
+
Give the arm a task.
Install a placement skill, create a scene, then watch the arm ground its motion in the object and target positions.
This first adapter uses a box proxy for the placement task, an authored controller and exact simulator observations. Native jaw contacts move the free object. Qualification for a physical robot and training from demonstrations come next.
DVIDIA research · offline skill execution prototype
This first adapter uses a box proxy for the placement task, an authored controller and exact simulator observations. Native jaw contacts move the free object. Qualification for a physical robot and training from demonstrations come next.
DVIDIA research · offline skill execution prototype
+
+
+
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json
new file mode 100644
index 0000000..77c970d
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json
@@ -0,0 +1,31 @@
+{
+ "source_imported_from_extracted_bundle": true,
+ "preinstalled_dependencies": true,
+ "compared": [
+ "trace",
+ "actions",
+ "final_info"
+ ],
+ "comparison_encoding": "JSON-normalized exact values; Python tuples serialize as arrays",
+ "runs": [
+ {
+ "scene_id": "default",
+ "seed": 400,
+ "exact_match": true,
+ "success": true
+ },
+ {
+ "scene_id": "cross_right",
+ "seed": 401,
+ "exact_match": true,
+ "success": true
+ },
+ {
+ "scene_id": "cross_left",
+ "seed": 402,
+ "exact_match": true,
+ "success": true
+ }
+ ],
+ "exact_trace_actions_final_info_match": true
+}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz
new file mode 100644
index 0000000..05ecd11
Binary files /dev/null and b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz differ
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip
new file mode 100644
index 0000000..d9a07d3
Binary files /dev/null and b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip differ
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/source.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/source.json
new file mode 100644
index 0000000..836c0db
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/source.json
@@ -0,0 +1,20 @@
+{
+ "vdia": "0",
+ "skill": "place_cup",
+ "version": "0.3.0",
+ "task": "Set a cup on the mark.",
+ "rail": "physical",
+ "demos": 1,
+ "format": "lerobot/v3",
+ "codebase_version": "v3.0",
+ "robot_type": "dvidia.wrist_room",
+ "cameras": [
+ "ego",
+ "room"
+ ],
+ "residual": {
+ "claimer": 0.5,
+ "contributors": 0.5,
+ "book": "not-live"
+ }
+}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/requirements.lock.txt b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/requirements.lock.txt
new file mode 100644
index 0000000..4e02498
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/requirements.lock.txt
@@ -0,0 +1,10 @@
+absl-py==2.5.0
+etils==1.14.0
+fsspec==2026.9.0
+glfw==2.10.2
+mujoco==3.15.0
+numpy==2.5.3
+PyOpenGL==3.1.10
+typing_extensions==4.16.0
+websockets==17.2
+zipp==4.1.1
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/LICENSE b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/LICENSE
new file mode 100644
index 0000000..a7056f2
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 DVIDIA contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__init__.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__init__.py
new file mode 100644
index 0000000..774bf4c
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__init__.py
@@ -0,0 +1,5 @@
+"""Offline simulation-only task environments; no physical skill qualification."""
+
+from .env import CableEndReachEnv, Config
+
+__all__ = ["CableEndReachEnv", "Config"]
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py
new file mode 100644
index 0000000..4e28416
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py
@@ -0,0 +1,3 @@
+from .cli import main
+
+main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_env.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_env.py
new file mode 100644
index 0000000..aacc09d
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_env.py
@@ -0,0 +1,328 @@
+"""Original six-axis tabletop arm with a native contact-based parallel-jaw grasp.
+
+This authored simulation profile uses privileged state and simplified rigid links.
+It is not calibrated hardware, a learned video policy or a cup/handle model.
+"""
+from __future__ import annotations
+
+from dataclasses import asdict, dataclass
+from contextlib import contextmanager
+import hashlib
+import json
+import math
+
+import mujoco
+import numpy as np
+
+from .env import _NATIVE_LOCK
+
+ARM_PROFILE = "dvidia-authored-6dof-parallel-jaw-v0"
+ADAPTER_ID = "contact-pick-place-box-v0"
+TASK_ID = "ArmPickPlace-v0"
+WORKSPACE_MIN = (0.25, -0.20, 0.29)
+WORKSPACE_MAX = (0.60, 0.20, 0.55)
+JOINT_LIMITS = ((-2.6, 2.6), (-2.2, 1.6), (-2.7, 2.7), (-3.0, 3.0), (-2.8, 2.8), (-3.1, 3.1))
+HOME = (-0.60, -1.10, 0.90, 0.0, 0.20, 0.60)
+JOINT_KP = np.array((400., 400., 350., 100., 100., 80.))
+
+
+@dataclass(frozen=True)
+class ArmConfig:
+ timestep: float = 0.001
+ control_dt: float = 0.02
+ horizon: float = 18.0
+ settle_time: float = 0.4
+ object_position: tuple = (0.42, -0.04, 0.31)
+ target_position: tuple = (0.54, 0.10, 0.31)
+ object_half_size: tuple = (0.02, 0.02, 0.02)
+ object_mass: float = 0.04
+ object_friction: float = 0.8
+ table_height: float = 0.29
+ position_tolerance: float = 0.025
+ dwell_seconds: float = 0.25
+ scene_jitter: float = 0.006
+ joint_torque_limit: float = 40.0
+ jaw_force_limit: float = 15.0
+ gravity: float = 9.81
+
+ def __post_init__(self):
+ for name in ("timestep", "control_dt", "horizon", "settle_time", "joint_torque_limit", "jaw_force_limit", "gravity"):
+ value = getattr(self, name)
+ if isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(value) or value <= 0:
+ raise ValueError(f"{name} must be finite and positive")
+ for numerator, denominator in ((self.control_dt, self.timestep), (self.horizon, self.control_dt), (self.settle_time, self.timestep)):
+ ratio = numerator / denominator
+ if ratio < 1 or not math.isclose(ratio, round(ratio), rel_tol=0, abs_tol=1e-9):
+ raise ValueError("Arm timing ratios must be positive integers")
+ for name, low, high in (("object_mass", .02, .08), ("object_friction", .4, 1.5),
+ ("position_tolerance", .01, .035), ("dwell_seconds", .15, .6),
+ ("scene_jitter", 0., .01)):
+ value = getattr(self, name)
+ if isinstance(value, bool) or not math.isfinite(value) or not low <= value <= high:
+ raise ValueError(f"{name} must lie in [{low}, {high}]")
+ if self.table_height != .29:
+ raise ValueError("This authored arm profile fixes the table height at 0.29 m")
+ half_size = np.asarray(self.object_half_size, dtype=float)
+ if half_size.shape != (3,) or not np.isfinite(half_size).all() or np.any(half_size < .015) or np.any(half_size > .025):
+ raise ValueError("Object full dimensions must lie in [0.03, 0.05] m")
+ object.__setattr__(self, "object_half_size", tuple(half_size.tolist()))
+ for name in ("object_position", "target_position"):
+ values = self._placement(getattr(self, name))
+ object.__setattr__(self, name, tuple(values.tolist()))
+ if np.linalg.norm(np.asarray(self.object_position)[:2] - np.asarray(self.target_position)[:2]) < .075:
+ raise ValueError("A placement task must move the object by at least 0.075 m")
+
+ def _placement(self, value):
+ point = np.asarray(value, dtype=float)
+ if point.shape != (3,) or not np.isfinite(point).all():
+ raise ValueError("Placements must contain three finite world-frame coordinates")
+ if not .25 <= point[0] <= .60 or not -.20 <= point[1] <= .20:
+ raise ValueError("Placement lies outside the authored arm reach envelope")
+ if np.linalg.norm(point[:2]) > .56:
+ raise ValueError("Placement lies outside the raised-tool radial reach envelope (0.56 m)")
+ if abs(point[2] - (self.table_height + self.object_half_size[2])) > .01000001:
+ raise ValueError("Object and target must lie on the table support plane")
+ return point
+
+
+class ArmEnv:
+ def __init__(self, config: ArmConfig | None = None):
+ self.config = config or ArmConfig()
+ if not isinstance(self.config, ArmConfig):
+ raise TypeError("config must be ArmConfig")
+ if mujoco.__version__ != "3.15.0":
+ raise RuntimeError("This authored arm profile requires native MuJoCo 3.15.0")
+ self._ready = False
+
+ @contextmanager
+ def _native(self, messages):
+ with _NATIVE_LOCK:
+ previous = mujoco.get_mju_user_warning()
+ mujoco.set_mju_user_warning(lambda message: messages.append(str(message)))
+ try:
+ yield
+ finally:
+ mujoco.set_mju_user_warning(previous)
+
+ def _xml(self, object_position):
+ c = self.config
+ limits = [f'{low} {high}' for low, high in JOINT_LIMITS]
+ position = ' '.join(map(str, object_position))
+ half_size = ' '.join(map(str, c.object_half_size))
+ actuators = ''.join(f'' for i in range(6))
+ actuators += ''.join(f'' for side in ('left', 'right'))
+ return f'''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {actuators}'''
+
+ def reset(self, seed=0, object_position=None, target_position=None):
+ self._ready = False
+ if not isinstance(seed, int) or isinstance(seed, bool) or seed < 0:
+ raise ValueError("seed must be a nonnegative integer")
+ c = self.config
+ rng = np.random.default_rng(seed)
+ start = np.array(c.object_position if object_position is None else c._placement(object_position), dtype=float)
+ target = np.array(c.target_position if target_position is None else c._placement(target_position), dtype=float)
+ if object_position is None:
+ start[:2] += rng.uniform(-c.scene_jitter, c.scene_jitter, 2)
+ if target_position is None:
+ target[:2] += rng.uniform(-c.scene_jitter, c.scene_jitter, 2)
+ c._placement(start); c._placement(target)
+ if np.linalg.norm(start[:2] - target[:2]) < .075:
+ raise ValueError("A placement task must require nontrivial movement")
+ # Authored reset placement is the only object state initialization.
+ start[2] = c.table_height + c.object_half_size[2] + .002
+ target[2] = c.table_height + c.object_half_size[2]
+ self.seed, self.target = seed, target
+ self.scene_xml = self._xml(start)
+ warnings = []
+ with self._native(warnings):
+ self.model = mujoco.MjModel.from_xml_string(self.scene_xml)
+ self.data = mujoco.MjData(self.model)
+ self.joint_ids = np.array([mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_JOINT, f'j{i}') for i in range(6)])
+ self.joint_qpos = self.model.jnt_qposadr[self.joint_ids]
+ self.joint_dofs = self.model.jnt_dofadr[self.joint_ids]
+ self.jaw_ids = np.array([mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_JOINT, f'jaw_{side}') for side in ('left', 'right')])
+ self.jaw_qpos = self.model.jnt_qposadr[self.jaw_ids]
+ self.data.qpos[self.joint_qpos] = HOME
+ self.data.qpos[self.jaw_qpos] = .04
+ self.tcp_id = mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_SITE, 'tcp')
+ self.object_id = mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_BODY, 'object')
+ self.geom_ids = {name: mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_GEOM, name) for name in ('left_pad_geom', 'right_pad_geom', 'object_geom', 'table')}
+ self.arm_body_ids = [mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_BODY, name) for name in ('base', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5')]
+ self._last_targets, self._last_width = np.array(HOME), .08
+ mujoco.mj_forward(self.model, self.data)
+ for _ in range(round(c.settle_time/c.timestep)):
+ self._controls(self._last_targets, .08)
+ mujoco.mj_step(self.model, self.data)
+ mujoco.mj_forward(self.model, self.data)
+ self.initial_object_position = self.data.xpos[self.object_id].copy()
+ self._elapsed = 0.0
+ self._steps = 0
+ self._dwell = 0.0
+ self._reason = 'running'
+ self._done = False
+ self._grasp_seen = False
+ self._lift_seen = False
+ self._lift_dwell = 0.0
+ self._warnings = list(warnings)
+ self._max_lift = 0.0
+ self._max_pad_force = 0.0
+ self._ready = True
+ if warnings or not self._finite() or any(w.number for w in self.data.warning):
+ self._ready = False
+ raise RuntimeError("Authored arm settling produced invalid physics")
+ return self._observation(), self._info()
+
+ def _controls(self, joint_targets, width):
+ # Model-based gravity feedforward adjusts native position servo targets;
+ # the native actuator's own force cap still bounds every joint torque.
+ compensation = self.data.qfrc_bias[self.joint_dofs] / JOINT_KP
+ limits = np.asarray(JOINT_LIMITS)
+ self.data.ctrl[:6] = np.clip(joint_targets + compensation, limits[:,0], limits[:,1])
+ self.data.ctrl[6:] = width / 2
+
+ def _finite(self):
+ return math.isfinite(float(self.data.time)) and all(np.isfinite(x).all() for x in (self.data.qpos, self.data.qvel, self.data.qacc, self.data.xpos))
+
+ def _contact_state(self):
+ counts = {'left':0, 'right':0, 'table':0}
+ forces = {'left':0.0, 'right':0.0, 'table':0.0}
+ object_geom = self.geom_ids['object_geom']
+ for index, contact in enumerate(self.data.contact[:self.data.ncon]):
+ pair = {int(contact.geom1), int(contact.geom2)}
+ if object_geom not in pair:
+ continue
+ for side, geom in (('left', self.geom_ids['left_pad_geom']), ('right', self.geom_ids['right_pad_geom']), ('table', self.geom_ids['table'])):
+ if geom in pair:
+ force = np.zeros(6)
+ mujoco.mj_contactForce(self.model, self.data, index, force)
+ if force[0] > .01:
+ counts[side] += 1
+ forces[side] += float(force[0])
+ return counts, forces
+
+ def _velocity(self, kind, ident):
+ result = np.zeros(6)
+ mujoco.mj_objectVelocity(self.model, self.data, kind, ident, result, 0)
+ return result
+
+ def _observation(self):
+ if not self._finite():
+ return {'joint_position':[], 'joint_velocity':[], 'end_effector_position':[], 'end_effector_quaternion':[], 'end_effector_velocity':[], 'object_position':[], 'object_quaternion':[], 'object_velocity':[], 'object_angular_velocity':[], 'target_position':self.target.tolist(), 'arm_points':[], 'gripper_points':[], 'object_size':(2*np.asarray(self.config.object_half_size)).tolist(), 'gripper_width':None, 'grasp_contacts':{'left':0,'right':0}, 'table_contacts':0}
+ counts, _ = self._contact_state()
+ ee_quat = np.empty(4)
+ mujoco.mju_mat2Quat(ee_quat, self.data.site_xmat[self.tcp_id])
+ object_velocity = self._velocity(mujoco.mjtObj.mjOBJ_BODY, self.object_id)
+ ee_velocity = self._velocity(mujoco.mjtObj.mjOBJ_SITE, self.tcp_id)
+ return {'joint_position':self.data.qpos[self.joint_qpos].tolist(), 'joint_velocity':self.data.qvel[self.joint_dofs].tolist(),
+ 'end_effector_position':self.data.site_xpos[self.tcp_id].tolist(), 'end_effector_quaternion':ee_quat.tolist(), 'end_effector_velocity':ee_velocity[3:].tolist(),
+ 'object_position':self.data.xpos[self.object_id].tolist(), 'object_quaternion':self.data.xquat[self.object_id].tolist(),
+ 'object_velocity':object_velocity[3:].tolist(), 'object_angular_velocity':object_velocity[:3].tolist(), 'target_position':self.target.tolist(),
+ 'arm_points':np.vstack((self.data.xpos[self.arm_body_ids], self.data.site_xpos[self.tcp_id])).tolist(),
+ 'gripper_points':self.data.geom_xpos[[self.geom_ids['left_pad_geom'],self.geom_ids['right_pad_geom']]].tolist(),
+ 'object_size':(2*np.asarray(self.config.object_half_size)).tolist(), 'gripper_width':float(self.data.qpos[self.jaw_qpos].sum()),
+ 'grasp_contacts':{'left':counts['left'],'right':counts['right']}, 'table_contacts':counts['table']}
+
+ def _info(self):
+ counts, forces = self._contact_state() if self._finite() else ({'left':0,'right':0,'table':0},{'left':0.,'right':0.,'table':0.})
+ return {'task_id':TASK_ID,'arm_profile':ARM_PROFILE,'adapter_id':ADAPTER_ID,'seed':self.seed,'reason':self._reason,
+ 'success':self._reason=='success','valid':self._reason not in ('invalid_state','solver_warning','object_dropped'),
+ 'simulation_time':self._elapsed,'steps':self._steps,'dwell_elapsed':self._dwell,'grasp_seen':self._grasp_seen,'lift_seen':self._lift_seen,
+ 'max_object_lift':self._max_lift,'grasp_contacts':{'left':counts['left'],'right':counts['right']},'pad_normal_forces':{'left':forces['left'],'right':forces['right']},
+ 'table_contacts':counts['table'],'max_pad_normal_force':self._max_pad_force,'target_distance':float(np.linalg.norm(self.data.xpos[self.object_id]-self.target)) if self._finite() else None,
+ 'warnings':list(self._warnings),'lift_dwell_elapsed':self._lift_dwell,
+ 'effective_sliding_friction':{'jaw_object':max(1.,self.config.object_friction),'table_object':max(.8,self.config.object_friction),'mixing':'maximum at equal geom priority'},
+ 'initial_object_position':self.initial_object_position.tolist(),'qualification':'simulation-only','observations':'privileged simulator state',
+ 'actuation':'six bounded joint position servos and two bounded jaw servos','object_profile':'rigid box; unqualified proxy for cup skills',
+ 'collision_profile':'jaws/object/table enabled; arm links and palm collision-excluded; no selfcollision qualification',
+ 'config':asdict(self.config),'engine':mujoco.__version__,'scene_sha256':hashlib.sha256(self.scene_xml.encode()).hexdigest()}
+
+ def joint_targets_for_pose(self, position):
+ position = np.asarray(position, dtype=float)
+ if position.shape != (3,) or not np.isfinite(position).all():
+ raise ValueError('IK goal must contain three finite coordinates')
+ jacp, jacr = np.zeros((3,self.model.nv)), np.zeros((3,self.model.nv))
+ mujoco.mj_jacSite(self.model,self.data,jacp,jacr,self.tcp_id)
+ rotation = self.data.site_xmat[self.tcp_id].reshape(3,3)
+ orientation_error = .5 * sum((np.cross(rotation[:,i], np.eye(3)[:,i]) for i in range(3)), np.zeros(3))
+ translation_error = position - self.data.site_xpos[self.tcp_id]
+ distance = np.linalg.norm(translation_error)
+ if distance > .006:
+ translation_error *= .006 / distance
+ angle = np.linalg.norm(orientation_error)
+ if angle > .04:
+ orientation_error *= .04 / angle
+ jacobian = np.vstack((jacp[:,self.joint_dofs], .25*jacr[:,self.joint_dofs]))
+ error = np.r_[translation_error, .25*orientation_error]
+ delta = jacobian.T @ np.linalg.solve(jacobian@jacobian.T + .015**2*np.eye(6), error)
+ delta = np.clip(delta, -.06, .06)
+ limits = np.asarray(JOINT_LIMITS)
+ return np.clip(self.data.qpos[self.joint_qpos]+delta,limits[:,0]+.02,limits[:,1]-.02).tolist()
+
+ def step(self, action):
+ if not self._ready or self._done:
+ raise RuntimeError('Reset is required before another arm step')
+ if not isinstance(action, dict) or set(action) != {'joint_targets','gripper_width'}:
+ raise ValueError('Arm action requires joint_targets and gripper_width only')
+ targets = np.asarray(action['joint_targets'],dtype=float)
+ width = action['gripper_width']
+ limits = np.asarray(JOINT_LIMITS)
+ if targets.shape != (6,) or not np.isfinite(targets).all() or np.any(targetslimits[:,1]) or isinstance(width,bool) or not isinstance(width,(int,float)) or not math.isfinite(width) or not 0<=width<=.08:
+ raise ValueError('Arm targets violate the declared joint/jaw limits')
+ self._last_targets,self._last_width=targets.copy(),float(width)
+ previous_distance=float(np.linalg.norm(self.data.xpos[self.object_id]-self.target))
+ warnings = []
+ with self._native(warnings):
+ for _ in range(round(self.config.control_dt/self.config.timestep)):
+ self._controls(targets,width)
+ before=float(self.data.time)
+ mujoco.mj_step(self.model,self.data)
+ mujoco.mj_forward(self.model,self.data)
+ self._elapsed+=self.config.timestep
+ if not self._finite() or not math.isclose(float(self.data.time)-before,self.config.timestep,rel_tol=0,abs_tol=1e-10):
+ self._reason='invalid_state';self._done=True;break
+ if warnings or any(w.number for w in self.data.warning):
+ self._reason='solver_warning';self._done=True;break
+ counts,forces=self._contact_state()
+ self._max_pad_force=max(self._max_pad_force,forces['left'],forces['right'])
+ self._grasp_seen |= counts['left']>0 and counts['right']>0
+ lift=float(self.data.xpos[self.object_id,2]-self.initial_object_position[2])
+ self._max_lift=max(self._max_lift,lift)
+ retained_lift = counts['left']>0 and counts['right']>0 and counts['table']==0 and lift>=.055
+ self._lift_dwell = self._lift_dwell+self.config.timestep if retained_lift else 0.
+ self._lift_seen |= self._lift_dwell+1e-12>=.10
+ velocity=self._velocity(mujoco.mjtObj.mjOBJ_BODY,self.object_id)
+ distance=float(np.linalg.norm(self.data.xpos[self.object_id]-self.target))
+ released=float(self.data.qpos[self.jaw_qpos].sum())>.055 and counts['left']==0 and counts['right']==0
+ supported=counts['table']>0 and abs(self.data.xpos[self.object_id,2]-self.target[2])<.008
+ settled=np.linalg.norm(velocity[3:])<.035 and np.linalg.norm(velocity[:3])<.3
+ hand_clear=self.data.site_xpos[self.tcp_id,2]>=self.data.xpos[self.object_id,2]+.10
+ qualifies=self._lift_seen and self._grasp_seen and released and hand_clear and supported and settled and distance<=self.config.position_tolerance
+ self._dwell=self._dwell+self.config.timestep if qualifies else 0.
+ if self._dwell+1e-12>=self.config.dwell_seconds:
+ self._reason='success';self._done=True;break
+ if self.data.xpos[self.object_id,2]=round(self.config.horizon/self.config.control_dt):
+ self._reason='horizon';self._done=True
+ obs=self._observation();info=self._info()
+ reward=previous_distance-info['target_distance'] if info['target_distance'] is not None else -1.
+ if info['success']:reward+=1.
+ if not info['valid']:reward=-1.
+ return obs,float(reward),self._done and self._reason!='horizon',self._reason=='horizon',info
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_native_offline_check.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_native_offline_check.py
new file mode 100644
index 0000000..886d17e
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_native_offline_check.py
@@ -0,0 +1,56 @@
+"""Installed-arm runtime proof under macOS process-level network denial."""
+import ctypes
+import errno
+import json
+from pathlib import Path
+import platform
+import socket
+import struct
+import sys
+from .arm_runner import authored_grounding, run_skill, write_run
+from .arm_qualify import SCENES
+
+
+def main():
+ if platform.system()!='Darwin':
+ raise RuntimeError('This verification harness is macOS-specific.')
+ libc=ctypes.CDLL(None,use_errno=True)
+ libc.socket.argtypes=[ctypes.c_int,ctypes.c_int,ctypes.c_int]
+ libc.connect.argtypes=[ctypes.c_int,ctypes.c_void_p,ctypes.c_uint32]
+ libc.close.argtypes=[ctypes.c_int]
+ descriptor=libc.socket(socket.AF_INET,socket.SOCK_STREAM,0)
+ observed_errno=ctypes.get_errno() if descriptor<0 else 0
+ if descriptor>=0:
+ address=ctypes.create_string_buffer(struct.pack('BBH4s8s',16,socket.AF_INET,socket.htons(9),socket.inet_aton('127.0.0.1'),bytes(8)))
+ result=libc.connect(descriptor,address,16)
+ observed_errno=ctypes.get_errno() if result<0 else 0
+ libc.close(descriptor)
+ if observed_errno not in (errno.EPERM,errno.EACCES):
+ raise RuntimeError('Native network self-test was not denied. Launch under the documented sandbox policy.')
+ source=Path(__file__).with_name('place_cup.skill.json').read_bytes()
+ grounding=authored_grounding(source)
+ episodes=[]
+ payload=None
+ for index,(name,start,target) in enumerate(SCENES[:3]):
+ scene={'object_position':start,'target_position':target,'seed':500+index}
+ payload=run_skill(source,grounding,scene,offline=True)
+ payload['episodes'][0]['scene_id']=name
+ episodes.extend(payload['episodes'])
+ if not all(e['success'] and not e['final_info']['warnings'] for e in episodes):
+ raise RuntimeError('Offline arm execution failed.')
+ payload['episodes']=episodes
+ payload['summary']={'successes':sum(e['success'] for e in episodes),'episodes':len(episodes),
+ 'simulated_seconds':sum(e['simulated_seconds'] for e in episodes),
+ 'episode_wall_seconds':sum(e['episode_wall_seconds'] for e in episodes)}
+ payload['native_network_policy']={'platform':'macOS sandbox-exec',
+ 'policy':'(version 1) (allow default) (deny network*)',
+ 'native_connect_self_test':'libc connect to 127.0.0.1:9 denied before rollouts',
+ 'errno':observed_errno,'passed':True,
+ 'scope':'Installed runtime only. Repeats three qualified scenes under process-level denial; no air-gapped dependency installation or other OS qualification.'}
+ output=Path(sys.argv[1]) if len(sys.argv)>1 else Path('runs/arm-native-offline')
+ write_run(output,payload)
+ (output/'native-policy.json').write_text(json.dumps(payload['native_network_policy'],indent=2)+'\n')
+
+
+if __name__=='__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_pack.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_pack.py
new file mode 100644
index 0000000..8cd75de
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_pack.py
@@ -0,0 +1,81 @@
+"""Content-addressed simulation adapter bundle, distinct from a learned/hardware release."""
+from hashlib import sha256
+import json
+from pathlib import Path
+from zipfile import ZipFile, ZIP_DEFLATED
+from .skillspace import ADAPTER_ID, ARM_PROFILE, load_skillspace
+
+
+def export_arm_pack(directory):
+ directory=Path(directory)
+ payload=json.loads((directory/'run.json').read_text())
+ if payload.get('task')!='ArmPickPlace-v0' or payload.get('scope')!='simulation-only':
+ raise ValueError('Arm pack requires a simulation-only placement run.')
+ source=(directory/'source.json').read_bytes()
+ if sha256(source).hexdigest()!=payload['skill']['source_sha256']:
+ raise ValueError('Skill source hash does not match its exact run input.')
+ files={}
+ for path in Path(__file__).parent.iterdir():
+ if path.is_file() and (path.suffix in ('.py','.html','.json','.txt') or path.name=='LICENSE'):
+ files['simlab/'+path.name]=path.read_bytes()
+ for name in ('run.json','source.json','grounding.json'):
+ if (directory/name).exists():
+ files['evidence/'+name]=(directory/name).read_bytes()
+ files['requirements.lock.txt']=Path(__file__).with_name('requirements.lock.txt').read_bytes()
+ files['README.md']=b'''# DVIDIA articulated-arm simulation adapter\n\nThis is an authored simulation controller bound to DVIDIA task metadata. No physical robot qualification or learned video policy is included.\n\nUse Python 3.12+ and the pinned dependencies in requirements.lock.txt. From this extracted directory: `python -m simlab.studio --offline` for the local lab, or `python -m simlab.arm_qualify --source evidence/source.json --output reproduced` to repeat the six-layout protocol. If source has no inline grounding, arm_qualify explicitly binds the documented local adapter. Dependencies must already be installed for offline execution.\n\nHashes check content integrity, not publisher identity or authenticity. See evidence/run.json for exact task, scene, contact exclusions, timings and outcomes.\n'''
+ manifest={'schema_version':1,'task':'ArmPickPlace-v0','scope':'simulation-only',
+ 'status':'authored_adapter_with_recorded_simulation_evidence',
+ 'arm_profile':payload['skill']['arm_profile'],'adapter_id':payload['skill']['adapter_id'],
+ 'source_has_robot_policy':False,'physical_robot_ready':False,
+ 'summary':payload['summary'],'limitations':payload['limitations'],
+ 'files':{name:sha256(data).hexdigest() for name,data in sorted(files.items())}}
+ with ZipFile(directory/'skill-adapter.zip','w',ZIP_DEFLATED) as archive:
+ for name,data in sorted(files.items()):archive.writestr(name,data)
+ archive.writestr('manifest.json',json.dumps(manifest,indent=2,allow_nan=False)+'\n')
+ (directory/'manifest.json').write_text(json.dumps(manifest,indent=2,allow_nan=False)+'\n')
+ verify_arm_pack(directory/'skill-adapter.zip')
+ return manifest
+
+
+def verify_arm_pack(path):
+ with ZipFile(path) as archive:
+ names=archive.namelist()
+ if len(names)>128 or len(names)!=len(set(names)) or sum(i.file_size for i in archive.infolist())>128*1024*1024:
+ raise ValueError('Duplicate entries or archive resource budget exceeded.')
+ manifest=json.loads(archive.read('manifest.json'))
+ expected={'schema_version':1,'task':'ArmPickPlace-v0','scope':'simulation-only',
+ 'status':'authored_adapter_with_recorded_simulation_evidence',
+ 'arm_profile':ARM_PROFILE,'adapter_id':ADAPTER_ID,
+ 'source_has_robot_policy':False,'physical_robot_ready':False}
+ if any(type(manifest.get(key)) is not type(value) or manifest.get(key)!=value for key,value in expected.items()):
+ raise ValueError('Invalid arm adapter task, provenance or scope.')
+ if set(names)!=set(manifest['files'])|{'manifest.json'}:
+ raise ValueError('Archive entries do not match the manifest.')
+ for name,digest in manifest['files'].items():
+ if name.startswith('/') or '\\' in name or ':' in name or '..' in Path(name).parts or sha256(archive.read(name)).hexdigest()!=digest:
+ raise ValueError('Unsafe archive path or content hash mismatch.')
+ payload=json.loads(archive.read('evidence/run.json'))
+ grounding=json.loads(archive.read('evidence/grounding.json')) if 'evidence/grounding.json' in names else None
+ if load_skillspace(archive.read('evidence/source.json'),grounding).to_dict()!=payload['skill']:
+ raise ValueError('Skill grounding does not match the recorded execution contract.')
+ if (payload.get('task')!='ArmPickPlace-v0' or payload.get('scope')!='simulation-only'
+ or payload['skill'].get('arm_profile')!=manifest['arm_profile']
+ or payload['skill'].get('adapter_id')!=manifest['adapter_id']
+ or payload['skill'].get('source_has_robot_policy') is not False
+ or payload['skill'].get('robot_ready') is not False
+ or payload.get('limitations')!=manifest['limitations']):
+ raise ValueError('Arm evidence task or scope does not match its manifest.')
+ if payload['summary']!=manifest['summary'] or payload['skill']['source_sha256']!=sha256(archive.read('evidence/source.json')).hexdigest():
+ raise ValueError('Arm adapter evidence does not match its manifest.')
+ episodes=payload['episodes']
+ if payload['summary']['successes']!=sum(e['success'] for e in episodes) or payload['summary']['episodes']!=len(episodes):
+ raise ValueError('Arm outcome count does not match its evidence.')
+ if 'by_policy' in payload['summary']:
+ groups=payload['summary']['by_policy']
+ if set(groups)!=set(e['policy'] for e in episodes):
+ raise ValueError('Policy groups do not match the recorded episodes.')
+ for policy,group in groups.items():
+ selected=[e for e in episodes if e['policy']==policy]
+ if group.get('successes')!=sum(e['success'] for e in selected) or group.get('episodes')!=len(selected):
+ raise ValueError('Policy outcome count does not match its evidence.')
+ return manifest
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_policy.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_policy.py
new file mode 100644
index 0000000..5a1221b
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_policy.py
@@ -0,0 +1,62 @@
+"""An explicitly authored, contact-gated placement procedure; not learned video."""
+from __future__ import annotations
+import numpy as np
+
+PROCEDURE = ('approach','descend','close','lift','transfer','place','release','retreat','verify')
+
+
+class ArmPickPlacePolicy:
+ def __init__(self, environment):
+ self.env=environment
+ self.stage='approach'
+ self._stage_ticks=0
+ self._stable_ticks=0
+ self._grasp_position=None
+ self._lift_position=None
+ self._last_goal=None
+
+ def _next(self, stage):
+ self.stage=stage;self._stage_ticks=0;self._stable_ticks=0
+
+ def __call__(self, observation):
+ c=self.env.config
+ object_position=np.asarray(observation['object_position'])
+ target=np.asarray(observation['target_position'])
+ tcp=np.asarray(observation['end_effector_position'])
+ offset=.026-c.object_half_size[2]
+ width=.08
+ if self.stage=='approach':
+ goal=object_position+np.array([0.,0.,.15])
+ if np.linalg.norm(tcp-goal)<.012:
+ self._grasp_position=object_position+np.array([0.,0.,offset]);self._next('descend')
+ if self.stage=='descend':
+ goal=self._grasp_position
+ if np.linalg.norm(tcp-goal)<.0045 and np.linalg.norm(observation['end_effector_velocity'])<.05:
+ self._stable_ticks+=1
+ else:self._stable_ticks=0
+ if self._stable_ticks>=5:self._next('close')
+ if self.stage=='close':
+ goal=self._grasp_position;width=.028
+ both=observation['grasp_contacts']['left']>0 and observation['grasp_contacts']['right']>0
+ self._stable_ticks=self._stable_ticks+1 if both else 0
+ if self._stable_ticks>=10:
+ self._lift_position=goal+np.array([0.,0.,.13]);self._next('lift')
+ if self.stage=='lift':
+ goal=self._lift_position;width=.028
+ if object_position[2]>self.env.initial_object_position[2]+.06 and np.linalg.norm(tcp-goal)<.015:
+ self._next('transfer')
+ if self.stage=='transfer':
+ goal=target+np.array([0.,0.,offset+.13]);width=.028
+ if np.linalg.norm(tcp-goal)<.012:self._next('place')
+ if self.stage=='place':
+ goal=target+np.array([0.,0.,offset]);width=.028
+ if observation['table_contacts']>0 and np.linalg.norm(object_position[:2]-target[:2])<.018 and np.linalg.norm(tcp-goal)<.008:
+ self._next('release')
+ if self.stage=='release':
+ goal=target+np.array([0.,0.,offset]);width=.08
+ if observation['gripper_width']>.065 and self._stage_ticks>=10:self._next('retreat')
+ if self.stage in ('retreat','verify'):
+ goal=target+np.array([0.,0.,offset+.13]);width=.08
+ if self.stage=='retreat' and np.linalg.norm(tcp-goal)<.02:self._next('verify')
+ self._last_goal=goal.copy();self._stage_ticks+=1
+ return {'joint_targets':self.env.joint_targets_for_pose(goal),'gripper_width':width}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_qualify.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_qualify.py
new file mode 100644
index 0000000..e2c1669
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_qualify.py
@@ -0,0 +1,65 @@
+"""Fixed scene evaluation and native-contact negative controls for the placement adapter."""
+from dataclasses import replace
+import argparse
+import json
+from pathlib import Path
+
+from .arm_runner import (authored_grounding, config_for, payload_for, rollout, write_run)
+from .cli import NetworkGuard
+from .skillspace import load_skillspace
+
+SCENES = (
+ ('default', [.42,-.04,.31], [.54,.10,.31]),
+ ('cross_right', [.38,.09,.31], [.52,-.09,.31]),
+ ('cross_left', [.48,-.12,.31], [.37,.09,.31]),
+ ('forward', [.35,-.08,.31], [.54,.08,.31]),
+ ('reverse', [.46,.10,.31], [.36,-.10,.31]),
+ ('wide', [.30,-.15,.31], [.50,.18,.31]),
+)
+
+
+def main():
+ parser = argparse.ArgumentParser(description='Fixed articulated-arm scene protocol with native contact controls.')
+ parser.add_argument('--source', type=Path, default=Path(__file__).with_name('place_cup.skill.json'))
+ parser.add_argument('--output', type=Path, default=Path('runs/arm-v0'))
+ args = parser.parse_args()
+ source = args.source.read_bytes()
+ document = json.loads(source)
+ grounding = None if 'simulation_grounding' in document else authored_grounding(source)
+ skill = load_skillspace(source, grounding)
+ initial = config_for(skill)
+ episodes = []
+ with NetworkGuard(True) as guard:
+ for index, (name, start, target) in enumerate(SCENES):
+ scene = {'object_position':start,'target_position':target,'seed':400+index}
+ config = config_for(skill, scene)
+ placement = rollout(config, scene['seed'])
+ placement['scene_id'] = name
+ episodes.append(placement)
+ for policy in ('idle','replay_open_jaw'):
+ control = rollout(config, scene['seed'], policy, action_tape=placement['actions'])
+ control['scene_id'] = name
+ episodes.append(control)
+ print(json.dumps({'scene':name,'placement':placement['reason'],
+ 'negative_control_successes':sum(e['success'] for e in episodes[-2:])}), flush=True)
+ payload = payload_for(skill, initial, episodes, guard.record())
+ payload.update(protocol={'name':'frozen-six-layout-placement-v0',
+ 'seeds':list(range(400,406)), 'scenes':[{'id':name,'object_position':obj,'target_position':target} for name,obj,target in SCENES],
+ 'controller':'same authored controller; no parameter training',
+ 'negative_control':'Replay identical joint target commands with jaws held open; no object state edits.',
+ 'selection':'Scene protocol fixed in source before this evaluation; small bounded simulation study.'},
+ source_url='https://dvidia.org/packs/dvidia/place_cup/skill.json')
+ payload['summary']['by_policy'] = {
+ policy:{'successes':sum(e['success'] for e in episodes if e['policy']==policy),
+ 'episodes':sum(e['policy']==policy for e in episodes),
+ 'simulated_seconds':sum(e['simulated_seconds'] for e in episodes if e['policy']==policy),
+ 'episode_wall_seconds':sum(e['episode_wall_seconds'] for e in episodes if e['policy']==policy)}
+ for policy in ('placement','idle','replay_open_jaw')}
+ write_run(args.output,payload)
+ args.output.joinpath('source.json').write_bytes(source)
+ if grounding is not None:
+ args.output.joinpath('grounding.json').write_text(json.dumps(grounding,indent=2)+'\n')
+
+
+if __name__=='__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_runner.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_runner.py
new file mode 100644
index 0000000..0f57cf4
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_runner.py
@@ -0,0 +1,202 @@
+"""Execute an installed, authored placement skill in an independently grounded scene."""
+from __future__ import annotations
+import argparse
+from dataclasses import asdict
+import json
+import math
+from pathlib import Path
+import platform
+import time
+
+import mujoco
+import numpy as np
+from .arm_env import ArmConfig, ArmEnv
+from .arm_policy import ArmPickPlacePolicy
+from .cli import NetworkGuard, parse_seeds
+from .installer import fetch_skill_url, install_source, read_installation
+from .skillspace import (ADAPTER_ID, ARM_PROFILE, PROCEDURE, WORKSPACE_MIN,
+ WORKSPACE_MAX, inspect_skillspace, load_skillspace)
+
+DEFAULT_SCENE = {'object_position': [.42, -.04, .31], 'target_position': [.54, .10, .31], 'seed': 0}
+LIMITATIONS = [
+ 'Authored simulation controller; the source Skillspace envelope contains no learned robot policy.',
+ 'One original arm profile, privileged simulator observations, rigid box proxy for placement skills.',
+ 'Native jaw/object/table contacts; arm links and palm are collision-excluded.',
+ 'No camera perception, physical arm calibration, selfcollision, cup/handle, cable tying or broad skill qualification.',
+ 'Installation may fetch one public JSON envelope; installed execution and replay can run offline.',
+]
+
+
+def validate_scene(scene: dict | None) -> dict:
+ if scene is None:
+ scene = dict(DEFAULT_SCENE)
+ if type(scene) is not dict or set(scene) - set(DEFAULT_SCENE):
+ raise ValueError('Scene requires object_position, target_position and an optional seed only.')
+ merged = {**DEFAULT_SCENE, **scene}
+ seed = merged['seed']
+ if type(seed) is not int or not 0 <= seed <= 999999:
+ raise ValueError('Environment seed must be an integer in [0, 999999].')
+ for key in ('object_position', 'target_position'):
+ point = merged[key]
+ if type(point) is not list or len(point) != 3 or any(type(x) not in (int, float) or not math.isfinite(x) for x in point):
+ raise ValueError('Scene positions must contain three finite numbers.')
+ ArmConfig(object_position=merged['object_position'], target_position=merged['target_position'], scene_jitter=0)
+ return merged
+
+
+def authored_grounding(document, scene=None) -> dict:
+ """Visible, local controller binding; never inferred from demonstration count."""
+ scene = validate_scene(scene)
+ metadata = inspect_skillspace(document)
+ return {'schema_version': 1, 'task_type': metadata['skill_id'],
+ 'provenance': 'authored_simulation_adapter', 'adapter_id': ADAPTER_ID,
+ 'arm_profile': ARM_PROFILE, 'frame': 'world', 'units': 'm',
+ 'language_aliases': [metadata['task']],
+ 'workspace': {'min': list(WORKSPACE_MIN), 'max': list(WORKSPACE_MAX)},
+ 'table_height': .29,
+ 'object': {'kind': 'box', 'position': scene['object_position'], 'size': [.04, .04, .04], 'mass': .04, 'friction': .8},
+ 'target': {'position': scene['target_position'], 'position_tolerance': .025, 'dwell_seconds': .25},
+ 'procedure': list(PROCEDURE)}
+
+
+def config_for(skill, scene=None):
+ scene = validate_scene(scene)
+ return ArmConfig(object_position=scene['object_position'], target_position=scene['target_position'],
+ object_half_size=tuple(x/2 for x in skill.object_size),
+ object_mass=skill.object_mass, object_friction=skill.object_friction,
+ table_height=skill.table_height, position_tolerance=skill.position_tolerance,
+ dwell_seconds=skill.dwell_seconds, scene_jitter=0)
+
+
+def rollout(config, seed, policy_name='placement', *, action_tape=None):
+ if policy_name not in ('placement', 'open_jaw', 'idle', 'replay_open_jaw'):
+ raise ValueError('Unknown placement controller or control check.')
+ started = time.perf_counter()
+ env = ArmEnv(config)
+ obs, reset_info = env.reset(seed=seed)
+ setup = time.perf_counter() - started
+ policy = ArmPickPlacePolicy(env)
+ frames = [dict(time=0., stage='observe', **obs)]
+ initial_joints = list(obs['joint_position'])
+ latencies, rewards, tape = [], [], []
+ done = False
+ info = reset_info
+ while not done:
+ began = time.perf_counter()
+ if policy_name == 'idle':
+ action = {'joint_targets': initial_joints, 'gripper_width': .08}
+ stage = 'idle'
+ elif policy_name == 'replay_open_jaw':
+ if not action_tape:
+ raise ValueError('Recorded-arm open-jaw check requires a placement action tape.')
+ index = min(len(tape), len(action_tape)-1)
+ action = {**action_tape[index]['action'], 'gripper_width': .08}
+ stage = action_tape[index]['stage']
+ else:
+ action = policy(obs)
+ stage = policy.stage
+ if policy_name == 'open_jaw':
+ action = {**action, 'gripper_width': .08}
+ obs, reward, terminated, truncated, info = env.step(action)
+ latencies.append(time.perf_counter() - began)
+ rewards.append(reward)
+ tape.append({'stage': stage, 'action': action})
+ if info['valid'] and len(obs['object_position']) == 3:
+ frames.append(dict(time=info['simulation_time'], stage=stage, **obs,
+ pad_normal_forces=info['pad_normal_forces'],
+ target_distance=info['target_distance'], dwell_elapsed=info['dwell_elapsed']))
+ done = terminated or truncated
+ elapsed = time.perf_counter()-started
+ return {'seed': seed, 'policy': policy_name, 'success': info['success'], 'reason': info['reason'],
+ 'final_distance': info['target_distance'], 'simulated_seconds': info['simulation_time'],
+ 'episode_wall_seconds': elapsed, 'setup_seconds': setup,
+ 'control_latency_p50_seconds': float(np.median(latencies)),
+ 'control_latency_p95_seconds': float(np.percentile(latencies, 95)),
+ 'simulated_seconds_per_wall_second': info['simulation_time']/elapsed,
+ 'control_steps': len(tape), 'reward': float(sum(rewards)),
+ 'reset_info': reset_info, 'final_info': info, 'actions': tape, 'trace': frames}
+
+
+def run_skill(source: bytes, grounding: dict | None, scene=None, *, seeds=None, policy='placement', offline=True):
+ skill = load_skillspace(source, grounding)
+ scene = validate_scene(scene)
+ config = config_for(skill, scene)
+ seeds = [scene['seed']] if seeds is None else seeds
+ if not seeds or len(seeds)>100 or len(set(seeds))!=len(seeds) or any(type(s) is not int or not 0<=s<=999999 for s in seeds):
+ raise ValueError('Use 1–100 distinct nonnegative environment seeds.')
+ with NetworkGuard(offline) as guard:
+ episodes = [rollout(config, seed, policy) for seed in seeds]
+ return payload_for(skill, config, episodes, guard.record())
+
+
+def payload_for(skill, config, episodes, guard):
+ return {'schema_version': 1, 'task': 'ArmPickPlace-v0', 'scope': 'simulation-only',
+ 'skill': skill.to_dict(), 'environment_config': asdict(config),
+ 'scene_binding': 'Object and target positions belong to the environment; the installed controller is reused.',
+ 'episodes': episodes, 'hardware': {'system': platform.system(), 'machine': platform.machine(),
+ 'python': platform.python_version(), 'mujoco': mujoco.__version__, 'numpy': np.__version__},
+ 'network_guard': guard, 'limitations': LIMITATIONS,
+ 'timing_scope': 'Episode wall clock includes model compilation, reset/settling, IK/controller, native physics, observations and traces; excludes installation, web UI, process startup and output I/O. No GPU benchmark.',
+ 'summary': {'successes': sum(e['success'] for e in episodes), 'episodes': len(episodes),
+ 'simulated_seconds': sum(e['simulated_seconds'] for e in episodes),
+ 'episode_wall_seconds': sum(e['episode_wall_seconds'] for e in episodes)}}
+
+
+def save_replay(payload, path):
+ text = Path(__file__).with_name('studio.html').read_text(encoding='utf8')
+ # A visual replay samples saved observations at 100 ms; the full run JSON
+ # retains every control frame and commanded action for verification.
+ view = {**payload, 'replay_sampling':'100 ms recorded observation samples; full control observations/actions are in run.json'}
+ view['episodes'] = []
+ for episode in payload['episodes']:
+ frames = episode['trace']
+ sampled = frames[::5]
+ if frames and sampled[-1] is not frames[-1]:
+ sampled.append(frames[-1])
+ view['episodes'].append({key:value for key,value in episode.items() if key not in ('trace','actions')} | {'trace':sampled})
+ embedded = json.dumps(view, allow_nan=False, separators=(',', ':')).replace('<', '\\u003c')
+ text = text.replace('',
+ '')
+ Path(path).write_text(text, encoding='utf8')
+
+
+def write_run(directory, payload):
+ directory = Path(directory)
+ directory.mkdir(parents=True, exist_ok=True)
+ (directory/'run.json').write_text(json.dumps(payload, separators=(',', ':'), allow_nan=False)+'\n', encoding='utf8')
+ save_replay(payload, directory/'replay.html')
+ print(json.dumps({'output': str(directory), **payload['summary']}))
+
+
+def main():
+ parser = argparse.ArgumentParser(description='Install a DVIDIA placement source and execute its authored simulation adapter.')
+ sub = parser.add_subparsers(dest='command', required=True)
+ install = sub.add_parser('install')
+ source = install.add_mutually_exclusive_group(required=True)
+ source.add_argument('--url'); source.add_argument('--file', type=Path)
+ install.add_argument('--directory', type=Path, default=Path('runs/studio/installed'))
+ run = sub.add_parser('run')
+ run.add_argument('installation_id')
+ run.add_argument('--directory', type=Path, default=Path('runs/studio/installed'))
+ run.add_argument('--scene', type=Path)
+ run.add_argument('--seeds', type=parse_seeds)
+ run.add_argument('--policy', choices=['placement','open_jaw','idle'], default='placement')
+ run.add_argument('--output', type=Path, default=Path('runs/arm-placement'))
+ args = parser.parse_args()
+ if args.command == 'install':
+ data, url = fetch_skill_url(args.url) if args.url else (args.file.read_bytes(), None)
+ record = install_source(data, authored_grounding(data), args.directory, source_url=url)
+ print(json.dumps({key: record[key] for key in ('installation_id','status','scope','skill')}))
+ else:
+ record = read_installation(args.directory, args.installation_id)
+ data = (args.directory/args.installation_id/'source.json').read_bytes()
+ grounding = None if record['grounding_mode']=='inline' else record['grounding']
+ scene = json.loads(args.scene.read_text()) if args.scene else None
+ result = run_skill(data, grounding, scene, seeds=args.seeds, policy=args.policy)
+ result['installation_id'] = args.installation_id
+ result['source_url'] = record['source_url']
+ write_run(args.output, result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/cli.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/cli.py
new file mode 100644
index 0000000..ffaa932
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/cli.py
@@ -0,0 +1,239 @@
+"""Local rollout, parameter training and qualified-pack export."""
+import argparse
+from dataclasses import asdict
+import json
+from pathlib import Path
+import platform
+import resource
+import socket
+import time
+import numpy as np
+import mujoco
+from .env import CableEndReachEnv, Config
+from .pack import encode, export_pack, verify_pack
+from .policies import FeedbackPolicy, ReleasePolicy, ZeroPolicy
+
+
+def parse_seeds(value):
+ try:
+ seeds = [int(s.strip()) for s in value.split(',')]
+ except ValueError as exc:
+ raise argparse.ArgumentTypeError('Use comma-separated nonnegative integer seeds.') from exc
+ if not seeds or min(seeds) < 0 or len(set(seeds)) != len(seeds) or len(seeds) > 100:
+ raise argparse.ArgumentTypeError('Use 1–100 distinct nonnegative seeds.')
+ return seeds
+
+
+class NetworkGuard:
+ """A bounded Python socket test; this does not intercept native C networking."""
+ def __init__(self, enabled):
+ self.enabled, self.attempts, self.original = enabled, [], {}
+
+ def __enter__(self):
+ if not self.enabled:
+ return self
+ for name in ['socket', 'create_connection', 'getaddrinfo']:
+ self.original[name] = getattr(socket, name)
+ def denied(*args, _name=name, **kwargs):
+ self.attempts.append(_name)
+ raise RuntimeError('Python network access denied by offline run guard.')
+ setattr(socket, name, denied)
+ try:
+ socket.create_connection(('offline-guard.invalid', 1))
+ except RuntimeError:
+ pass
+ else:
+ raise AssertionError('Offline guard failed its self-test.')
+ self.attempts.clear()
+ return self
+
+ def __exit__(self, *args):
+ for name, original in self.original.items():
+ setattr(socket, name, original)
+
+ def record(self):
+ return {'enabled': self.enabled, 'scope': 'Python socket calls during rollouts/training after dependency imports; not native C or installation',
+ 'guard_self_test_passed': self.enabled, 'attempted_calls': self.attempts}
+
+
+def rollout(config, seed, parameters, policy_name='feedback', trace=True):
+ started = time.perf_counter()
+ environment = CableEndReachEnv(config)
+ try:
+ observation, reset_info = environment.reset(seed=seed)
+ except (ValueError, RuntimeError) as error:
+ elapsed = time.perf_counter() - started
+ return {'seed':seed, 'policy':policy_name, 'success':False,
+ 'reason':'rejected_start', 'reward':0., 'final_distance':None, 'final_speed':None,
+ 'control_steps':0, 'simulated_seconds':0., 'setup_seconds':elapsed,
+ 'episode_wall_seconds':elapsed, 'step_loop_seconds':0.,
+ 'control_latency_p50_seconds':None, 'control_latency_p95_seconds':None,
+ 'simulated_seconds_per_wall_second':0., 'final_observation_available':False,
+ 'reset_info':{'valid':False, 'error':str(error)},
+ 'final_info':{'valid':False, 'reason':'rejected_start'}, 'trace':[]}
+ setup = time.perf_counter() - started
+ feedback = FeedbackPolicy(**parameters)
+ policy = {'feedback': feedback, 'zero': ZeroPolicy(), 'release': ReleasePolicy(feedback)}[policy_name]
+ frames = [dict(time=0.0, **observation)] if trace else []
+ rewards, latencies = [], []
+ terminated = truncated = False
+ info = reset_info
+ while not (terminated or truncated):
+ step_start = time.perf_counter()
+ action = policy(observation)
+ observation, reward, terminated, truncated, info = environment.step(action)
+ latencies.append(time.perf_counter() - step_start)
+ rewards.append(float(reward))
+ if trace and info.get('observations_available', True):
+ frames.append(dict(time=info['simulation_time'], **observation,
+ reward=float(reward), reason=info.get('reason'),
+ contact_count=info.get('contact_count', 0)))
+ if len(rewards) > 100_000:
+ raise RuntimeError('Environment did not respect a finite episode horizon.')
+ elapsed = time.perf_counter() - started
+ simulated = info['simulation_time']
+ available = info.get('observations_available', True)
+ distance = float(np.linalg.norm(np.asarray(observation['target'])-observation['endpoint_position'])) if available else None
+ episode = {'seed': seed, 'policy': policy_name,
+ 'success': bool(info.get('success', False)), 'reason': info.get('reason', 'unknown'),
+ 'reward': sum(rewards), 'final_distance': distance,
+ 'final_speed': float(np.linalg.norm(observation['endpoint_velocity'])) if available else None,
+ 'final_observation_available': available,
+ 'control_steps': len(rewards), 'simulated_seconds': simulated,
+ 'setup_seconds': setup, 'episode_wall_seconds': elapsed,
+ 'step_loop_seconds': sum(latencies),
+ 'control_latency_p50_seconds': float(np.median(latencies)),
+ 'control_latency_p95_seconds': float(np.percentile(latencies, 95)),
+ 'simulated_seconds_per_wall_second': simulated/elapsed,
+ 'reset_info': reset_info, 'final_info': info, 'trace': frames}
+ return episode
+
+
+def payload_for(config, episodes, parameters, guard):
+ rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
+ return {'schema_version': 1, 'task': 'CableEndReach-v0', 'scope': 'simulation-only',
+ 'actuation': 'ideal endpoint attachment', 'observations': 'privileged simulator state',
+ 'config': asdict(config), 'policy_parameters': parameters, 'episodes': episodes,
+ 'hardware': {'system': platform.system(), 'machine': platform.machine(),
+ 'python': platform.python_version(), 'mujoco': mujoco.__version__, 'numpy': np.__version__,
+ 'process_lifetime_peak_rss_bytes': int(rss if platform.system() == 'Darwin' else rss*1024)},
+ 'network_guard': guard.record(),
+ 'timing_scope': 'Episode clock includes construction/reset/settling, policy, physics, observations and trace collection. Step-loop clock excludes trace append/reset. Output I/O, viewer, installation and training optimization excluded; no GPU metric.',
+ 'summary': {'successes': sum(e['success'] for e in episodes), 'episodes': len(episodes),
+ 'simulated_seconds': sum(e['simulated_seconds'] for e in episodes),
+ 'episode_wall_seconds': sum(e['episode_wall_seconds'] for e in episodes)}}
+
+
+def write_run(directory, payload, parameters):
+ directory = Path(directory)
+ directory.mkdir(parents=True, exist_ok=True)
+ (directory/'run.json').write_bytes(encode(payload))
+ (directory/'policy.json').write_bytes(encode(parameters))
+ manifest = export_pack(directory/'skill-pack.zip', payload, parameters)
+ (directory/'manifest.json').write_bytes(encode(manifest))
+ try:
+ from .viewer import save_replay
+ except ImportError:
+ pass
+ else:
+ save_replay(payload, directory/'replay.html')
+ summary = payload['summary']
+ (directory/'RESULTS.md').write_text(
+ '# CableEndReach-v0 run\n\n'
+ f"{summary['successes']}/{summary['episodes']} simulated task successes. "
+ 'Ideal endpoint attachment; privileged simulator state. No physical or GPU qualification.\n\n'
+ '| Seed | Outcome | Final distance (m) | Simulation/wall seconds |\n|---|---|---:|---:|\n'+
+ ''.join(f"| {e['seed']} | {e['reason']} | {format(e['final_distance'], '.6f') if e['final_distance'] is not None else 'unavailable'} | {e['simulated_seconds_per_wall_second']:.2f} |\n" for e in payload['episodes'])+
+ '\n'+payload['timing_scope']+'\n\nSee run.json for configuration, warnings, timings and traces; manifest.json for content hashes.\n', encoding='utf8')
+ print(json.dumps({'output': str(directory), **summary, 'pack_verified': bool(verify_pack(directory/'skill-pack.zip'))}))
+
+
+def train(config, args, base, guard):
+ if set(args.seeds) & set(args.eval_seeds):
+ raise ValueError('Training and evaluation seeds must be disjoint.')
+ rng = np.random.default_rng(args.search_seed)
+ mean = np.log([base['kp'], base['kd'], max(base['gravity_bias'], 1e-4)])
+ spread = np.array([0.6, 0.6, 0.5])
+ records = []
+ def evaluate(parameters, label):
+ episodes = [rollout(config, seed, parameters, trace=False) for seed in args.seeds]
+ score = float(np.mean([10.0*e['success']-(e['final_distance'] if e['final_distance'] is not None else 1.)-0.02*(e['final_speed'] if e['final_speed'] is not None else 1.)-
+ (10 if e['reason'] not in ['success', 'horizon'] else 0) for e in episodes]))
+ record = {'candidate': label, 'parameters': parameters, 'score': score,
+ 'successes': sum(e['success'] for e in episodes), 'episodes': len(episodes),
+ 'results': [{k:v for k,v in e.items() if k not in ['trace', 'reset_info', 'final_info']} for e in episodes]}
+ records.append(record)
+ return score
+ best, best_score = dict(base), evaluate(base, 'baseline')
+ for iteration in range(args.iterations):
+ candidates = []
+ for sample in range(args.population):
+ vector = np.clip(rng.normal(mean, spread), np.log([0.1,0.005,0.0001]), np.log([50.,5.,config.force_limit]))
+ kp,kd,bias = np.exp(vector)
+ parameters = dict(force_limit=config.force_limit, kp=float(kp), kd=float(kd), gravity_bias=float(bias))
+ score = evaluate(parameters, f'{iteration}:{sample}')
+ candidates.append((score, vector, parameters))
+ if score > best_score:
+ best, best_score = parameters, score
+ elites = sorted(candidates, key=lambda x:x[0], reverse=True)[:max(2,args.population//3)]
+ values = np.array([entry[1] for entry in elites])
+ mean, spread = values.mean(axis=0), np.maximum(values.std(axis=0), .12)
+ print(json.dumps({'training_iteration': iteration+1, 'best_score': best_score}), flush=True)
+ heldout = [rollout(config, seed, best) for seed in args.eval_seeds]
+ payload = payload_for(config, heldout, best, guard)
+ payload.update(training_seeds=args.seeds, training={'method':'cross-entropy search of explicit PD controller parameters',
+ 'search_seed':args.search_seed, 'iterations':args.iterations, 'population':args.population,
+ 'candidate_records':records, 'evaluation_policy_frozen_before_heldout':True})
+ return payload, best
+
+
+def main():
+ parser = argparse.ArgumentParser(description='DVIDIA offline simulation lab: bounded cable endpoint control.')
+ sub = parser.add_subparsers(dest='command', required=True)
+ for name in ['run', 'train']:
+ p = sub.add_parser(name)
+ p.add_argument('--seeds', type=parse_seeds, default=parse_seeds('0,1,2'))
+ p.add_argument('--output', type=Path, default=Path('runs')/('cable-'+name))
+ p.add_argument('--offline', action='store_true', help='Deny Python socket calls during execution and record the guard test.')
+ p.add_argument('--config', type=Path, help='JSON config or prior run.json configuration.')
+ p.add_argument('--policy-file', type=Path)
+ p.add_argument('--kp', type=float, default=10.)
+ p.add_argument('--kd', type=float, default=.25)
+ p.add_argument('--gravity-bias', type=float, default=.1)
+ if name == 'run':
+ p.add_argument('--policy', choices=['feedback','zero','release'], default='feedback')
+ else:
+ p.add_argument('--eval-seeds', type=parse_seeds, default=parse_seeds('100,101,102'))
+ p.add_argument('--iterations', type=int, default=2)
+ p.add_argument('--population', type=int, default=4)
+ p.add_argument('--search-seed', type=int, default=31415)
+ verify = sub.add_parser('verify-pack')
+ verify.add_argument('path', type=Path)
+ args = parser.parse_args()
+ if args.command == 'verify-pack':
+ manifest = verify_pack(args.path)
+ print(json.dumps({'verified':True, 'task':manifest['task'], 'status':manifest['status'], 'files':len(manifest['files'])}))
+ return
+ configuration = json.loads(args.config.read_text()) if args.config else {}
+ config = Config(**configuration.get('config', configuration))
+ parameters = json.loads(args.policy_file.read_text()) if args.policy_file else dict(force_limit=config.force_limit,kp=args.kp,kd=args.kd,gravity_bias=args.gravity_bias)
+ FeedbackPolicy(**parameters)
+ if parameters['force_limit'] != config.force_limit:
+ parser.error('Policy and environment force limits must match.')
+ if args.command == 'train' and not (1 <= args.iterations <= 20 and 3 <= args.population <= 32):
+ parser.error('Use 1–20 iterations and 3–32 candidates per iteration.')
+ started = time.perf_counter()
+ with NetworkGuard(args.offline) as guard:
+ if args.command == 'run':
+ episodes = [rollout(config, seed, parameters, args.policy) for seed in args.seeds]
+ payload = payload_for(config, episodes, parameters, guard)
+ else:
+ payload, parameters = train(config, args, parameters, guard)
+ payload['execution_wall_seconds_before_output'] = time.perf_counter()-started
+ if guard.attempts:
+ raise RuntimeError('Execution attempted network operations.')
+ write_run(args.output, payload, parameters)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/env.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/env.py
new file mode 100644
index 0000000..25f257d
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/env.py
@@ -0,0 +1,441 @@
+"""CableEndReach-v0: ideal endpoint-force control of an anchored elastic cable.
+
+Native MuJoCo CPU dynamics, privileged state, SI units, no rendering/networking.
+The endpoint attachment is ideal: this task does not model jaws, grasp slip,
+camera observations, tactile sensing, axial stretch or physical robot transfer.
+Material/contact parameters are authored simulation settings, not calibration.
+"""
+from __future__ import annotations
+
+from contextlib import contextmanager
+from dataclasses import asdict, dataclass
+import hashlib
+import json
+import math
+import threading
+from typing import Any
+
+import mujoco
+import numpy as np
+
+PIN = "3.15.0"
+ENV_ID = "CableEndReach-v0"
+STATE_SIGNATURE = int(mujoco.mjtState.mjSTATE_INTEGRATION)
+_NATIVE_LOCK = threading.RLock()
+
+
+def _digest(value: Any) -> str:
+ return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":"),
+ allow_nan=False).encode()).hexdigest()
+
+
+@dataclass(frozen=True)
+class Config:
+ timestep: float = 0.001
+ control_dt: float = 0.02
+ horizon: float = 6.0
+ dwell: float = 0.2
+ tolerance: float = 0.025
+ force_limit: float = 2.0
+ rope_length: float = 0.5
+ rope_radius: float = 0.004
+ rope_nodes: int = 21
+ density: float = 1000.0
+ bend: float = 1e5
+ twist: float = 1e5
+ joint_damping: float = 0.03
+ gravity: float = 9.81
+ variation_fraction: float = 0.08
+ settle_time: float = 1.0
+ anchor_height: float = 0.7
+ target_offset: tuple[float, float, float] = (0.06, 0.05, 0.04)
+ target_jitter: float = 0.005
+ contact_friction: float = 0.5
+ workspace_radius_factor: float = 1.1
+
+ def __post_init__(self):
+ for name in ("timestep", "control_dt", "horizon", "dwell", "tolerance",
+ "force_limit", "rope_length", "rope_radius", "density",
+ "bend", "twist", "joint_damping", "settle_time",
+ "anchor_height", "workspace_radius_factor"):
+ value = getattr(self, name)
+ if isinstance(value, bool) or not math.isfinite(value) or value <= 0:
+ raise ValueError(f"{name} must be finite and positive")
+ for name in ("gravity", "target_jitter", "contact_friction"):
+ value = getattr(self, name)
+ if isinstance(value, bool) or not math.isfinite(value) or value < 0:
+ raise ValueError(f"{name} must be finite and nonnegative")
+ if not isinstance(self.rope_nodes, int) or isinstance(self.rope_nodes, bool) or not 5 <= self.rope_nodes <= 65:
+ raise ValueError("rope_nodes must be an integer in [5, 65]")
+ if not math.isfinite(self.variation_fraction) or not 0 <= self.variation_fraction <= 0.2:
+ raise ValueError("variation_fraction must lie in [0, 0.2]")
+ for numerator, denominator, label in ((self.control_dt, self.timestep, "control_dt/timestep"),
+ (self.horizon, self.control_dt, "horizon/control_dt"),
+ (self.settle_time, self.timestep, "settle_time/timestep")):
+ ratio = numerator / denominator
+ if not math.isclose(ratio, round(ratio), rel_tol=0, abs_tol=1e-9):
+ raise ValueError(f"{label} must be a positive integer")
+ if self.control_dt < self.timestep or self.horizon < self.control_dt or self.dwell > self.horizon:
+ raise ValueError("invalid timing range")
+ if self.rope_radius * 4 >= self.rope_length / (self.rope_nodes - 1):
+ raise ValueError("rope radius must be smaller than one quarter of segment length")
+ offset = np.asarray(self.target_offset, dtype=float)
+ if offset.shape != (3,) or not np.isfinite(offset).all():
+ raise ValueError("target_offset must be three finite SI coordinates")
+ object.__setattr__(self, "target_offset", tuple(float(x) for x in offset))
+
+
+class CableEndReachEnv:
+ """Seeded feedback task with actual endpoint dwell and explicit failures.
+
+ ``reset(seed) -> (observation, info)``
+ ``step(force) -> (observation, reward, terminated, truncated, info)``
+
+ Force is a world-frame 3-vector in newtons. Invalid actions raise ValueError
+ before changing state. Stepping after termination/truncation raises RuntimeError.
+ ``snapshot`` and ``restore`` preserve the complete integration state plus
+ episode counters; snapshots are JSON-compatible and restricted to this config.
+ """
+
+ def __init__(self, config: Config | None = None):
+ self.config = config or Config()
+ if not isinstance(self.config, Config):
+ raise TypeError("config must be Config")
+ if mujoco.mj_versionString() != PIN or mujoco.__version__ != PIN:
+ raise RuntimeError(f"This task requires native MuJoCo {PIN}")
+ self.config_hash = _digest(asdict(self.config))
+ self.model = None
+ self.data = None
+ self._ready = False
+ self._done = False
+
+ @contextmanager
+ def _warnings(self, collected: list[str]):
+ # MuJoCo callbacks are process-global. Serialize our native sections and
+ # restore any preexisting callback without modifying global configuration.
+ with _NATIVE_LOCK:
+ previous = mujoco.get_mju_user_warning()
+ mujoco.set_mju_user_warning(lambda message: collected.append(str(message)))
+ try:
+ yield
+ finally:
+ mujoco.set_mju_user_warning(previous)
+
+ def _make_scene(self, parameters: dict[str, float]):
+ c = self.config
+ xml = f'''
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '''
+ spec = mujoco.MjSpec.from_string(xml)
+ last = spec.body("B_last")
+ if last is None or len(last.geoms) != 1:
+ raise RuntimeError("Installed cable generator has an unsupported endpoint layout")
+ # The generated final capsule has an explicit local from/to centerline.
+ # Place the force site at its actual far endpoint, not at body COM.
+ tip_local = np.asarray(last.geoms[0].fromto[3:], dtype=float)
+ if not np.isfinite(tip_local).all() or np.linalg.norm(tip_local) <= 0:
+ raise RuntimeError("Cable endpoint centerline could not be identified")
+ last.add_site(name="rope_tip", pos=tip_local, size=[parameters["rope_radius"]], rgba=[0.2, 0.6, 0.9, 1])
+ self.scene_xml = spec.to_xml()
+ model = spec.compile()
+ return model
+
+ def reset(self, seed: int = 0):
+ if not isinstance(seed, (int, np.integer)) or isinstance(seed, bool) or seed < 0:
+ raise ValueError("seed must be a nonnegative integer")
+ self._ready = False
+ self.seed = int(seed)
+ rng = np.random.default_rng(seed)
+ c = self.config
+ self.parameters = {name: float(getattr(c, name) * rng.uniform(1 - c.variation_fraction, 1 + c.variation_fraction))
+ for name in ("rope_length", "rope_radius", "density", "bend", "twist")}
+ if 4 * self.parameters["rope_radius"] >= self.parameters["rope_length"] / (c.rope_nodes - 1):
+ raise ValueError("Seeded radius/length violates the segment-clearance profile")
+ warnings = []
+ with self._warnings(warnings):
+ self.model = self._make_scene(self.parameters)
+ self.data = mujoco.MjData(self.model)
+ self.tip_site_id = mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_SITE, "rope_tip")
+ self.tip_body_id = int(self.model.site_bodyid[self.tip_site_id])
+ self._rope_body_ids = np.arange(1, self.model.nbody, dtype=int)
+ self.anchor = self.model.body_pos[1].copy()
+ self._last_action = np.zeros(3)
+ mujoco.mj_resetData(self.model, self.data)
+ mujoco.mj_forward(self.model, self.data)
+ for _ in range(round(c.settle_time / c.timestep)):
+ before = float(self.data.time)
+ mujoco.mj_step(self.model, self.data)
+ if not self._finite() or not math.isclose(float(self.data.time) - before, c.timestep, rel_tol=0, abs_tol=1e-10):
+ raise RuntimeError("Cable settling diverged or silently reset")
+ mujoco.mj_forward(self.model, self.data)
+ if warnings or self._warning_counts():
+ raise RuntimeError(f"Cable settling produced warnings: {warnings or self._warning_counts()}")
+ jitter = rng.uniform(-c.target_jitter, c.target_jitter, 3)
+ self.target = self.data.site_xpos[self.tip_site_id].copy() + np.asarray(c.target_offset) + jitter
+ # First segment is fixed. The remaining rope cannot leave the sphere
+ # centered at its first movable joint. This is a conservative reach check,
+ # not proof that the controller can reach every accepted target.
+ first_movable = self.data.xpos[2].copy()
+ fixed_segment = float(np.linalg.norm(first_movable - self.anchor))
+ free_length = self.parameters["rope_length"] - fixed_segment
+ if np.linalg.norm(self.target - first_movable) > free_length * 0.98:
+ raise ValueError("target is outside the conservative anchored-cable reach envelope")
+ if np.linalg.norm(self.target - self.data.site_xpos[self.tip_site_id]) <= c.tolerance:
+ raise ValueError("target must require nontrivial endpoint movement")
+ self.scene_hash = _digest({"mjcf": self.scene_xml, "target": self.target.tolist(), "parameters": self.parameters})
+ self._elapsed = 0.0
+ self._steps = 0
+ self._dwell_elapsed = 0.0
+ self._done = False
+ self._terminated = False
+ self._truncated = False
+ self._reason = "running"
+ self._native_start_time = float(self.data.time)
+ self._all_warnings = []
+ self._contact_samples = 0
+ self._max_contacts = 0
+ self._ready = True
+ return self._observation(), self._info()
+
+ def _finite(self):
+ return all(np.isfinite(values).all() for values in (self.data.qpos, self.data.qvel, self.data.qacc,
+ self.data.plugin_state, self.data.site_xpos))
+
+ def _warning_counts(self):
+ return {mujoco.mjtWarning(i).name: int(w.number) for i, w in enumerate(self.data.warning) if w.number}
+
+ def _observation(self):
+ if not self._observations_available():
+ return {"endpoint_position": [], "endpoint_velocity": [],
+ "target": self.target.tolist(), "rope_points": [],
+ "last_action": self._last_action.tolist()}
+ velocity = np.zeros(6)
+ mujoco.mj_objectVelocity(self.model, self.data, mujoco.mjtObj.mjOBJ_SITE, self.tip_site_id, velocity, 0)
+ points = np.vstack((self.data.xpos[self._rope_body_ids], self.data.site_xpos[self.tip_site_id]))
+ return {"endpoint_position": self.data.site_xpos[self.tip_site_id].tolist(),
+ "endpoint_velocity": velocity[3:].tolist(), "target": self.target.tolist(),
+ "rope_points": points.tolist(), "last_action": self._last_action.tolist()}
+
+ def _observations_available(self):
+ return self._reason not in ("invalid_state", "engine_exception") and self._finite()
+
+ def _info(self):
+ native_time = float(self.data.time)
+ distance = (float(np.linalg.norm(self.data.site_xpos[self.tip_site_id] - self.target))
+ if self._observations_available() else None)
+ if distance is not None and not math.isfinite(distance):
+ distance = None
+ return {"env_id": ENV_ID, "seed": self.seed, "reason": self._reason,
+ "valid": self._reason not in ("invalid_state", "solver_warning", "workspace_violation", "engine_exception"),
+ "success": self._terminated and self._reason == "success",
+ "simulation_time": self._elapsed,
+ "native_time": native_time if math.isfinite(native_time) else None,
+ "steps": self._steps, "dwell_elapsed": self._dwell_elapsed,
+ "observations_available": self._observations_available(),
+ "distance": distance,
+ "contact_count": int(self.data.ncon), "contact_samples": self._contact_samples,
+ "max_contact_count": self._max_contacts, "warnings": list(self._all_warnings),
+ "warning_counts": self._warning_counts(), "config_hash": self.config_hash,
+ "scene_hash": self.scene_hash, "config": asdict(self.config), "parameters": dict(self.parameters),
+ "engine": PIN, "numpy": np.__version__, "qualification": "simulation-only",
+ "observation_profile": "privileged-simulator-state", "actuation_profile": "ideal-endpoint-cartesian-force-v0",
+ "anchor": self.anchor.tolist(), "force_limit": self.config.force_limit,
+ "workspace_radius": self.config.workspace_radius_factor * self.parameters["rope_length"],
+ "physics_substeps": round(self.config.control_dt / self.config.timestep)}
+
+ def step(self, force):
+ if not self._ready:
+ raise RuntimeError("reset is required before step")
+ if self._done:
+ raise RuntimeError("episode is finished; reset before another step")
+ try:
+ action = np.asarray(force, dtype=float)
+ except (TypeError, ValueError) as error:
+ raise ValueError("force must be three finite world-frame newton values") from error
+ if action.shape != (3,) or not np.isfinite(action).all() or np.linalg.norm(action) > self.config.force_limit + 1e-12:
+ raise ValueError("force must be finite, shape (3,), and within the configured norm limit")
+ previous_distance = float(np.linalg.norm(self.data.site_xpos[self.tip_site_id] - self.target))
+ self._last_action = action.copy()
+ warnings = []
+ failure = None
+ with self._warnings(warnings):
+ try:
+ for _ in range(round(self.config.control_dt / self.config.timestep)):
+ self.data.qfrc_applied[:] = 0
+ mujoco.mj_applyFT(self.model, self.data, action, np.zeros(3),
+ self.data.site_xpos[self.tip_site_id], self.tip_body_id, self.data.qfrc_applied)
+ before = float(self.data.time)
+ mujoco.mj_step(self.model, self.data)
+ if not self._finite() or not math.isclose(float(self.data.time) - before, self.config.timestep, rel_tol=0, abs_tol=1e-10):
+ failure = "invalid_state"
+ break
+ mujoco.mj_forward(self.model, self.data)
+ if not self._finite():
+ failure = "invalid_state"
+ break
+ self._elapsed += self.config.timestep
+ self._contact_samples += int(self.data.ncon)
+ self._max_contacts = max(self._max_contacts, int(self.data.ncon))
+ if warnings or self._warning_counts():
+ failure = "solver_warning"
+ break
+ if np.max(np.linalg.norm(self.data.xpos[self._rope_body_ids] - self.anchor, axis=1)) > self.config.workspace_radius_factor * self.parameters["rope_length"]:
+ failure = "workspace_violation"
+ break
+ distance = float(np.linalg.norm(self.data.site_xpos[self.tip_site_id] - self.target))
+ self._dwell_elapsed = self._dwell_elapsed + self.config.timestep if distance <= self.config.tolerance else 0.0
+ except (mujoco.FatalError, mujoco.UnexpectedError) as error:
+ warnings.append(str(error))
+ failure = "engine_exception"
+ self._all_warnings.extend(warnings)
+ self._steps += 1
+ if failure:
+ self._reason = failure
+ self._terminated = True
+ elif self._dwell_elapsed + 1e-12 >= self.config.dwell:
+ self._reason = "success"
+ self._terminated = True
+ elif self._steps >= round(self.config.horizon / self.config.control_dt):
+ self._reason = "horizon"
+ self._truncated = True
+ self._done = self._terminated or self._truncated
+ observation = self._observation()
+ distance = (float(np.linalg.norm(np.asarray(observation["endpoint_position"]) - self.target))
+ if self._observations_available() else previous_distance)
+ reward = previous_distance - distance - 0.001 * float(np.dot(action, action)) * self.config.control_dt
+ if self._reason == "success":
+ reward += 1.0
+ if failure:
+ reward = -1.0
+ return observation, float(reward), self._terminated, self._truncated, self._info()
+
+ def snapshot(self):
+ if not self._ready:
+ raise RuntimeError("reset is required before snapshot")
+ if not self._info()["valid"] or not self._observations_available():
+ raise RuntimeError("invalid numerical/workspace episodes have no resumable snapshot")
+ state = np.empty(mujoco.mj_stateSize(self.model, STATE_SIGNATURE))
+ mujoco.mj_getState(self.model, self.data, state, STATE_SIGNATURE)
+ return {"schema_version": 1, "env_id": ENV_ID, "engine": PIN,
+ "config_hash": self.config_hash, "scene_hash": self.scene_hash,
+ "seed": self.seed, "state_signature": STATE_SIGNATURE, "integration_state": state.tolist(),
+ "plugin_state": self.data.plugin_state.tolist(), "target": self.target.tolist(),
+ "warning_state": [{"number": int(w.number), "lastinfo": int(w.lastinfo)} for w in self.data.warning],
+ "episode": {"elapsed": self._elapsed, "steps": self._steps, "dwell_elapsed": self._dwell_elapsed,
+ "done": self._done, "terminated": self._terminated, "truncated": self._truncated,
+ "reason": self._reason, "native_start_time": self._native_start_time,
+ "last_action": self._last_action.tolist(), "warnings": list(self._all_warnings),
+ "contact_samples": self._contact_samples, "max_contacts": self._max_contacts}}
+
+ def restore(self, snapshot):
+ if not isinstance(snapshot, dict) or snapshot.get("schema_version") != 1 or snapshot.get("env_id") != ENV_ID or snapshot.get("engine") != PIN:
+ raise ValueError("unsupported snapshot schema/environment/engine")
+ if snapshot.get("config_hash") != self.config_hash or snapshot.get("state_signature") != STATE_SIGNATURE:
+ raise ValueError("snapshot configuration/state signature mismatch")
+ # Validate all episode metadata before resetting or mutating this live
+ # environment. A separate candidate also protects against native forward
+ # errors in an externally supplied but superficially finite state.
+ try:
+ seed = snapshot["seed"]
+ if not isinstance(seed, int) or isinstance(seed, bool) or seed < 0:
+ raise ValueError("invalid seed")
+ state = np.asarray(snapshot["integration_state"], dtype=float)
+ target = np.asarray(snapshot["target"], dtype=float)
+ plugin = np.asarray(snapshot["plugin_state"], dtype=float)
+ episode = snapshot["episode"]
+ if not isinstance(episode, dict):
+ raise ValueError("invalid episode")
+ steps = episode["steps"]
+ if not isinstance(steps, int) or isinstance(steps, bool) or not 0 <= steps <= round(self.config.horizon / self.config.control_dt):
+ raise ValueError("invalid step count")
+ elapsed, dwell, native_start = (float(episode[name]) for name in ("elapsed", "dwell_elapsed", "native_start_time"))
+ if not all(math.isfinite(x) and x >= 0 for x in (elapsed, dwell, native_start)):
+ raise ValueError("invalid times")
+ if not math.isclose(elapsed, steps * self.config.control_dt, rel_tol=0, abs_tol=1e-9) or dwell > elapsed + 1e-9:
+ raise ValueError("inconsistent elapsed/dwell")
+ done, terminated, truncated = (episode[name] for name in ("done", "terminated", "truncated"))
+ if any(type(flag) is not bool for flag in (done, terminated, truncated)):
+ raise ValueError("invalid termination flags")
+ reason = episode["reason"]
+ expected = {"running": (False, False, False), "success": (True, True, False), "horizon": (True, False, True)}
+ if reason not in expected or (done, terminated, truncated) != expected[reason]:
+ raise ValueError("inconsistent termination reason")
+ if reason == "horizon" and steps != round(self.config.horizon / self.config.control_dt):
+ raise ValueError("premature horizon")
+ if reason == "running" and steps >= round(self.config.horizon / self.config.control_dt):
+ raise ValueError("unfinished horizon")
+ if (reason == "success") != (dwell + 1e-12 >= self.config.dwell):
+ raise ValueError("inconsistent success/dwell")
+ last_action = np.asarray(episode["last_action"], dtype=float)
+ if last_action.shape != (3,) or not np.isfinite(last_action).all() or np.linalg.norm(last_action) > self.config.force_limit + 1e-12:
+ raise ValueError("invalid last action")
+ warnings = episode["warnings"]
+ if not isinstance(warnings, list) or warnings:
+ raise ValueError("warning-bearing episodes are not resumable")
+ counts = [episode["contact_samples"], episode["max_contacts"]]
+ if any(not isinstance(x, int) or isinstance(x, bool) or x < 0 for x in counts):
+ raise ValueError("invalid contact counts")
+ warning_state = snapshot["warning_state"]
+ if not isinstance(warning_state, list) or len(warning_state) != int(mujoco.mjtWarning.mjNWARNING):
+ raise ValueError("invalid warning state")
+ for warning in warning_state:
+ if not isinstance(warning, dict) or set(warning) != {"number", "lastinfo"} or any(not isinstance(x, int) or isinstance(x, bool) or x < 0 for x in warning.values()) or warning["number"]:
+ raise ValueError("invalid warning diagnostics")
+ if state.ndim != 1 or not np.isfinite(state).all() or target.shape != (3,) or not np.isfinite(target).all() or plugin.ndim != 1 or not np.isfinite(plugin).all():
+ raise ValueError("invalid physics state shape/values")
+ if not len(state) or not math.isclose(float(state[0]), native_start + elapsed, rel_tol=0, abs_tol=1e-9):
+ raise ValueError("inconsistent native clock")
+ except (KeyError, TypeError, ValueError, OverflowError) as error:
+ raise ValueError(f"invalid snapshot metadata: {error}") from error
+ candidate = CableEndReachEnv(self.config)
+ candidate.reset(seed)
+ if snapshot.get("scene_hash") != candidate.scene_hash or target.tolist() != candidate.target.tolist():
+ raise ValueError("snapshot scene/target mismatch")
+ if state.shape != (mujoco.mj_stateSize(candidate.model, STATE_SIGNATURE),) or plugin.shape != candidate.data.plugin_state.shape:
+ raise ValueError("snapshot integration/plugin state has invalid shape")
+ if not math.isclose(native_start, candidate._native_start_time, rel_tol=0, abs_tol=1e-10):
+ raise ValueError("snapshot settling clock mismatch")
+ forward_warnings = []
+ try:
+ with candidate._warnings(forward_warnings):
+ mujoco.mj_setState(candidate.model, candidate.data, state, STATE_SIGNATURE)
+ # Populate derived poses/velocities, then restore the complete saved
+ # integration values so mj_forward cannot change the warm start.
+ mujoco.mj_forward(candidate.model, candidate.data)
+ mujoco.mj_setState(candidate.model, candidate.data, state, STATE_SIGNATURE)
+ except (mujoco.FatalError, mujoco.UnexpectedError) as error:
+ raise ValueError(f"snapshot physics could not be restored: {error}") from error
+ if forward_warnings or not candidate._finite() or candidate._warning_counts():
+ raise ValueError("snapshot physics produced invalid state/warnings")
+ if candidate.data.plugin_state.tolist() != plugin.tolist():
+ raise ValueError("snapshot plugin state mismatch")
+ if reason == "success" and np.linalg.norm(candidate.data.site_xpos[candidate.tip_site_id] - target) > self.config.tolerance:
+ raise ValueError("snapshot success lacks an endpoint inside the target")
+ for i, warning in enumerate(warning_state):
+ candidate.data.warning[i].number = warning["number"]
+ candidate.data.warning[i].lastinfo = warning["lastinfo"]
+ candidate._elapsed, candidate._steps, candidate._dwell_elapsed = elapsed, steps, dwell
+ candidate._done, candidate._terminated, candidate._truncated = done, terminated, truncated
+ candidate._reason, candidate._native_start_time = reason, native_start
+ candidate._last_action = last_action.copy()
+ candidate._all_warnings = list(warnings)
+ candidate._contact_samples, candidate._max_contacts = counts
+ self.__dict__.update(candidate.__dict__)
+ return self._observation()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/installer.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/installer.py
new file mode 100644
index 0000000..9fd3167
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/installer.py
@@ -0,0 +1,112 @@
+"""Public DVIDIA metadata installation; no downloaded code is executed."""
+from __future__ import annotations
+
+from hashlib import sha256
+import json
+from pathlib import Path
+import re
+from urllib.parse import urlsplit
+from urllib.request import Request, build_opener, HTTPRedirectHandler
+
+from .skillspace import inspect_skillspace, load_skillspace
+
+MAX_SOURCE_BYTES = 128 * 1024
+PART = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_-]{0,79}$")
+POLICY_ORIGIN = 'locally authored articulated-arm placement controller; source metadata is not a trained policy'
+
+
+def resolve_skill_url(value: str) -> str:
+ """Resolve an observed public store route to its explicit pack envelope."""
+ if not isinstance(value, str) or len(value) > 1000:
+ raise ValueError('Supply a public https://dvidia.org/store/owner/skill link.')
+ parts = urlsplit(value.strip())
+ if (parts.scheme != 'https' or parts.netloc not in ('dvidia.org', 'www.dvidia.org')
+ or parts.query or parts.fragment):
+ raise ValueError('Use a public DVIDIA HTTPS store or skill.json link without a query or fragment.')
+ path = parts.path.rstrip('/').split('/')[1:]
+ if len(path) == 3 and path[0] == 'store':
+ owner, skill = path[1:]
+ elif len(path) == 4 and path[0] == 'packs' and path[3] == 'skill.json':
+ owner, skill = path[1:3]
+ else:
+ raise ValueError('This link is not a public skill release. Device-local Skillspace plans need a JSON export.')
+ if not PART.fullmatch(owner) or not PART.fullmatch(skill):
+ raise ValueError('The owner or skill name in this link is invalid.')
+ return f'https://dvidia.org/packs/{owner}/{skill}/skill.json'
+
+
+class _NoRedirect(HTTPRedirectHandler):
+ def redirect_request(self, *args, **kwargs):
+ raise ValueError('Skill download redirected. Use its direct public DVIDIA JSON link.')
+
+
+def fetch_skill_url(value: str) -> tuple[bytes, str]:
+ url = resolve_skill_url(value)
+ opener = build_opener(_NoRedirect())
+ request = Request(url, headers={'Accept': 'application/json', 'User-Agent': 'DVIDIA-SimLab/0.2'})
+ with opener.open(request, timeout=12) as response:
+ data = response.read(MAX_SOURCE_BYTES + 1)
+ if not data or len(data) > MAX_SOURCE_BYTES:
+ raise ValueError('Skill source is empty or exceeds the 128 KiB metadata limit.')
+ inspect_skillspace(data)
+ return data, url
+
+
+def install_source(data: bytes | str, grounding: dict, directory: Path,
+ *, source_url: str | None = None) -> dict:
+ if source_url is not None:
+ source_url = resolve_skill_url(source_url)
+ raw = data.encode('utf8') if isinstance(data, str) else data
+ if not isinstance(raw, bytes) or not raw or len(raw) > MAX_SOURCE_BYTES:
+ raise ValueError('Supply at most 128 KiB of Skillspace JSON.')
+ inspect_skillspace(raw)
+ source = json.loads(raw)
+ inline = 'simulation_grounding' in source
+ if inline:
+ grounding = source['simulation_grounding']
+ skill = load_skillspace(raw, None if inline else grounding)
+ identity = sha256(raw + json.dumps(grounding, sort_keys=True, allow_nan=False).encode()).hexdigest()[:24]
+ record = {'schema_version': 1, 'installation_id': identity,
+ 'status': 'installed_simulation_adapter', 'scope': 'simulation-only',
+ 'source_url': source_url, 'source_sha256': sha256(raw).hexdigest(),
+ 'source': source, 'grounding': grounding, 'grounding_mode': 'inline' if inline else 'sidecar',
+ 'skill': skill.to_dict(),
+ 'policy_origin': POLICY_ORIGIN,
+ 'physical_robot_ready': False}
+ target = Path(directory) / identity
+ target.mkdir(parents=True, exist_ok=True)
+ (target / 'source.json').write_bytes(raw)
+ (target / 'installation.json').write_text(json.dumps(record, indent=2, allow_nan=False)+'\n', encoding='utf8')
+ return record
+
+
+def read_installation(directory: Path, identity: str) -> dict:
+ if not isinstance(identity, str) or not re.fullmatch(r'[a-f0-9]{24}', identity):
+ raise ValueError('Choose an installed skill.')
+ root = Path(directory) / identity
+ record = json.loads((root / 'installation.json').read_text(encoding='utf8'))
+ source = (root / 'source.json').read_bytes()
+ fields = {'schema_version','installation_id','status','scope','source_url','source_sha256','source',
+ 'grounding','grounding_mode','skill','policy_origin','physical_robot_ready'}
+ if type(record) is not dict or set(record) != fields:
+ raise ValueError('Installation envelope is invalid. Install this release again.')
+ for key, value in {'schema_version':1,'status':'installed_simulation_adapter','scope':'simulation-only',
+ 'policy_origin':POLICY_ORIGIN,'physical_robot_ready':False}.items():
+ if type(record[key]) is not type(value) or record[key] != value:
+ raise ValueError('Installation provenance is invalid. Install this release again.')
+ inline = 'simulation_grounding' in json.loads(source)
+ if record['grounding_mode'] != ('inline' if inline else 'sidecar'):
+ raise ValueError('Installation grounding mode is invalid.')
+ if inline and record['grounding'] != json.loads(source)['simulation_grounding']:
+ raise ValueError('Installed inline grounding does not match its source.')
+ if record['source_url'] is not None and resolve_skill_url(record['source_url']) != record['source_url']:
+ raise ValueError('Installation source URL must be its canonical public JSON link.')
+ if record.get('installation_id') != identity or sha256(source).hexdigest() != record.get('source_sha256'):
+ raise ValueError('Installed source integrity check failed. Install this release again.')
+ skill = load_skillspace(source, None if record.get('grounding_mode') == 'inline' else record['grounding'])
+ if skill.to_dict() != record['skill'] or json.loads(source) != record['source']:
+ raise ValueError('Installed grounding integrity check failed. Install this release again.')
+ expected = sha256(source + json.dumps(record['grounding'], sort_keys=True, allow_nan=False).encode()).hexdigest()[:24]
+ if identity != expected:
+ raise ValueError('Installation identity does not match its source and grounding.')
+ return record
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/native_offline_check.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/native_offline_check.py
new file mode 100644
index 0000000..c88f5fb
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/native_offline_check.py
@@ -0,0 +1,52 @@
+"""macOS-only system network-denial check; run under sandbox-exec, never bare."""
+import ctypes
+import errno
+import json
+from pathlib import Path
+import platform
+import socket
+import struct
+import sys
+from .cli import NetworkGuard, payload_for, rollout, write_run
+from .env import Config
+from .pack import encode
+from .policies import FeedbackPolicy
+
+
+def main():
+ if platform.system() != 'Darwin':
+ raise RuntimeError('This verification harness is macOS-specific.')
+ libc = ctypes.CDLL(None, use_errno=True)
+ libc.socket.argtypes = [ctypes.c_int,ctypes.c_int,ctypes.c_int]
+ libc.connect.argtypes = [ctypes.c_int,ctypes.c_void_p,ctypes.c_uint32]
+ libc.close.argtypes = [ctypes.c_int]
+ descriptor = libc.socket(socket.AF_INET,socket.SOCK_STREAM,0)
+ observed_errno = ctypes.get_errno() if descriptor < 0 else 0
+ if descriptor >= 0:
+ # BSD sockaddr_in: length, address family, network-order port, loopback.
+ address = ctypes.create_string_buffer(struct.pack('BBH4s8s',16,socket.AF_INET,socket.htons(9),socket.inet_aton('127.0.0.1'),bytes(8)))
+ result = libc.connect(descriptor,address,16)
+ observed_errno = ctypes.get_errno() if result < 0 else 0
+ libc.close(descriptor)
+ if observed_errno not in (errno.EPERM,errno.EACCES):
+ raise RuntimeError(f'Native policy self-test was not denied: errno={observed_errno}. Launch under the documented sandbox policy.')
+ config = Config()
+ parameters = FeedbackPolicy().parameters()
+ with NetworkGuard(True) as guard:
+ episodes = [rollout(config,seed,parameters) for seed in [300,301,302]]
+ payload = payload_for(config,episodes,parameters,guard)
+ if guard.attempts or not all(e['success'] for e in episodes):
+ raise RuntimeError('Offline runtime verification failed.')
+ payload['native_network_policy'] = {
+ 'platform':'macOS sandbox-exec', 'policy':'(version 1) (allow default) (deny network*)',
+ 'native_connect_self_test':'127.0.0.1:9 via libc, denied before rollouts',
+ 'errno':observed_errno, 'passed':True,
+ 'scope':'Installed runtime and child process network denied; does not exercise air-gapped installation or another operating system.'}
+ output = Path(sys.argv[1]) if len(sys.argv)>1 else Path('runs/native-offline')
+ write_run(output,payload,parameters)
+ (output/'native-policy.json').write_bytes(encode(payload['native_network_policy']))
+ print(json.dumps(payload['native_network_policy']))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/pack.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/pack.py
new file mode 100644
index 0000000..470734a
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/pack.py
@@ -0,0 +1,92 @@
+"""Hashed, inspectable simulation skill packs. No automatic code execution."""
+import hashlib
+import json
+from pathlib import Path, PurePosixPath
+import platform
+import zipfile
+import mujoco
+import numpy as np
+
+
+def digest(data):
+ return hashlib.sha256(data).hexdigest()
+
+
+def encode(value):
+ return (json.dumps(value, indent=2, sort_keys=True, allow_nan=False) + '\n').encode()
+
+
+def export_pack(path, payload, policy):
+ root = Path(__file__).resolve().parent
+ files = {f'code/simlab/{p.name}': p.read_bytes() for p in sorted(root.glob('*.py'))}
+ files['requirements.lock.txt'] = (root / 'requirements.lock.txt').read_bytes()
+ files['code/simlab/requirements.lock.txt'] = files['requirements.lock.txt']
+ files['LICENSE'] = (root/'LICENSE').read_bytes()
+ files['code/simlab/LICENSE'] = files['LICENSE']
+ files['run.json'] = encode(payload)
+ files['policy.json'] = encode(policy)
+ files['README.md'] = (
+ '# DVIDIA simulation-only skill pack\n\n'
+ 'Task: CableEndReach-v0. Actuation: ideal Cartesian force attachment at the cable tip. '
+ 'Observations: privileged simulator state. No physical robot or sensor qualification.\n\n'
+ 'Verify this archive with `python -m simlab verify-pack skill-pack.zip`. '
+ 'After inspecting and unpacking it, create a Python 3.12 environment, install '
+ '`requirements.lock.txt`, and use `PYTHONPATH=code python -m simlab run '
+ '--config run.json --policy-file policy.json --seeds 100,101,102 --output replay`. '
+ 'Dependencies must be staged separately for an air-gapped installation.\n'
+ ).encode()
+ episodes = payload['episodes']
+ manifest = {
+ 'schema_version': 1, 'task': 'CableEndReach-v0', 'status': 'simulation-only',
+ 'actuation_profile': 'cartesian_endpoint_force_v0',
+ 'observation_profile': 'privileged_simulator_state_v0',
+ 'physical_evidence': None,
+ 'config': payload['config'],
+ 'dependency_versions': {'python': platform.python_version(), 'mujoco': mujoco.__version__, 'numpy': np.__version__},
+ 'qualification': {
+ 'scope': 'fixed simulated seed suite; no physical or GPU qualification',
+ 'seeds': [e['seed'] for e in episodes],
+ 'successes': sum(e['success'] for e in episodes), 'episodes': len(episodes),
+ 'training_seeds': payload.get('training_seeds', []),
+ },
+ 'files': {name: {'sha256': digest(data), 'bytes': len(data)} for name, data in files.items()},
+ }
+ path = Path(path)
+ path.parent.mkdir(parents=True, exist_ok=True)
+ with zipfile.ZipFile(path, 'w', zipfile.ZIP_DEFLATED) as archive:
+ for name, data in sorted(files.items()):
+ archive.writestr(name, data)
+ archive.writestr('manifest.json', encode(manifest))
+ return manifest
+
+
+def verify_pack(path):
+ with zipfile.ZipFile(path) as archive:
+ names = archive.namelist()
+ if len(names) != len(set(names)) or len(names) > 64:
+ raise ValueError('Duplicate entries or oversized file list.')
+ for item in archive.infolist():
+ p = PurePosixPath(item.filename)
+ if p.is_absolute() or '..' in p.parts or '\\' in item.filename or item.file_size > 50_000_000:
+ raise ValueError('Unsafe archive entry.')
+ if sum(item.file_size for item in archive.infolist()) > 100_000_000:
+ raise ValueError('Archive exceeds verification budget.')
+ manifest = json.loads(archive.read('manifest.json'))
+ if manifest.get('schema_version') != 1 or manifest.get('status') != 'simulation-only':
+ raise ValueError('Unsupported skill manifest.')
+ if set(names) != set(manifest['files']) | {'manifest.json'}:
+ raise ValueError('Manifest file list mismatch.')
+ for name, expected in manifest['files'].items():
+ data = archive.read(name)
+ if len(data) != expected['bytes'] or digest(data) != expected['sha256']:
+ raise ValueError(f'Artifact hash mismatch: {name}')
+ payload = json.loads(archive.read('run.json'))
+ if payload['config'] != manifest['config']:
+ raise ValueError('Configuration mismatch.')
+ seeds = [episode['seed'] for episode in payload['episodes']]
+ if seeds != manifest['qualification']['seeds']:
+ raise ValueError('Qualification seed mismatch.')
+ qualification = manifest['qualification']
+ if len(seeds) != qualification['episodes'] or sum(e['success'] for e in payload['episodes']) != qualification['successes']:
+ raise ValueError('Qualification count mismatch.')
+ return manifest
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/place_cup.skill.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/place_cup.skill.json
new file mode 100644
index 0000000..8988249
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/place_cup.skill.json
@@ -0,0 +1,13 @@
+{
+ "vdia": "0",
+ "skill": "place_cup",
+ "version": "0.3.0",
+ "task": "Set a cup on the mark.",
+ "rail": "physical",
+ "demos": 1,
+ "format": "lerobot/v3",
+ "codebase_version": "v3.0",
+ "robot_type": "dvidia.wrist_room",
+ "cameras": ["ego", "room"],
+ "residual": {"claimer": 0.5, "contributors": 0.5, "book": "not-live"}
+}
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/policies.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/policies.py
new file mode 100644
index 0000000..23e066f
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/policies.py
@@ -0,0 +1,43 @@
+"""Small explicit controllers; parameters can be tuned in local simulation."""
+from dataclasses import asdict, dataclass
+import numpy as np
+
+
+@dataclass(frozen=True)
+class FeedbackPolicy:
+ force_limit: float = 2.0
+ kp: float = 10.0
+ kd: float = 0.25
+ gravity_bias: float = 0.1
+
+ def __post_init__(self):
+ values = (self.force_limit, self.kp, self.kd, self.gravity_bias)
+ if not all(np.isfinite(values)) or self.force_limit <= 0 or min(values[1:]) < 0:
+ raise ValueError("Policy parameters must be finite and nonnegative; force limit positive.")
+
+ def __call__(self, observation):
+ delta = np.asarray(observation['target']) - np.asarray(observation['endpoint_position'])
+ force = self.kp * delta - self.kd * np.asarray(observation['endpoint_velocity'])
+ force[2] += self.gravity_bias
+ magnitude = np.linalg.norm(force)
+ if magnitude > self.force_limit:
+ force *= self.force_limit / magnitude
+ return force.tolist()
+
+ def parameters(self):
+ return asdict(self)
+
+
+class ZeroPolicy:
+ def __call__(self, observation):
+ return [0.0, 0.0, 0.0]
+
+
+class ReleasePolicy:
+ """Apply feedback briefly, then remove the ideal attachment's applied force."""
+ def __init__(self, feedback, release_step=10):
+ self.feedback, self.release_step, self.steps = feedback, release_step, 0
+
+ def __call__(self, observation):
+ self.steps += 1
+ return self.feedback(observation) if self.steps <= self.release_step else [0.0, 0.0, 0.0]
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/qualify.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/qualify.py
new file mode 100644
index 0000000..ef5809a
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/qualify.py
@@ -0,0 +1,89 @@
+"""Reproduce the frozen, bounded first-build qualification protocol."""
+from argparse import Namespace
+from dataclasses import replace
+from pathlib import Path
+import sys
+import time
+import numpy as np
+from .cli import NetworkGuard, payload_for, rollout, train, write_run
+from .env import CableEndReachEnv, Config
+from .pack import encode
+from .policies import FeedbackPolicy
+
+
+def numerical_probe():
+ """A fixed-tape regression with independent settling, not physical accuracy."""
+ coarse = CableEndReachEnv()
+ fine = CableEndReachEnv(replace(Config(), timestep=.0005))
+ first, _ = coarse.reset(seed=2)
+ second, _ = fine.reset(seed=2)
+ initial_delta = float(np.linalg.norm(np.asarray(first['endpoint_position'])-second['endpoint_position']))
+ target_delta = float(np.linalg.norm(np.asarray(first['target'])-second['target']))
+ initial = [np.asarray(first['endpoint_position']),np.asarray(second['endpoint_position'])]
+ frames = []
+ for i in range(12):
+ force = FeedbackPolicy()(first)
+ a = coarse.step(force)
+ b = fine.step(force)
+ frames.append({'control_step':i+1, 'action':force,
+ 'coarse_position':a[0]['endpoint_position'], 'fine_position':b[0]['endpoint_position'],
+ 'endpoint_delta_m':float(np.linalg.norm(np.asarray(a[0]['endpoint_position'])-b[0]['endpoint_position'])),
+ 'displacement_delta_m':float(np.linalg.norm((np.asarray(a[0]['endpoint_position'])-initial[0])-(np.asarray(b[0]['endpoint_position'])-initial[1]))),
+ 'coarse_valid':a[4]['valid'], 'fine_valid':b[4]['valid']})
+ first, second = a[0], b[0]
+ environment = CableEndReachEnv()
+ observation, info = environment.reset(seed=2)
+ length = info['parameters']['rope_length']
+ errors = []
+ for _ in range(30):
+ observation, _, done, truncated, info = environment.step(FeedbackPolicy()(observation))
+ points = np.asarray(observation['rope_points'])
+ errors.append(abs(float(np.linalg.norm(np.diff(points,axis=0),axis=1).sum())-length))
+ if done or truncated:
+ break
+ return {'scope':'Numerical regression only. Independent settling changes initial tip and goal; this is not matched-start convergence or physical accuracy.',
+ 'seed':2, 'physics_timesteps_seconds':[.001,.0005], 'initial_endpoint_delta_m':initial_delta,
+ 'target_delta_m':target_delta, 'frames':frames,
+ 'max_endpoint_delta_m':max(f['endpoint_delta_m'] for f in frames),
+ 'authored_rope_length_m':length, 'max_centerline_length_error_m':max(errors),
+ 'regression_limits':{'endpoint_delta_m':.002, 'centerline_length_error_m':1e-7},
+ 'passed':all(f['coarse_valid'] and f['fine_valid'] for f in frames) and max(f['endpoint_delta_m'] for f in frames)<.002 and max(errors)<1e-7}
+
+
+def main():
+ output = Path(sys.argv[1]) if len(sys.argv)>1 else Path('runs/release-v0')
+ config = Config()
+ base = FeedbackPolicy(force_limit=config.force_limit).parameters()
+ args = Namespace(seeds=[0,1,2], eval_seeds=list(range(200,210)), search_seed=31415, iterations=2, population=4)
+ started = time.perf_counter()
+ with NetworkGuard(True) as guard:
+ payload, selected = train(config,args,base,guard)
+ comparisons = {}
+ for name in ['feedback','zero','release']:
+ episodes = [rollout(config,seed,base,name,trace=False) for seed in args.eval_seeds]
+ comparisons[name] = payload_for(config,episodes,base,guard)
+ numeric = numerical_probe()
+ report = {'schema_version':1, 'task':'CableEndReach-v0', 'scope':'simulation-only',
+ 'protocol':{'training_seeds':args.seeds, 'evaluation_seeds':args.eval_seeds,
+ 'controller_frozen_before_evaluation':True,
+ 'training':'9 candidates (baseline plus 2 iterations of 4), 3 training seeds each',
+ 'baseline':'PD kp10, kd0.25, upward bias0.1N; norm cap2N',
+ 'negative_controls':'zero force; baseline feedback for 10 control steps followed by zero force',
+ 'success':'actual endpoint within25mm for200ms continuous dwell; horizon6s',
+ 'prior_development_evaluation_seeds':[100,101,102,103,104]},
+ 'trained_evaluation':payload['summary'], 'selected_parameters':selected,
+ 'comparisons':comparisons, 'numerical_probe':numeric, 'network_guard':guard.record(),
+ 'qualification_execution_wall_seconds_before_output':time.perf_counter()-started,
+ 'physical_evidence':None, 'gpu_measurements':None,
+ 'limitations':'Small authored profile; ideal endpoint force; privileged state; no grasp slip, axial elasticity, sensor model or calibration. No claim of universal coverage or physical transfer.'}
+ if guard.attempts or not numeric['passed']:
+ raise RuntimeError('Qualification execution failed its declared offline/numerical checks.')
+ payload['qualification_protocol'] = report
+ payload['execution_wall_seconds_before_output'] = time.perf_counter()-started
+ write_run(output,payload,selected)
+ (output/'qualification.json').write_bytes(encode(report))
+ print('Frozen qualification recorded with all outcomes, including negative controls.')
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/requirements.lock.txt b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/requirements.lock.txt
new file mode 100644
index 0000000..4e02498
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/requirements.lock.txt
@@ -0,0 +1,10 @@
+absl-py==2.5.0
+etils==1.14.0
+fsspec==2026.9.0
+glfw==2.10.2
+mujoco==3.15.0
+numpy==2.5.3
+PyOpenGL==3.1.10
+typing_extensions==4.16.0
+websockets==17.2
+zipp==4.1.1
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/skillspace.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/skillspace.py
new file mode 100644
index 0000000..579b9b6
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/skillspace.py
@@ -0,0 +1,376 @@
+"""Read actual DVIDIA exports and bind an explicitly authored simulation task.
+
+Skillspace briefs and vdia:0 skill metadata do not contain robot state, actions,
+or calibrated geometry. This bridge preserves that boundary: a source alone
+can be inspected, but execution requires a separate simulation grounding.
+No URLs, media, imports, or source-provided executable code are evaluated here.
+"""
+from __future__ import annotations
+
+from dataclasses import asdict, dataclass
+from datetime import datetime
+import hashlib
+import json
+import math
+import re
+from typing import Any
+
+
+MAX_DOCUMENT_BYTES = 262_144
+SUPPORTED_SKILLS = ("place_cup", "place_object")
+GROUNDING_VERSION = 1
+ARM_PROFILE = "dvidia-authored-6dof-parallel-jaw-v0"
+ADAPTER_ID = "contact-pick-place-box-v0"
+TASK_ID = "ArmPickPlace-v0"
+PROCEDURE = ("approach", "descend", "close", "lift", "transfer", "place", "release", "retreat", "verify")
+WORKSPACE_MIN = (0.25, -0.20, 0.29)
+WORKSPACE_MAX = (0.60, 0.20, 0.55)
+GROUNDING_FIELDS = ("schema_version", "task_type", "provenance", "adapter_id", "arm_profile",
+ "frame", "units", "language_aliases", "workspace", "table_height", "object",
+ "target", "procedure")
+_ALIASES = {
+ "place cup": "place_cup", "place a cup": "place_cup",
+ "place cup on the mark": "place_cup", "place a cup on the mark": "place_cup",
+ "set a cup on the mark": "place_cup",
+ "place object": "place_object", "place an object": "place_object",
+ "place object on the mark": "place_object", "place an object on the mark": "place_object",
+ "set an object on the mark": "place_object",
+}
+
+
+class SkillspaceError(ValueError):
+ """A stable, JSON-reportable parse or unsupported-task failure."""
+
+ def __init__(self, code: str, message: str, fields: tuple[str, ...] = ()):
+ super().__init__(message)
+ self.code = code
+ self.fields = fields
+
+ def as_dict(self) -> dict[str, Any]:
+ return {"code": self.code, "message": str(self), "fields": list(self.fields)}
+
+
+def _invalid(path: str, message: str) -> None:
+ raise SkillspaceError("invalid_document", f"{path}: {message}", (path,))
+
+
+def _record(value: Any, path: str, *, required: tuple[str, ...] = (),
+ allowed: tuple[str, ...] | None = None) -> dict[str, Any]:
+ if type(value) is not dict:
+ _invalid(path, "expected an object")
+ if any(type(key) is not str for key in value):
+ _invalid(path, "object keys must be strings")
+ missing = set(required) - value.keys()
+ if missing:
+ _invalid(path, "missing fields: " + ", ".join(sorted(missing)))
+ if allowed is not None and set(value) - set(allowed):
+ _invalid(path, "unknown fields: " + ", ".join(sorted(set(value) - set(allowed))))
+ return value
+
+
+def _text(value: Any, path: str, maximum: int = 240, *, blank: bool = False) -> str:
+ if type(value) is not str or len(value) > maximum or (not blank and not value.strip()):
+ _invalid(path, f"expected {'0' if blank else '1'}–{maximum} characters")
+ if any((ord(char) < 32 and char not in "\t\n\r") or 127 <= ord(char) <= 159 or 0xD800 <= ord(char) <= 0xDFFF
+ for char in value):
+ _invalid(path, "control characters or unpaired surrogates are not allowed")
+ return value.strip()
+
+
+def _number(value: Any, path: str, minimum: float, maximum: float) -> float:
+ if type(value) not in (int, float) or not minimum <= value <= maximum or not math.isfinite(value):
+ _invalid(path, f"expected a finite number in [{minimum}, {maximum}]")
+ return float(value)
+
+
+def _integer(value: Any, path: str, minimum: int, maximum: int) -> int:
+ if type(value) is not int or not minimum <= value <= maximum:
+ _invalid(path, f"expected an integer in [{minimum}, {maximum}]")
+ return value
+
+
+def _vector(value: Any, path: str, minimum: float, maximum: float) -> tuple[float, float, float]:
+ if type(value) is not list or len(value) != 3:
+ _invalid(path, "expected three numeric coordinates")
+ return tuple(_number(item, f"{path}[{index}]", minimum, maximum)
+ for index, item in enumerate(value))
+
+
+def _canonical(value: Any) -> bytes:
+ try:
+ return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False,
+ allow_nan=False).encode("utf-8")
+ except (ValueError, TypeError, UnicodeError, RecursionError) as exc:
+ raise SkillspaceError("invalid_document", "Source must be finite UTF-8 JSON.") from exc
+
+
+def _json_input(document: dict[str, Any] | str | bytes) -> tuple[dict[str, Any], str, str]:
+ if type(document) is dict:
+ raw = _canonical(document)
+ value = document
+ hash_kind = "canonical_json"
+ elif type(document) in (str, bytes):
+ try:
+ raw = document.encode("utf-8") if type(document) is str else document
+ except UnicodeError as exc:
+ raise SkillspaceError("invalid_document", "Source must be valid UTF-8.") from exc
+ if len(raw) > MAX_DOCUMENT_BYTES:
+ raise SkillspaceError("document_too_large", "Source exceeds the 256 KiB JSON limit.")
+
+ def unique_object(pairs):
+ row = {}
+ for key, value in pairs:
+ if key in row:
+ _invalid(key, "duplicate JSON key")
+ row[key] = value
+ return row
+
+ def nonfinite(token):
+ _invalid("JSON", f"nonfinite constant {token} is not allowed")
+
+ try:
+ value = json.loads(raw.decode("utf-8"), object_pairs_hook=unique_object,
+ parse_constant=nonfinite)
+ except (ValueError, UnicodeError, RecursionError) as exc:
+ if isinstance(exc, SkillspaceError):
+ raise
+ raise SkillspaceError("invalid_document", "Source must be valid finite UTF-8 JSON.") from exc
+ _canonical(value) # Also rejects overflowed floating-point tokens such as 1e999.
+ hash_kind = "exact_bytes"
+ else:
+ raise SkillspaceError("invalid_document", "Expected JSON bytes, text, or a plain dict.")
+ if len(raw) > MAX_DOCUMENT_BYTES:
+ raise SkillspaceError("document_too_large", "Source exceeds the 256 KiB JSON limit.")
+ return _record(value, "source"), hashlib.sha256(raw).hexdigest(), hash_kind
+
+
+def _skill_id(value: str) -> str:
+ normalized = re.sub(r"[ _-]+", " ", value.strip().lower().rstrip("."))
+ identifier = _ALIASES.get(normalized)
+ if identifier is None:
+ raise SkillspaceError("unsupported_task", "Only place_cup and place_object are supported; "
+ f"{value!r} has no compatible placement adapter.", ("skill",))
+ return identifier
+
+
+def _source_metadata(source: dict[str, Any]) -> dict[str, Any]:
+ if source.get("vdia") == "0":
+ _record(source, "source", required=("skill", "version", "task"))
+ skill = _skill_id(_text(source["skill"], "skill", 100))
+ if "rail" in source and source["rail"] != "physical":
+ raise SkillspaceError("unsupported_task", "Only physical placement metadata is supported.")
+ return {"source_format": "vdia:0", "skill_id": skill, "name": source["skill"],
+ "task": _text(source["task"], "task", 1200),
+ "version": _text(source["version"], "version", 40),
+ "source_has_robot_policy": False, "permissions": "not_inferred"}
+ if source.get("format") == "dvidia-contribution-brief":
+ fields = ("format", "schemaVersion", "state", "skillspaceTitle", "brief",
+ "creatorIdentity", "permissions", "commercialProposal")
+ _record(source, "source", required=fields, allowed=fields + ("simulation_grounding",))
+ if type(source["schemaVersion"]) is not int or source["schemaVersion"] != 1 \
+ or source["state"] != "local-proposal" \
+ or source["creatorIdentity"] != "self-declared-local":
+ _invalid("source", "unsupported contribution-brief version or identity state")
+ brief_fields = ("id", "skillspaceId", "version", "taskId", "taskTitle", "goal",
+ "captureChecklist", "creatorHandle", "createdAt")
+ brief = _record(source["brief"], "brief", required=brief_fields, allowed=brief_fields)
+ for key, prefix in (("id", "brief"), ("skillspaceId", "space"), ("taskId", "task")):
+ if type(brief[key]) is not str or not re.fullmatch(
+ prefix + r"-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", brief[key]):
+ _invalid(f"brief.{key}", "expected the immutable DVIDIA ID")
+ _integer(brief["version"], "brief.version", 1, 60)
+ title = _text(brief["taskTitle"], "brief.taskTitle", 100)
+ skill = _skill_id(title)
+ _text(brief["goal"], "brief.goal", 1200)
+ handle = _text(brief["creatorHandle"], "brief.creatorHandle", 32, blank=True)
+ if handle and not re.fullmatch(r"[a-z][a-z0-9]*(?:_[a-z0-9]+)*", handle):
+ _invalid("brief.creatorHandle", "invalid local handle")
+ checklist = brief["captureChecklist"]
+ if type(checklist) is not list or not 1 <= len(checklist) <= 12:
+ _invalid("brief.captureChecklist", "expected 1–12 items")
+ for index, item in enumerate(checklist):
+ _text(item, f"brief.captureChecklist[{index}]", 180)
+ timestamp = _text(brief["createdAt"], "brief.createdAt", 40)
+ try:
+ parsed = datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%fZ")
+ except ValueError as exc:
+ raise SkillspaceError("invalid_document", "brief.createdAt: invalid UTC timestamp") from exc
+ if parsed.strftime("%Y-%m-%dT%H:%M:%S.") + f"{parsed.microsecond // 1000:03d}Z" != timestamp:
+ _invalid("brief.createdAt", "expected canonical UTC millisecond timestamp")
+ permissions = _record(source["permissions"], "permissions",
+ required=("publicReuseGranted", "contributorPermissionRequired"),
+ allowed=("publicReuseGranted", "contributorPermissionRequired"))
+ if permissions != {"publicReuseGranted": False, "contributorPermissionRequired": True}:
+ _invalid("permissions", "unsupported local-brief permission state")
+ expected_terms = {"status": "draft", "premium": "paid", "price": None,
+ "necklace": "planned-included", "hardware": "TBA",
+ "proposedFounderShareBps": 8000, "revenueDenominator": None,
+ "remainingShareRecipients": None, "contributorPermissionRequired": True,
+ "sourceAccess": "open"}
+ terms = _record(source["commercialProposal"], "commercialProposal",
+ required=tuple(expected_terms), allowed=tuple(expected_terms))
+ if any(type(terms[key]) is not type(value) or terms[key] != value
+ for key, value in expected_terms.items()):
+ _invalid("commercialProposal", "unsupported draft commercial terms")
+ return {"source_format": "dvidia-contribution-brief:1", "skill_id": skill,
+ "name": _text(source["skillspaceTitle"], "skillspaceTitle", 80),
+ "task": title, "version": str(brief["version"]), "brief_id": brief["id"],
+ "skillspace_id": brief["skillspaceId"], "task_id": brief["taskId"],
+ "source_has_robot_policy": False, "permissions": "local_only_no_public_reuse"}
+ raise SkillspaceError("unsupported_format", "Expected a vdia:0 skill.json or a "
+ "dvidia-contribution-brief schemaVersion:1 export.")
+
+
+@dataclass(frozen=True)
+class GroundedSkill:
+ """A validated, simulation-only placement contract, never a learned policy."""
+
+ skill_id: str
+ source_name: str
+ source_task: str
+ source_format: str
+ source_version: str
+ source_permissions: str
+ source_sha256: str
+ source_hash_kind: str
+ grounding_sha256: str
+ source_ids: tuple[tuple[str, str], ...]
+ arm_profile: str
+ adapter_id: str
+ task_id: str
+ provenance: str
+ frame: str
+ units: str
+ language_aliases: tuple[str, ...]
+ workspace_min: tuple[float, float, float]
+ workspace_max: tuple[float, float, float]
+ table_height: float
+ object_kind: str
+ object_position: tuple[float, float, float]
+ object_size: tuple[float, float, float]
+ object_mass: float
+ object_friction: float
+ target_position: tuple[float, float, float]
+ position_tolerance: float
+ dwell_seconds: float
+ procedure: tuple[str, ...]
+
+ def to_dict(self) -> dict[str, Any]:
+ # Round-tripping gives JSON arrays rather than Python tuple assumptions.
+ result = json.loads(json.dumps(asdict(self), allow_nan=False))
+ result["source_ids"] = dict(self.source_ids)
+ result.update({"simulation_ready": True, "robot_ready": False,
+ "source_has_robot_policy": False,
+ "object_representation": "authored_box_proxy"})
+ return result
+
+ def as_dict(self) -> dict[str, Any]:
+ return self.to_dict()
+
+
+def _grounding(source: dict[str, Any], sidecar: dict[str, Any] | None) -> dict[str, Any] | None:
+ if sidecar is not None and "simulation_grounding" in source:
+ raise SkillspaceError("ambiguous_grounding", "Supply inline grounding or a sidecar, not both.")
+ value = sidecar if sidecar is not None else source.get("simulation_grounding")
+ if value is None:
+ return None
+ _canonical(value)
+ return _record(value, "simulation_grounding", required=GROUNDING_FIELDS, allowed=GROUNDING_FIELDS)
+
+
+def load_skillspace(document: dict[str, Any] | str | bytes,
+ grounding: dict[str, Any] | None = None) -> GroundedSkill:
+ """Validate a real source plus an explicit local grounding, with no inference.
+
+ Bytes/text preserve the exact uploaded source SHA-256; dict inputs are hashed
+ as canonical JSON, explicitly identified in source_hash_kind. A sidecar is
+ authored scene/controller binding, not source-derived supervision or consent.
+ """
+ source, source_hash, hash_kind = _json_input(document)
+ metadata = _source_metadata(source)
+ row = _grounding(source, grounding)
+ if row is None:
+ raise SkillspaceError("grounding_required", "This source is task metadata. Bind an explicitly "
+ "authored simulation-only placement adapter and metric scene before execution.",
+ tuple("simulation_grounding." + field for field in GROUNDING_FIELDS))
+ if type(row["schema_version"]) is not int or row["schema_version"] != GROUNDING_VERSION:
+ _invalid("simulation_grounding.schema_version", "only version 1 is supported")
+ if row["task_type"] not in SUPPORTED_SKILLS or row["task_type"] != metadata["skill_id"]:
+ raise SkillspaceError("unsupported_task", "Grounding task_type must match the supported source skill.",
+ ("simulation_grounding.task_type",))
+ for field, expected in (("provenance", "authored_simulation_adapter"), ("adapter_id", ADAPTER_ID),
+ ("arm_profile", ARM_PROFILE), ("frame", "world"), ("units", "m")):
+ if row[field] != expected:
+ _invalid(f"simulation_grounding.{field}", f"only {expected!r} is supported")
+ aliases = row["language_aliases"]
+ if type(aliases) is not list or not 1 <= len(aliases) <= 12:
+ _invalid("simulation_grounding.language_aliases", "expected 1–12 language aliases")
+ aliases = tuple(_text(alias, f"language_aliases[{index}]", 120)
+ for index, alias in enumerate(aliases))
+ if len({alias.casefold() for alias in aliases}) != len(aliases):
+ _invalid("simulation_grounding.language_aliases", "duplicate aliases")
+ workspace = _record(row["workspace"], "workspace", required=("min", "max"), allowed=("min", "max"))
+ minimum = _vector(workspace["min"], "workspace.min", -1, 1)
+ maximum = _vector(workspace["max"], "workspace.max", -1, 1)
+ if minimum != WORKSPACE_MIN or maximum != WORKSPACE_MAX:
+ _invalid("simulation_grounding.workspace", "must match the authored arm profile workspace")
+ table_height = _number(row["table_height"], "table_height", 0.29, 0.29)
+ object_fields = ("kind", "position", "size", "mass", "friction")
+ obj = _record(row["object"], "object", required=object_fields, allowed=object_fields)
+ if obj["kind"] != "box":
+ _invalid("object.kind", "only an explicitly declared box proxy is supported")
+ size = _vector(obj["size"], "object.size", 0.03, 0.05)
+ mass = _number(obj["mass"], "object.mass", 0.02, 0.08)
+ friction = _number(obj["friction"], "object.friction", 0.4, 1.5)
+ position = _vector(obj["position"], "object.position", -1, 1)
+ target_fields = ("position", "position_tolerance", "dwell_seconds")
+ target = _record(row["target"], "target", required=target_fields, allowed=target_fields)
+ target_position = _vector(target["position"], "target.position", -1, 1)
+ tolerance = _number(target["position_tolerance"], "target.position_tolerance", 0.01, 0.035)
+ dwell = _number(target["dwell_seconds"], "target.dwell_seconds", 0.15, 0.6)
+ supported_z = table_height + size[2] / 2
+ for name, point in (("object.position", position), ("target.position", target_position)):
+ if not minimum[0] <= point[0] <= maximum[0] or not minimum[1] <= point[1] <= maximum[1] \
+ or not supported_z - 0.01 <= point[2] <= supported_z + 0.01:
+ _invalid(name, "center must be reachable and on the declared support plane (within 10 mm)")
+ if math.hypot(point[0], point[1]) > 0.56:
+ _invalid(name, "center exceeds the authored raised-tool reach radius of 0.56 m")
+ if math.dist(position[:2], target_position[:2]) < 0.075:
+ _invalid("target.position", "placement must move the object at least 75 mm")
+ if type(row["procedure"]) is not list or tuple(row["procedure"]) != PROCEDURE:
+ _invalid("simulation_grounding.procedure", "must declare the supported authored placement phases")
+ return GroundedSkill(
+ skill_id=metadata["skill_id"], source_name=metadata["name"], source_task=metadata["task"],
+ source_format=metadata["source_format"], source_version=metadata["version"],
+ source_permissions=metadata["permissions"], source_sha256=source_hash,
+ source_hash_kind=hash_kind, grounding_sha256=hashlib.sha256(_canonical(row)).hexdigest(),
+ source_ids=tuple((key, metadata[key]) for key in ("brief_id", "skillspace_id", "task_id")
+ if key in metadata), arm_profile=ARM_PROFILE, adapter_id=ADAPTER_ID, task_id=TASK_ID,
+ provenance="authored_simulation_adapter", frame="world", units="m", language_aliases=aliases,
+ workspace_min=minimum, workspace_max=maximum, table_height=table_height, object_kind="box",
+ object_position=position, object_size=size, object_mass=mass, object_friction=friction,
+ target_position=target_position, position_tolerance=tolerance, dwell_seconds=dwell,
+ procedure=PROCEDURE,
+ )
+
+
+def inspect_skillspace(document: dict[str, Any] | str | bytes,
+ grounding: dict[str, Any] | None = None) -> dict[str, Any]:
+ """Inspect without fetching files or executing source commands.
+
+ Invalid/unsupported sources raise SkillspaceError. Supported metadata-only
+ sources return grounding_required; a supplied grounding is fully validated.
+ """
+ source, source_hash, hash_kind = _json_input(document)
+ metadata = _source_metadata(source)
+ result = {**metadata, "valid": True, "source_sha256": source_hash,
+ "source_hash_kind": hash_kind, "robot_ready": False,
+ "simulation_ready": False, "readiness": "grounding_required",
+ "missing_grounding": list(GROUNDING_FIELDS),
+ "supported_adapter": ADAPTER_ID, "compatible_arm_profile": ARM_PROFILE}
+ if _grounding(source, grounding) is not None:
+ skill = load_skillspace(document, grounding)
+ result.update({"simulation_ready": True, "readiness": "simulation_adapter_bound",
+ "missing_grounding": [], "grounding_sha256": skill.grounding_sha256,
+ "provenance": skill.provenance, "task_id": skill.task_id})
+ return result
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.html b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.html
new file mode 100644
index 0000000..7d7c5e2
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.html
@@ -0,0 +1,65 @@
+
+
+DVIDIA · Skillspace lab
+
+
DVIDIA Skillspace lab
CPU · local execution · simulation v0
+
+
Give the arm a task.
Install a placement skill, create a scene, then watch the arm ground its motion in the object and target positions.
This first adapter uses a box proxy for the placement task, an authored controller and exact simulator observations. Native jaw contacts move the free object. Qualification for a physical robot and training from demonstrations come next.
DVIDIA research · offline skill execution prototype
+
+
+
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.py
new file mode 100644
index 0000000..106467a
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.py
@@ -0,0 +1,209 @@
+"""Loopback authoring UI and a single isolated CPU physics worker."""
+from __future__ import annotations
+import argparse
+from concurrent.futures import ProcessPoolExecutor
+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
+import json
+import multiprocessing
+from pathlib import Path
+import re
+import threading
+from urllib.parse import urlsplit
+import uuid
+
+from .arm_runner import authored_grounding, run_skill, validate_scene, write_run
+from .arm_env import ArmConfig, ArmEnv
+from .cli import NetworkGuard
+from .installer import fetch_skill_url, install_source, read_installation
+
+
+def request_json(raw):
+ def pairs(items):
+ result = {}
+ for key, value in items:
+ if key in result:
+ raise ValueError('Duplicate request JSON keys are not allowed.')
+ result[key] = value
+ return result
+ def nonfinite(value):
+ raise ValueError('Nonfinite request values are not allowed.')
+ result = json.loads(raw, object_pairs_hook=pairs, parse_constant=nonfinite)
+ json.dumps(result, allow_nan=False) # Reject overflowing numeric tokens too.
+ return result
+
+
+def preview_worker(scene):
+ scene = validate_scene(scene)
+ with NetworkGuard(True):
+ environment = ArmEnv(ArmConfig(object_position=scene['object_position'],
+ target_position=scene['target_position'], scene_jitter=0))
+ observation, info = environment.reset(seed=scene['seed'])
+ return {'observation': observation, 'info': info}
+
+
+def run_worker(source, grounding, scene, policy, identity, source_url, output):
+ result = run_skill(source, grounding, scene, policy=policy, offline=True)
+ result.update(installation_id=identity, source_url=source_url)
+ write_run(output, result)
+ return result
+
+
+class StudioServer(ThreadingHTTPServer):
+ daemon_threads = True
+
+ def __init__(self, address, directory, offline=False):
+ self.directory, self.offline = Path(directory), offline
+ self.directory.mkdir(parents=True, exist_ok=True)
+ self.pool = ProcessPoolExecutor(max_workers=1, mp_context=multiprocessing.get_context('spawn'))
+ self.jobs, self.mutation_lock = {}, threading.Lock()
+ super().__init__(address, StudioHandler)
+
+ def server_close(self):
+ super().server_close()
+ self.pool.shutdown(wait=True, cancel_futures=True)
+
+
+class StudioHandler(BaseHTTPRequestHandler):
+ server_version = 'DVIDIA-Skillspace-Lab/0.2'
+
+ def log_message(self, format, *args):
+ # URL source, bodies and server paths are never logged.
+ print(f'local request {self.command} {self.path.split("?")[0]}', flush=True)
+
+ def respond(self, value, status=200, *, mime='application/json'):
+ body = value if isinstance(value, bytes) else json.dumps(value, allow_nan=False).encode('utf8')
+ self.send_response(status)
+ self.send_header('Content-Type', mime+'; charset=utf-8')
+ self.send_header('Content-Length', str(len(body)))
+ self.send_header('Cache-Control', 'no-store')
+ self.send_header('X-Content-Type-Options', 'nosniff')
+ self.send_header('Referrer-Policy', 'no-referrer')
+ self.send_header('Content-Security-Policy', "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self' blob:; frame-ancestors 'none'; base-uri 'none'")
+ self.end_headers()
+ self.wfile.write(body)
+
+ def local_request(self):
+ port = self.server.server_address[1]
+ if self.headers.get('Host') not in (f'127.0.0.1:{port}', f'localhost:{port}'):
+ raise ValueError('Use the local lab address printed by its server.')
+ origin = self.headers.get('Origin')
+ if origin and origin not in (f'http://127.0.0.1:{port}', f'http://localhost:{port}'):
+ raise ValueError('Use the local lab UI to change an environment or install a skill.')
+
+ def do_GET(self):
+ try:
+ self.local_request()
+ if self.path == '/':
+ self.respond(Path(__file__).with_name('studio.html').read_bytes(), mime='text/html')
+ elif self.path == '/api/installations':
+ records = []
+ root = self.server.directory/'installed'
+ if root.exists():
+ for path in sorted(root.iterdir(), key=lambda p:p.stat().st_mtime, reverse=True)[:16]:
+ if re.fullmatch(r'[a-f0-9]{24}', path.name):
+ try:
+ records.append(read_installation(root, path.name))
+ except (ValueError, OSError, KeyError):
+ continue
+ self.respond({'installations': records})
+ elif re.fullmatch(r'/api/jobs/[a-f0-9]{32}', self.path):
+ job = self.server.jobs.get(self.path.rsplit('/', 1)[1])
+ if job is None:
+ self.respond({'error': 'Unknown local execution.'}, 404)
+ elif not job.done():
+ self.respond({'status': 'running'})
+ else:
+ try:
+ result = job.result()
+ except Exception as exc:
+ self.respond({'status': 'failed', 'error': str(exc)})
+ else:
+ self.respond({'status': 'complete', 'run': result})
+ else:
+ self.respond({'error': 'Not found.'}, 404)
+ except ValueError as exc:
+ self.respond({'error': str(exc)}, 400)
+
+ def do_POST(self):
+ try:
+ self.local_request()
+ if self.headers.get('Content-Type') != 'application/json':
+ raise ValueError('Send an application/json request.')
+ length = int(self.headers.get('Content-Length', '0'))
+ if not 0 < length <= 256*1024:
+ raise ValueError('Request must contain at most 256 KiB of JSON.')
+ body = request_json(self.rfile.read(length))
+ if type(body) is not dict:
+ raise ValueError('Request must be a JSON object.')
+ if self.path == '/api/install':
+ if set(body)-{'url','bundled','document','scene'}:
+ raise ValueError('Unknown installation field.')
+ modes = [key for key in ('url','bundled','document') if key in body]
+ if len(modes)!=1:
+ raise ValueError('Supply a DVIDIA link, bundled source, or JSON document.')
+ if modes == ['url']:
+ if self.server.offline:
+ raise ValueError('This lab is offline. Install bundled source or drop an exported JSON.')
+ data, url = fetch_skill_url(body['url'])
+ elif modes == ['bundled'] and body['bundled'] is True:
+ data, url = Path(__file__).with_name('place_cup.skill.json').read_bytes(), None
+ elif modes == ['document'] and isinstance(body['document'], str):
+ data, url = body['document'].encode('utf8'), None
+ else:
+ raise ValueError('Invalid installation source.')
+ grounding = authored_grounding(data, body.get('scene'))
+ with self.server.mutation_lock:
+ record = install_source(data, grounding, self.server.directory/'installed', source_url=url)
+ self.respond(record)
+ elif self.path == '/api/preview':
+ if set(body) != {'scene'}:
+ raise ValueError('Preview requires the environment scene.')
+ scene = validate_scene(body['scene'])
+ self.respond(self.server.pool.submit(preview_worker, scene).result(timeout=30))
+ elif self.path == '/api/run':
+ if set(body) != {'installation_id','scene','policy'}:
+ raise ValueError('Execution requires an installed skill, scene and controller.')
+ scene = validate_scene(body['scene'])
+ if body['policy'] not in ('placement','open_jaw','idle'):
+ raise ValueError('Unknown installed controller.')
+ with self.server.mutation_lock:
+ if any(not future.done() for future in self.server.jobs.values()):
+ raise ValueError('One CPU execution is already running. Wait for its outcome.')
+ record = read_installation(self.server.directory/'installed', body['installation_id'])
+ source = (self.server.directory/'installed'/body['installation_id']/'source.json').read_bytes()
+ grounding = None if record['grounding_mode']=='inline' else record['grounding']
+ identity = uuid.uuid4().hex
+ job = self.server.pool.submit(run_worker, source, grounding, scene, body['policy'],
+ body['installation_id'], record['source_url'],
+ self.server.directory/'executions'/identity)
+ # Keep bounded memory; completed runs remain saved on disk.
+ for old in list(self.server.jobs)[:-15]:
+ if self.server.jobs[old].done():
+ del self.server.jobs[old]
+ self.server.jobs[identity] = job
+ self.respond({'job_id': identity, 'status': 'running'}, 202)
+ else:
+ self.respond({'error': 'Not found.'}, 404)
+ except Exception as exc:
+ self.respond({'error': str(exc)}, 400)
+
+
+def main():
+ parser = argparse.ArgumentParser(description='Local DVIDIA Skillspace installation and native CPU arm lab.')
+ parser.add_argument('--port', type=int, default=8240)
+ parser.add_argument('--directory', type=Path, default=Path('runs/studio'))
+ parser.add_argument('--offline', action='store_true', help='Disable URL downloads; bundled and dropped source still install.')
+ args = parser.parse_args()
+ if not 1024<=args.port<=65535:
+ parser.error('Use a port between 1024 and 65535.')
+ with StudioServer(('127.0.0.1', args.port), args.directory, args.offline) as server:
+ print(f'DVIDIA Skillspace lab: http://127.0.0.1:{args.port}/', flush=True)
+ print('One native CPU physics worker. Installed execution denies Python network calls.', flush=True)
+ try:
+ server.serve_forever()
+ except KeyboardInterrupt:
+ pass
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/viewer.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/viewer.py
new file mode 100644
index 0000000..2368ac3
--- /dev/null
+++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/viewer.py
@@ -0,0 +1,146 @@
+"""Write a self-contained, offline replay of privileged simulation state."""
+from __future__ import annotations
+
+import json
+import math
+from pathlib import Path
+from typing import Any
+
+
+def _vector(value: Any, label: str) -> None:
+ if not isinstance(value, (list, tuple)) or len(value) != 3:
+ raise ValueError(f"{label} must contain three finite coordinates")
+ if any(isinstance(item, bool) or not isinstance(item, (int, float)) or not math.isfinite(item) for item in value):
+ raise ValueError(f"{label} must contain three finite coordinates")
+
+
+def save_replay(payload: dict[str, Any], path: str | Path) -> Path:
+ """Save the runner's recorded trajectory without any runtime dependencies.
+
+ Positions, target and actions are simulator values; this viewer creates no
+ sensor measurements and runs no physics. It rejects nonfinite coordinates.
+ """
+ if payload.get("schema_version") != 1 or payload.get("task") != "CableEndReach-v0":
+ raise ValueError("Unsupported replay schema or task")
+ if payload.get("scope") != "simulation-only":
+ raise ValueError("The replay must declare simulation-only scope")
+ if payload.get("actuation") != "ideal endpoint attachment" or payload.get("observations") != "privileged simulator state":
+ raise ValueError("The replay must declare ideal attachment and privileged state")
+ episodes = payload.get("episodes")
+ if not isinstance(episodes, list) or not episodes:
+ raise ValueError("At least one recorded episode is required")
+ for episode_index, episode in enumerate(episodes):
+ if not isinstance(episode, dict):
+ raise ValueError(f"Episode {episode_index} is not a record")
+ frames = episode.get("trace")
+ if not isinstance(frames, list):
+ raise ValueError(f"Episode {episode_index} requires a trace list")
+ if not frames:
+ if episode.get("success") is not False or not episode.get("reason"):
+ raise ValueError(f"Episode {episode_index} without frames must declare failure")
+ continue
+ previous_time = -math.inf
+ for frame_index, frame in enumerate(frames):
+ label = f"Episode {episode_index}, frame {frame_index}"
+ time = frame.get("time")
+ if isinstance(time, bool) or not isinstance(time, (int, float)) or not math.isfinite(time) or time < previous_time:
+ raise ValueError(f"{label} has invalid or decreasing time")
+ previous_time = time
+ for key in ("endpoint_position", "target"):
+ _vector(frame.get(key), f"{label} {key}")
+ for key in ("endpoint_velocity", "last_action"):
+ if key in frame:
+ _vector(frame[key], f"{label} {key}")
+ points = frame.get("rope_points")
+ if not isinstance(points, list) or len(points) < 2:
+ raise ValueError(f"{label} requires a cable polyline")
+ for point in points:
+ _vector(point, f"{label} cable point")
+ # HTML's script parser treats specially even in JSON strings.
+ encoded = json.dumps(payload, ensure_ascii=False, allow_nan=False, separators=(",", ":"))
+ encoded = encoded.replace("<", "\\u003c").replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
+ output = Path(path)
+ output.parent.mkdir(parents=True, exist_ok=True)
+ output.write_text(_PAGE.replace("__REPLAY_PAYLOAD__", encoded), encoding="utf-8")
+ return output
+
+
+_PAGE = r'''
+
+Cable end reach — simulation replay
+
+
DVIDIA · local simulation lab
Cable end reach
+
Inspect a recorded cable trajectory, its target and the controller's commanded force. Rotate the projected view or move through the recorded timesteps.
+
Simulation only · Ideal endpoint attachment · Privileged simulator state
+
+
+
CableEndpointTarget tolerance
+
+
Simulated time
Target distance
Recorded outcome
Endpoint position [m]
Commanded force [N]
Frame
+
The cable uses authored simulator material parameters. The attachment assumes an ideal grasp and the controller sees simulator state. The grid is a coordinate reference, not a floor collider. These traces are neither measured tactile feedback nor evidence of calibrated contact, knot tying or physical robot transfer. Playback interpolates no new physical states.