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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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/native-offline/run.json.gz b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/run.json.gz new file mode 100644 index 0000000..85b3823 Binary files /dev/null and b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/run.json.gz differ diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml new file mode 100644 index 0000000..4ae18f4 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "dvidia-simlab" +version = "0.2.0" +description = "Offline simulation tasks, measured rollouts and simulation-only skill packs" +license = {text = "MIT"} +requires-python = ">=3.12" +dependencies = ["mujoco==3.15.0", "numpy==2.5.3"] + +[project.scripts] +dvidia-simlab = "simlab.cli:main" +dvidia-skill-lab = "simlab.studio:main" +dvidia-arm = "simlab.arm_runner:main" + +[tool.setuptools.packages.find] +include = ["simlab*"] + +[tool.setuptools.package-data] +simlab = ["requirements.lock.txt", "LICENSE", "studio.html", "place_cup.skill.json"] diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json new file mode 100644 index 0000000..85d1ca5 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_type": "place_cup", + "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": [ + "Set a cup on the mark." + ], + "workspace": { + "min": [ + 0.25, + -0.2, + 0.29 + ], + "max": [ + 0.6, + 0.2, + 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.1, + 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/release-v0/manifest.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json new file mode 100644 index 0000000..7b1cd96 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "task": "ArmPickPlace-v0", + "scope": "simulation-only", + "status": "authored_adapter_with_recorded_simulation_evidence", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "source_has_robot_policy": false, + "physical_robot_ready": false, + "summary": { + "successes": 6, + "episodes": 18, + "simulated_seconds": 289.89999999997985, + "episode_wall_seconds": 13.607119331369177, + "by_policy": { + "placement": { + "successes": 6, + "episodes": 6, + "simulated_seconds": 73.89999999999168, + "episode_wall_seconds": 3.91412145702634 + }, + "idle": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.776218706043437 + }, + "replay_open_jaw": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.916779168299399 + } + } + }, + "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." + ], + "files": { + "README.md": "52834d6a7ce417879f1c924b5792a19bf4cca7575d75923d6e238c56e676c96d", + "evidence/grounding.json": "1a5956173cefe659559fb0e273ebb2071a6fcbe7a64792075750221927fde892", + "evidence/run.json": "f48888ce02eb09b5f2c7747bd77d26b4a88ce7050cc39269479d67735f6727c8", + "evidence/source.json": "16b4e1ef0f3799345c1d18ce9f1da83b072863ab00ce30a83424080fb467d4ec", + "requirements.lock.txt": "5a435f5b6e4ebcdb78fa12ec223b9c09d972daca6008700e854255664f6fb2a4", + "simlab/LICENSE": "ab47d245880a661fdca3c6a4cb91671031302deee50d64f8d2d6df86832962e1", + "simlab/__init__.py": "e710fdac4ab49a1ccea99179928b827a2d1cfde23d230dcfeb9e48a2cd258c14", + "simlab/__main__.py": "6d8b7d7846a845059d7a3107143f11131f63c5511d669b44085b15ec5e3d2279", + "simlab/arm_env.py": "395d9b7ab2fc09458081d8fae162ec701adcd8b944e65a171c7184deb45e5fb3", + "simlab/arm_native_offline_check.py": "37ec414189bd1c379eeaa8c444667739fe97dcdc0a6677e4e58bf9cbde942275", + "simlab/arm_pack.py": "350964fe0636d7e07cbc50441bd70c233cdd57f8b2ad8876dd01f74ce2f11241", + "simlab/arm_policy.py": "6cb7d9644b6eda2f79e4253a37fe33b5942f736ca341756fb8b968dfb0a255b2", + "simlab/arm_qualify.py": "e89dffc46994a5b9c41c30f76d295910ef3e15a361bdd67ec8fcbfeb02d5382f", + "simlab/arm_runner.py": "db5d65883126ae9318d4c8ea541e14dc1ac7f5d9d8c756b05fb783a4fcb202f4", + "simlab/cli.py": "f2b82eb89d617fd8033de44248b138b9166d2f10600484aeae8225332fbd4ccb", + "simlab/env.py": "929c1d8c3c4cafe0054c633ee5f3e51c551dd6b26ae014ab1ea9219b58eca8e4", + "simlab/installer.py": "f590898da30a96af15d9da792d6631a1fa73af832a8dc3fba10bdff2c7d8fb10", + "simlab/native_offline_check.py": "f550f650a1e7fdaeff38c0aec07782df7cf456e20663c7fba6cede8510e9120e", + "simlab/pack.py": "885e973907499a505fef4d28ac6bb5eb2b2dbba498efc94d9e6c8125b9bd52f9", + "simlab/place_cup.skill.json": "23f27bea18abdf54ffd8a123fc099036ab7ee81fcd44714c894f5d1b12720a15", + "simlab/policies.py": "f52071d8af4ffa215c0c5ac57a7591e12e9e17b834b4bfb2a1705e7e0a7f5154", + "simlab/qualify.py": "2f9566f9c550723cbf96342e075e68dc291446c4fbd3935cec9d333371ab1457", + "simlab/requirements.lock.txt": "5a435f5b6e4ebcdb78fa12ec223b9c09d972daca6008700e854255664f6fb2a4", + "simlab/skillspace.py": "34b651609358ae9a58b9a610545ce7b85b83fb3d6c699613414ff8e0ea457b3c", + "simlab/studio.html": "ac10f95d610bf8816cb1760b09a77295f56a1566c8e169dc79a91efd5dcffd12", + "simlab/studio.py": "d0ed528c5d69e8aa319d2f850c3310814342cd46622aa063c3b2043b14a45c83", + "simlab/viewer.py": "2fc396aaace350c0fa795fdd907dff96179fcb919116d3d5f1a7b3fa9392376d" + } +} diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json new file mode 100644 index 0000000..9457d70 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json @@ -0,0 +1,3129 @@ +{ + "task": "ArmPickPlace-v0", + "scope": "simulation-only", + "hardware": { + "system": "Darwin", + "machine": "arm64", + "python": "3.12.9", + "mujoco": "3.15.0", + "numpy": "2.5.3" + }, + "summary": { + "successes": 6, + "episodes": 18, + "simulated_seconds": 289.89999999997985, + "episode_wall_seconds": 13.607119331369177, + "by_policy": { + "placement": { + "successes": 6, + "episodes": 6, + "simulated_seconds": 73.89999999999168, + "episode_wall_seconds": 3.91412145702634 + }, + "idle": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.776218706043437 + }, + "replay_open_jaw": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.916779168299399 + } + } + }, + "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.", + "protocol": { + "name": "frozen-six-layout-placement-v0", + "seeds": [ + 400, + 401, + 402, + 403, + 404, + 405 + ], + "scenes": [ + { + "id": "default", + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ] + }, + { + "id": "cross_right", + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ] + }, + { + "id": "cross_left", + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ] + }, + { + "id": "forward", + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ] + }, + { + "id": "reverse", + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ] + }, + { + "id": "wide", + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ] + } + ], + "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." + }, + "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." + ], + "episodes": [ + { + "seed": 400, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0002862948097583906, + "simulated_seconds": 11.309999999999171, + "episode_wall_seconds": 0.642286124988459, + "setup_seconds": 0.014417625032365322, + "control_latency_p50_seconds": 0.001080208458006382, + "control_latency_p95_seconds": 0.0015997602604329586, + "simulated_seconds_per_wall_second": 17.608974505252462, + "control_steps": 566, + "reward": 1.1841045919207631, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.309999999999171, + "steps": 566, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12888431537193734, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6113886813382758, + "target_distance": 0.0002862948097583906, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 400, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.18439088673452475, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.928927208064124, + "setup_seconds": 0.007484375033527613, + "control_latency_p50_seconds": 0.0009191670105792582, + "control_latency_p95_seconds": 0.0015534496807958925, + "simulated_seconds_per_wall_second": 19.377191069159075, + "control_steps": 900, + "reward": -4.003380960071468e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673452475, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 400, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.18439088673440412, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8634222920518368, + "setup_seconds": 0.005889708991162479, + "control_latency_p50_seconds": 0.0009115415159612894, + "control_latency_p95_seconds": 0.001161949709057808, + "simulated_seconds_per_wall_second": 20.847272725868375, + "control_steps": 900, + "reward": -3.882755228445944e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673440412, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 401, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0004001095323778411, + "simulated_seconds": 13.355999999998037, + "episode_wall_seconds": 0.738930291030556, + "setup_seconds": 0.006179833086207509, + "control_latency_p50_seconds": 0.0010702084982767701, + "control_latency_p95_seconds": 0.0014304771786555646, + "simulated_seconds_per_wall_second": 18.074776690194913, + "control_steps": 668, + "reward": 1.227634978082459, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 13.355999999998037, + "steps": 668, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12815347400938681, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6074140054963362, + "target_distance": 0.0004001095323778411, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 401, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2280350876204795, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7713305830257013, + "setup_seconds": 0.005402500042691827, + "control_latency_p50_seconds": 0.0008317704778164625, + "control_latency_p95_seconds": 0.000980684772366658, + "simulated_seconds_per_wall_second": 23.336297556607114, + "control_steps": 900, + "reward": -5.642736278232974e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2280350876204795, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 401, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.22803508762038868, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8249195840908214, + "setup_seconds": 0.004946542088873684, + "control_latency_p50_seconds": 0.0008586039766669273, + "control_latency_p95_seconds": 0.0011958705261349675, + "simulated_seconds_per_wall_second": 21.820308727228937, + "control_steps": 900, + "reward": -5.551920034818636e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508762038868, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 402, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.00035282827156375165, + "simulated_seconds": 11.333999999999158, + "episode_wall_seconds": 0.5672361659817398, + "setup_seconds": 0.005027625011280179, + "control_latency_p50_seconds": 0.001027792110107839, + "control_latency_p95_seconds": 0.0011855499469675124, + "simulated_seconds_per_wall_second": 19.981095493766553, + "control_steps": 567, + "reward": 1.2367125667701417, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.333999999999158, + "steps": 567, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.124081266864903, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6106354897624153, + "target_distance": 0.00035282827156375165, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 402, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2370653950366419, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7535420410567895, + "setup_seconds": 0.004998874966986477, + "control_latency_p50_seconds": 0.0008035204955376685, + "control_latency_p95_seconds": 0.000988022272940725, + "simulated_seconds_per_wall_second": 23.887187468339906, + "control_steps": 900, + "reward": 5.063727215315339e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2370653950366419, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 402, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.23706539503680316, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7642012090655044, + "setup_seconds": 0.00494783406611532, + "control_latency_p50_seconds": 0.0008183330064639449, + "control_latency_p95_seconds": 0.0009806024143472311, + "simulated_seconds_per_wall_second": 23.554006178569296, + "control_steps": 900, + "reward": 4.902467320988535e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539503680316, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 403, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.000329102764761287, + "simulated_seconds": 11.590999999999015, + "episode_wall_seconds": 0.6161619999911636, + "setup_seconds": 0.0052045839838683605, + "control_latency_p50_seconds": 0.0010288340272381902, + "control_latency_p95_seconds": 0.0012569641636218873, + "simulated_seconds_per_wall_second": 18.811611232379214, + "control_steps": 580, + "reward": 1.2480657465069822, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.590999999999015, + "steps": 580, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12896120822561669, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6279205591518218, + "target_distance": 0.000329102764761287, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 403, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2483948492778613, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7823899579234421, + "setup_seconds": 0.00494079093914479, + "control_latency_p50_seconds": 0.0008280210313387215, + "control_latency_p95_seconds": 0.0011099458555690943, + "simulated_seconds_per_wall_second": 23.0064302560493, + "control_steps": 900, + "reward": -6.117939488348156e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2483948492778613, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 403, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.24839484927786165, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8182696660514921, + "setup_seconds": 0.004890291020274162, + "control_latency_p50_seconds": 0.0008616044651716948, + "control_latency_p95_seconds": 0.0011869964306242763, + "simulated_seconds_per_wall_second": 21.99763812198595, + "control_steps": 900, + "reward": -6.1183003108311595e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927786165, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 404, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0003297844138246607, + "simulated_seconds": 13.593999999997905, + "episode_wall_seconds": 0.6844325410202146, + "setup_seconds": 0.005055165966041386, + "control_latency_p50_seconds": 0.000948166532907635, + "control_latency_p95_seconds": 0.0012114014243707056, + "simulated_seconds_per_wall_second": 19.861709058623514, + "control_steps": 680, + "reward": 1.2232770114113305, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 13.593999999997905, + "steps": 680, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12465005382416378, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6003089213633297, + "target_distance": 0.0003297844138246607, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 404, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.22360679582933574, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.79080008296296, + "setup_seconds": 0.004971624934114516, + "control_latency_p50_seconds": 0.0008094789809547365, + "control_latency_p95_seconds": 0.0010557247092947363, + "simulated_seconds_per_wall_second": 22.761757854851048, + "control_steps": 900, + "reward": -4.180683577104105e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 4.440892098500626e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582933574, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 404, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.22360679582898266, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7739569590194151, + "setup_seconds": 0.005098458961583674, + "control_latency_p50_seconds": 0.0008174580289050937, + "control_latency_p95_seconds": 0.001071626809425652, + "simulated_seconds_per_wall_second": 23.257107246383036, + "control_steps": 900, + "reward": -3.82760489969769e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582898266, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 405, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.00043674634503465114, + "simulated_seconds": 12.714999999998392, + "episode_wall_seconds": 0.6650743340142071, + "setup_seconds": 0.0051423750119283795, + "control_latency_p50_seconds": 0.0010449375258758664, + "control_latency_p95_seconds": 0.0013206767907831818, + "simulated_seconds_per_wall_second": 19.118163714504096, + "control_steps": 636, + "reward": 1.385438879388436, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 12.714999999998392, + "steps": 636, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12773119946639627, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.602003343787234, + "target_distance": 0.00043674634503465114, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + }, + { + "seed": 405, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.385875625729108, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7492288330104202, + "setup_seconds": 0.004885416012257338, + "control_latency_p50_seconds": 0.0007987499702721834, + "control_latency_p95_seconds": 0.0009575083386152982, + "simulated_seconds_per_wall_second": 24.02470274358578, + "control_steps": 900, + "reward": 4.362676886415784e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.385875625729108, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + }, + { + "seed": 405, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.38587562572902734, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8720094580203295, + "setup_seconds": 0.004923583008348942, + "control_latency_p50_seconds": 0.0008870000019669533, + "control_latency_p95_seconds": 0.0011872020841110493, + "simulated_seconds_per_wall_second": 20.641977944669694, + "control_steps": 900, + "reward": 4.4433345891548015e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.38587562572902734, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + } + ] +} diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html new file mode 100644 index 0000000..94a1ab7 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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'''''' + + 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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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.

+ +
+''' diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py new file mode 100644 index 0000000..e92c45d --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py @@ -0,0 +1 @@ +"""Behavioral checks for the offline simulation lab.""" diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py new file mode 100644 index 0000000..e86b4aa --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py @@ -0,0 +1,167 @@ +"""Native contact qualification of the authored arm placement adapter.""" +import copy +from dataclasses import replace +import unittest + +import mujoco +import numpy as np + +from simlab.arm_env import ArmConfig, ArmEnv, JOINT_LIMITS +from simlab.arm_policy import ArmPickPlacePolicy + + +def execute(env, policy): + observation, info = env.reset(seed=0) + records = [] + while True: + action = policy(observation) + observation, _, done, truncated, info = env.step(action) + records.append((copy.deepcopy(action), observation, info, policy.stage, env.data.actuator_force.copy())) + if done or truncated: + return records + + +class ArmContactTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.success_env = ArmEnv() + cls.records = execute(cls.success_env, ArmPickPlacePolicy(cls.success_env)) + + def test_native_model_has_six_hinges_free_object_and_bounded_jaw_servos(self): + env = self.success_env + self.assertEqual(env.model.nmocap, 0) + self.assertEqual(env.model.neq, 0) + self.assertEqual(len(env.joint_ids), 6) + self.assertTrue(np.all(env.model.jnt_type[env.joint_ids] == mujoco.mjtJoint.mjJNT_HINGE)) + object_joint = mujoco.mj_name2id(env.model, mujoco.mjtObj.mjOBJ_JOINT, "object_free") + self.assertEqual(env.model.jnt_type[object_joint], mujoco.mjtJoint.mjJNT_FREE) + self.assertTrue(env.model.actuator_forcelimited.all()) + for _, _, _, _, forces in self.records: + self.assertLessEqual(float(np.abs(forces[:6]).max()), env.config.joint_torque_limit + 1e-9) + self.assertLessEqual(float(np.abs(forces[6:]).max()), env.config.jaw_force_limit + 1e-9) + self.assertTrue(np.all(env.data.xfrc_applied[env.object_id] == 0)) + + def test_contact_pick_lift_release_and_settled_target_dwell(self): + _, observation, info, stage, _ = self.records[-1] + self.assertTrue(info["success"]) + self.assertTrue(info["valid"]) + self.assertEqual(info["warnings"], []) + self.assertTrue(info["grasp_seen"] and info["lift_seen"]) + self.assertGreater(info["max_object_lift"], .10) + self.assertGreater(observation["gripper_width"], .065) + self.assertEqual(observation["grasp_contacts"], {"left": 0, "right": 0}) + self.assertGreater(observation["table_contacts"], 0) + self.assertGreaterEqual(observation["end_effector_position"][2], observation["object_position"][2] + .10) + self.assertLess(np.linalg.norm(observation["object_velocity"]), .035) + self.assertLess(np.linalg.norm(observation["object_angular_velocity"]), .3) + self.assertLess(info["target_distance"], self.success_env.config.position_tolerance) + self.assertGreaterEqual(info["dwell_elapsed"] + 1e-12, self.success_env.config.dwell_seconds) + self.assertEqual(stage, "verify") + # Being inside the goal while still gripped cannot complete placement. + gripped_at_goal = [entry for entry in self.records if entry[2]["target_distance"] < self.success_env.config.position_tolerance + and entry[1]["grasp_contacts"]["left"] > 0 and entry[1]["grasp_contacts"]["right"] > 0] + self.assertTrue(gripped_at_goal) + self.assertTrue(all(not entry[2]["success"] for entry in gripped_at_goal)) + + def test_identical_arm_action_tape_with_open_jaws_cannot_pick_up_object(self): + env = ArmEnv() + _, info = env.reset(seed=0) + for recorded_action, *_ in self.records: + action = {"joint_targets": recorded_action["joint_targets"], "gripper_width": .08} + _, _, done, truncated, info = env.step(action) + if done or truncated: + break + self.assertFalse(info["success"]) + self.assertFalse(info["grasp_seen"]) + self.assertFalse(info["lift_seen"]) + self.assertLess(info["max_object_lift"], .002) + self.assertGreater(info["target_distance"], env.config.position_tolerance) + + def test_opening_jaws_after_lift_loses_object_retention(self): + env = ArmEnv() + observation, info = env.reset(seed=0) + released = False + for recorded_action, *_ in self.records: + if info["lift_seen"]: + released = True + action = copy.deepcopy(recorded_action) + if released: + action["gripper_width"] = .08 + observation, _, done, truncated, info = env.step(action) + if done or truncated: + break + self.assertTrue(released) + self.assertGreater(info["max_object_lift"], .055) + self.assertFalse(info["success"]) + self.assertAlmostEqual(observation["object_position"][2], env.config.table_height + env.config.object_half_size[2], delta=.002) + self.assertEqual(observation["grasp_contacts"], {"left": 0, "right": 0}) + self.assertGreater(info["target_distance"], env.config.position_tolerance) + + def test_same_adapter_executes_a_changed_valid_scene(self): + config = replace(ArmConfig(), object_position=(.38, -.08, .31), target_position=(.48, .14, .31), scene_jitter=0) + env = ArmEnv(config) + records = execute(env, ArmPickPlacePolicy(env)) + observation, info = records[-1][1:3] + self.assertTrue(info["success"], info["reason"]) + np.testing.assert_allclose(observation["target_position"], [.48, .14, .31], atol=0, rtol=0) + self.assertLess(info["target_distance"], config.position_tolerance) + + def test_seeded_initial_state_and_native_steps_are_deterministic(self): + first, second = ArmEnv(), ArmEnv() + obs1, _ = first.reset(seed=3) + obs2, _ = second.reset(seed=3) + np.testing.assert_allclose(obs1["object_position"], obs2["object_position"], atol=0, rtol=0) + policy = ArmPickPlacePolicy(first) + for _ in range(12): + action = policy(obs1) + obs1, reward1, done1, truncated1, info1 = first.step(action) + obs2, reward2, done2, truncated2, info2 = second.step(action) + for key in ("joint_position", "end_effector_position", "object_position", "object_quaternion", "arm_points", "gripper_points"): + np.testing.assert_allclose(obs1[key], obs2[key], atol=1e-12, rtol=0) + self.assertEqual((reward1, done1, truncated1, info1["reason"]), (reward2, done2, truncated2, info2["reason"])) + + def test_invalid_action_is_rejected_before_native_state_changes(self): + env = ArmEnv() + env.reset(seed=0) + valid = {"joint_targets": list(env.data.qpos[env.joint_qpos]), "gripper_width": .08} + invalid = [dict(valid, gripper_width=.09), dict(valid, joint_targets=[0]*5), dict(valid, joint_targets=[float('nan')]*6), + dict(valid, joint_targets=[JOINT_LIMITS[0][1]+.01]+valid["joint_targets"][1:])] + for action in invalid: + with self.subTest(action=action): + before = env.data.qpos.copy(), env.data.qvel.copy(), env.data.ctrl.copy(), float(env.data.time) + with self.assertRaises(ValueError): + env.step(action) + np.testing.assert_array_equal(env.data.qpos, before[0]) + np.testing.assert_array_equal(env.data.qvel, before[1]) + np.testing.assert_array_equal(env.data.ctrl, before[2]) + self.assertEqual(env.data.time, before[3]) + + def test_unreachable_layouts_and_rejected_reset_cannot_execute(self): + for target in ((2., 0., .31), (.60, .20, .31), (.54, .10, .60)): + with self.subTest(target=target): + with self.assertRaises(ValueError): + replace(ArmConfig(), target_position=target) + env = ArmEnv() + env.reset(seed=0) + with self.assertRaises(ValueError): + env.reset(seed=0, target_position=(3., 0., .31)) + with self.assertRaises(RuntimeError): + env.step({"joint_targets": [0]*6, "gripper_width": .08}) + + def test_motion_free_open_jaw_baseline_does_not_report_success(self): + env = ArmEnv(replace(ArmConfig(), horizon=.8)) + obs, _ = env.reset(seed=0) + action = {"joint_targets": obs["joint_position"], "gripper_width": .08} + for _ in range(40): + _, _, done, truncated, info = env.step(action) + self.assertFalse(info["success"]) + if done or truncated: + break + self.assertFalse(done) + self.assertTrue(truncated) + self.assertEqual(info["reason"], "horizon") + self.assertFalse(info["grasp_seen"] or info["lift_seen"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py new file mode 100644 index 0000000..ce69e5c --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py @@ -0,0 +1,204 @@ +"""Integrity and scope checks for inert, inspectable simulation adapter bundles.""" +import copy +from hashlib import sha256 +import json +from pathlib import Path +import re +import tempfile +import unittest +from zipfile import ZipFile, ZIP_DEFLATED + +from simlab.arm_pack import export_arm_pack, verify_arm_pack +from simlab.arm_runner import authored_grounding +from simlab.skillspace import load_skillspace + + +def encoded(value): + return (json.dumps(value, indent=2, allow_nan=False) + '\n').encode() + + +def archive_files(path): + with ZipFile(path) as archive: + return {name: archive.read(name) for name in archive.namelist()} + + +def rewrite_archive(path, files): + with ZipFile(path, 'w', ZIP_DEFLATED) as archive: + for name, data in files.items(): + archive.writestr(name, data) + + +def update_evidence(files, payload, manifest): + files['evidence/run.json'] = encoded(payload) + manifest['files']['evidence/run.json'] = sha256(files['evidence/run.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + + +class ArmPackTests(unittest.TestCase): + def fixture(self, directory): + directory = Path(directory) + source = Path(__file__).resolve().parents[1].joinpath('simlab/place_cup.skill.json').read_bytes() + grounding = authored_grounding(source) + skill = load_skillspace(source, grounding).to_dict() + # Deliberately synthetic pack-verification fixture. Native physics and + # recorded qualification are tested separately; no run is claimed here. + episodes = [{'seed': 100, 'policy': 'placement', 'success': True, 'reason': 'success', + 'simulated_seconds': 1.0, 'episode_wall_seconds': .1}, + {'seed': 100, 'policy': 'idle', 'success': False, 'reason': 'horizon', + 'simulated_seconds': 2.0, 'episode_wall_seconds': .2}] + summary = {'successes': 1, 'episodes': 2, 'simulated_seconds': 3.0, 'episode_wall_seconds': .3, + 'by_policy': {'placement': {'successes': 1, 'episodes': 1, 'simulated_seconds': 1.0, 'episode_wall_seconds': .1}, + 'idle': {'successes': 0, 'episodes': 1, 'simulated_seconds': 2.0, 'episode_wall_seconds': .2}}} + payload = {'schema_version': 1, 'task': 'ArmPickPlace-v0', 'scope': 'simulation-only', + 'skill': skill, 'summary': summary, 'episodes': episodes, + 'limitations': ['Synthetic test fixture; no physical or learned robot policy.']} + (directory / 'source.json').write_bytes(source) + (directory / 'grounding.json').write_bytes(encoded(grounding)) + (directory / 'run.json').write_bytes(encoded(payload)) + export_arm_pack(directory) + return directory / 'skill-adapter.zip' + + def test_bundle_preserves_explicit_scope_source_and_qualification(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + manifest = verify_arm_pack(path) + self.assertEqual(manifest['task'], 'ArmPickPlace-v0') + self.assertEqual(manifest['scope'], 'simulation-only') + self.assertIs(manifest['physical_robot_ready'], False) + self.assertIs(manifest['source_has_robot_policy'], False) + self.assertEqual(manifest['summary']['successes'], 1) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + self.assertEqual(payload['skill']['source_sha256'], sha256(files['evidence/source.json']).hexdigest()) + self.assertEqual(manifest['limitations'], payload['limitations']) + + def test_modified_source_code_fails_content_integrity(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + files['simlab/arm_policy.py'] += b'\n# Changed after export\n' + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_source_identity_remains_bound_after_a_file_hash_is_replaced(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + files['evidence/source.json'] += b' ' + manifest = json.loads(files['manifest.json']) + manifest['files']['evidence/source.json'] = sha256(files['evidence/source.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_grounding_identity_cannot_change_under_recorded_evidence(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + grounding = json.loads(files['evidence/grounding.json']) + grounding['object']['mass'] = .06 + files['evidence/grounding.json'] = encoded(grounding) + manifest = json.loads(files['manifest.json']) + manifest['files']['evidence/grounding.json'] = sha256(files['evidence/grounding.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_summary_counts_cannot_disagree_with_episode_evidence(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload['summary']['successes'] = 2 + manifest['summary'] = copy.deepcopy(payload['summary']) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_policy_counts_cannot_credit_a_failed_negative_control(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload['summary']['by_policy']['idle']['successes'] = 1 + manifest['summary'] = copy.deepcopy(payload['summary']) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_manifest_cannot_claim_physical_or_learned_policy_qualification(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for change in ({'scope': 'physical-ready'}, {'physical_robot_ready': True}, + {'source_has_robot_policy': True}, {'task': 'HardwarePickPlace-v1'}, + {'schema_version': 99}, {'arm_profile': 'unrelated-arm'}, + {'adapter_id': 'unrelated-controller'}): + with self.subTest(change=change): + files = copy.deepcopy(original) + manifest = json.loads(files['manifest.json']) + manifest.update(change) + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_run_scope_must_match_the_adapter_even_with_updated_hashes(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for change in ({'scope': 'physical-ready'}, {'task': 'DifferentTask-v0'}): + with self.subTest(change=change): + files = copy.deepcopy(original) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload.update(change) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_portable_archive_paths_cannot_escape_an_extraction_directory(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for name in ('/absolute.py', 'simlab/../../escape.py', 'C:/escape.py', 'simlab\\..\\escape.py'): + with self.subTest(name=name): + files = copy.deepcopy(original) + files[name] = b'# inert path fixture\n' + manifest = json.loads(files['manifest.json']) + manifest['files'][name] = sha256(files[name]).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_bundle_contains_runnable_sources_and_local_static_studio(self): + with tempfile.TemporaryDirectory() as folder: + files = archive_files(self.fixture(folder)) + required = ('simlab/__init__.py', 'simlab/arm_env.py', 'simlab/arm_policy.py', + 'simlab/arm_runner.py', 'simlab/arm_qualify.py', 'simlab/skillspace.py', + 'simlab/installer.py', 'simlab/studio.py', 'simlab/studio.html', + 'simlab/env.py', 'simlab/cli.py', 'simlab/LICENSE', 'requirements.lock.txt', + 'evidence/run.json', 'evidence/source.json', 'evidence/grounding.json') + for name in required: + self.assertIn(name, files) + self.assertGreater(len(files[name]), 0) + self.assertEqual(files['requirements.lock.txt'], files['simlab/requirements.lock.txt']) + studio = files['simlab/studio.html'].decode() + self.assertIn(']+src=') + self.assertNotRegex(studio, r']+href=["\']https?://') + self.assertNotRegex(studio, r'\b(?:eval|Function)\s*\(') + self.assertIn('Hashes check content integrity, not publisher identity', files['README.md'].decode()) + + +if __name__ == '__main__': + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py new file mode 100644 index 0000000..8eb7686 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py @@ -0,0 +1,349 @@ +"""Tests of numerical continuation, actual goal conditions and failure semantics.""" +from __future__ import annotations + +import copy +from dataclasses import replace +import json +import math +from pathlib import Path +import re +import tempfile +import unittest + +import numpy as np + +from simlab.env import CableEndReachEnv, Config +from simlab.viewer import save_replay + + +def feedback(observation, limit): + """A bounded PD fixture, independent of the production policy module.""" + force = 10.0 * (np.asarray(observation["target"]) - observation["endpoint_position"]) + force -= 0.25 * np.asarray(observation["endpoint_velocity"]) + force[2] += 0.1 + norm = np.linalg.norm(force) + if norm > limit: + force *= limit / norm + return force.tolist() + + +class CableEndReachTests(unittest.TestCase): + def assertObservationEqual(self, first, second): + self.assertEqual(set(first), set(second)) + for key in first: + np.testing.assert_allclose(first[key], second[key], rtol=0, atol=1e-11, err_msg=key) + + def assertFiniteObservation(self, observation): + for values in observation.values(): + self.assertTrue(np.isfinite(np.asarray(values)).all()) + + def test_seeded_reset_and_control_are_deterministic(self): + first, second = CableEndReachEnv(), CableEndReachEnv() + obs1, info1 = first.reset(seed=7) + obs2, info2 = second.reset(seed=7) + self.assertObservationEqual(obs1, obs2) + self.assertEqual(info1["scene_hash"], info2["scene_hash"]) + self.assertEqual(info1["parameters"], info2["parameters"]) + for _ in range(12): + force = [0.12, -0.03, 0.06] + obs1, reward1, done1, trunc1, info1 = first.step(force) + obs2, reward2, done2, trunc2, info2 = second.step(force) + self.assertObservationEqual(obs1, obs2) + self.assertEqual((reward1, done1, trunc1), (reward2, done2, trunc2)) + self.assertEqual(info1["reason"], info2["reason"]) + self.assertFiniteObservation(obs1) + self.assertAlmostEqual(info1["simulation_time"], 12 * first.config.control_dt, places=10) + + def test_seed_changes_the_authored_scene(self): + env = CableEndReachEnv() + _, first = env.reset(seed=3) + _, second = env.reset(seed=4) + self.assertNotEqual(first["scene_hash"], second["scene_hash"]) + self.assertNotEqual(first["parameters"], second["parameters"]) + + def test_json_snapshot_preserves_full_continuation(self): + original = CableEndReachEnv() + observation, _ = original.reset(seed=2) + for _ in range(9): + observation, _, done, truncated, _ = original.step(feedback(observation, original.config.force_limit)) + self.assertFalse(done or truncated) + # Serialization exercises the documented portable state, not an in-memory + # data-object alias or a saved qpos-only approximation. + saved = json.loads(json.dumps(original.snapshot(), allow_nan=False)) + restored = CableEndReachEnv() + self.assertObservationEqual(observation, restored.restore(saved)) + for _ in range(15): + action = feedback(observation, original.config.force_limit) + expected = original.step(action) + actual = restored.step(action) + self.assertObservationEqual(expected[0], actual[0]) + self.assertAlmostEqual(expected[1], actual[1], places=11) + self.assertEqual(expected[2:4], actual[2:4]) + for key in ("reason", "success", "valid", "steps", "contact_samples", "max_contact_count"): + self.assertEqual(expected[4][key], actual[4][key], key) + for key in ("simulation_time", "dwell_elapsed", "distance"): + self.assertAlmostEqual(expected[4][key], actual[4][key], places=11, msg=key) + observation = expected[0] + if expected[2] or expected[3]: + break + self.assertEqual(original.snapshot()["integration_state"], restored.snapshot()["integration_state"]) + + def test_snapshot_rejects_incompatible_or_nonfinite_state(self): + env = CableEndReachEnv() + env.reset(seed=0) + saved = env.snapshot() + incompatible = CableEndReachEnv(replace(Config(), force_limit=1.5)) + with self.assertRaises(ValueError): + incompatible.restore(saved) + invalid = copy.deepcopy(saved) + invalid["integration_state"][0] = math.nan + with self.assertRaises(ValueError): + CableEndReachEnv().restore(invalid) + mismatched = copy.deepcopy(saved) + mismatched["target"][0] += 0.1 + with self.assertRaises(ValueError): + CableEndReachEnv().restore(mismatched) + + def test_malformed_snapshot_cannot_forge_success_or_mutate_live_state(self): + env = CableEndReachEnv() + env.reset(seed=0) + env.step([0.1, 0.0, 0.03]) + original = env.snapshot() + corruptions = ({"elapsed": math.nan}, {"steps": -1}, {"dwell_elapsed": -0.1}, + {"terminated": True, "done": False, "reason": "success"}, + {"done": True, "terminated": True, "reason": "success", "dwell_elapsed": 0}, + {"last_action": [math.inf, 0, 0]}) + for corruption in corruptions: + with self.subTest(corruption=corruption): + malformed = copy.deepcopy(original) + malformed["episode"].update(corruption) + with self.assertRaises(ValueError): + env.restore(malformed) + self.assertEqual(original, env.snapshot()) + + def test_invalid_physics_returns_json_safe_failure_without_resumable_state(self): + for field in ("position", "clock"): + with self.subTest(field=field): + env = CableEndReachEnv() + env.reset(seed=0) + # Fault injection into native solver input exercises automatic + # reset/clock detection, without mocking a failure or reward. + if field == "position": + env.data.qpos[0] = math.nan + else: + env.data.time = math.nan + observation, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertFalse(info["success"]) + self.assertFalse(info["valid"]) + self.assertFalse(info["observations_available"]) + self.assertIsNone(info["distance"]) + self.assertEqual(observation["endpoint_position"], []) + self.assertEqual(observation["rope_points"], []) + self.assertEqual(reward, -1.0) + json.dumps({"observation": observation, "info": info, "reward": reward}, allow_nan=False) + with self.assertRaises(RuntimeError): + env.snapshot() + + def test_cable_centerline_preserves_authored_length_during_motion(self): + env = CableEndReachEnv() + observation, info = env.reset(seed=2) + authored_length = info["parameters"]["rope_length"] + for _ in range(25): + points = np.asarray(observation["rope_points"]) + arc_length = float(np.linalg.norm(np.diff(points, axis=0), axis=1).sum()) + # The elasticity plugin supplies bending/twist, not axial stretch. + # This checks the marker mapping and the fixed segment lengths. + self.assertAlmostEqual(arc_length, authored_length, delta=1e-7) + observation, _, done, truncated, info = env.step(feedback(observation, env.config.force_limit)) + self.assertTrue(info["valid"]) + if done or truncated: + break + + def test_refined_timestep_tracks_the_same_fixed_action_tape(self): + coarse = CableEndReachEnv() + fine = CableEndReachEnv(replace(Config(), timestep=0.0005)) + coarse_observation, _ = coarse.reset(seed=2) + fine_observation, _ = fine.reset(seed=2) + coarse_initial = np.asarray(coarse_observation["endpoint_position"]) + fine_initial = np.asarray(fine_observation["endpoint_position"]) + # Both settle independently. Their initial states and relative targets + # differ slightly; subtracting each initial point also checks displacement. + self.assertLess(np.linalg.norm(coarse_initial - fine_initial), 0.0001) + for _ in range(12): + action = feedback(coarse_observation, coarse.config.force_limit) + coarse_observation, _, done1, truncated1, info1 = coarse.step(action) + fine_observation, _, done2, truncated2, info2 = fine.step(action) + self.assertFalse(done1 or truncated1 or done2 or truncated2) + self.assertTrue(info1["valid"] and info2["valid"]) + coarse_endpoint = np.asarray(coarse_observation["endpoint_position"]) + fine_endpoint = np.asarray(fine_observation["endpoint_position"]) + self.assertLess(np.linalg.norm(coarse_endpoint - fine_endpoint), 0.002) + self.assertLess(np.linalg.norm((coarse_endpoint - coarse_initial) - (fine_endpoint - fine_initial)), 0.002) + # The 2 mm regression bound is 8% of the configured 25 mm target radius. + # A two-resolution comparison does not establish convergence or fidelity + # to physical cable dynamics. + + def test_success_requires_movement_and_actual_continuous_dwell(self): + env = CableEndReachEnv() + observation, info = env.reset(seed=0) + initial_distance = info["distance"] + self.assertGreater(initial_distance, env.config.tolerance) + self.assertFalse(info["success"]) + inside_before_success = False + for _ in range(round(env.config.horizon / env.config.control_dt)): + observation, reward, done, truncated, info = env.step(feedback(observation, env.config.force_limit)) + self.assertFiniteObservation(observation) + self.assertTrue(math.isfinite(reward)) + self.assertTrue(info["valid"], info["reason"]) + if info["distance"] <= env.config.tolerance and not info["success"]: + inside_before_success = True + if info["dwell_elapsed"] + 1e-12 < env.config.dwell: + self.assertFalse(info["success"]) + if done or truncated: + break + self.assertTrue(inside_before_success, "Entering the target must not immediately release the skill") + self.assertTrue(info["success"], info["reason"]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertLessEqual(info["distance"], env.config.tolerance) + self.assertGreaterEqual(info["dwell_elapsed"] + 1e-12, env.config.dwell) + self.assertLess(info["distance"], initial_distance) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_zero_action_cannot_claim_success(self): + env = CableEndReachEnv(replace(Config(), horizon=0.8)) + env.reset(seed=0) + for _ in range(40): + observation, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertFiniteObservation(observation) + self.assertFalse(info["success"]) + self.assertTrue(info["valid"], info["reason"]) + if done or truncated: + break + self.assertFalse(done) + self.assertTrue(truncated) + self.assertEqual(info["reason"], "horizon") + self.assertAlmostEqual(info["simulation_time"], env.config.horizon, places=10) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_invalid_action_is_rejected_without_state_change(self): + env = CableEndReachEnv() + env.reset(seed=0) + for action in ([math.nan, 0, 0], [math.inf, 0, 0], [0, 0], [0, 0, 0, 0], + [[0, 0, 0]], [env.config.force_limit + 0.001, 0, 0], ["invalid", 0, 0]): + with self.subTest(action=action): + before = env.snapshot() + with self.assertRaises(ValueError): + env.step(action) + self.assertEqual(before, env.snapshot()) + self.assertFalse(before["episode"]["done"]) + + def test_force_norm_limit_is_enforced_across_axes(self): + env = CableEndReachEnv() + env.reset(seed=0) + with self.assertRaises(ValueError): + env.step([env.config.force_limit, env.config.force_limit, 0]) + observation, _, _, _, _ = env.step([0.3, 0.4, 0.0]) + self.assertEqual(observation["last_action"], [0.3, 0.4, 0.0]) + + def test_explicit_failure_cannot_be_reported_as_success(self): + env = CableEndReachEnv(replace(Config(), workspace_radius_factor=0.05)) + env.reset(seed=0) + _, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertEqual(info["reason"], "workspace_violation") + self.assertFalse(info["valid"]) + self.assertFalse(info["success"]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertEqual(reward, -1.0) + + def test_unreachable_and_trivial_targets_are_rejected(self): + for offset in ((99.0, 0.0, 0.0), (0.0, 0.0, 0.0)): + with self.subTest(offset=offset): + env = CableEndReachEnv(replace(Config(), target_offset=offset, target_jitter=0)) + with self.assertRaises(ValueError): + env.reset(seed=0) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_timing_and_geometry_profiles_reject_unsupported_values(self): + for change in ({"timestep": 0}, {"control_dt": 0.0205}, {"horizon": 0.061}, + {"dwell": 7}, {"force_limit": math.inf}, {"rope_nodes": 4}, + {"rope_radius": 0.02}, {"target_offset": (0, math.nan, 0)}): + with self.subTest(change=change): + with self.assertRaises(ValueError): + replace(Config(), **change) + + def test_reset_required_for_control_and_snapshot(self): + env = CableEndReachEnv() + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + with self.assertRaises(RuntimeError): + env.snapshot() + + +class ReplayTests(unittest.TestCase): + def payload(self): + frame = {"time": 0.0, "endpoint_position": [0.1, 0.0, 0.1], + "endpoint_velocity": [0, 0, 0], "target": [0.12, 0.01, 0.1], + "rope_points": [[0, 0, 0.2], [0.1, 0, 0.1]], "last_action": [0, 0, 0]} + return {"schema_version": 1, "task": "CableEndReach-v0", "scope": "simulation-only", + "actuation": "ideal endpoint attachment", "observations": "privileged simulator state", + "config": {"tolerance": 0.025}, "episodes": [{"seed": 0, "policy": "Fixture", + "success": False, "reason": "horizon", "simulated_seconds": 0, + "control_steps": 0, "trace": [frame]}]} + + def test_saved_replay_is_self_contained_and_script_safe(self): + payload = self.payload() + payload["episodes"][0]["policy"] = '' + with tempfile.TemporaryDirectory() as folder: + path = save_replay(payload, Path(folder) / "nested" / "replay.html") + page = path.read_text() + self.assertNotIn(']+src=') + self.assertNotRegex(page, r']+(?:href=)') + data = re.search(r'', page, re.S) + self.assertIsNotNone(data) + self.assertEqual(json.loads(data.group(1)), payload) + self.assertIn('Simulation only', page) + self.assertIn('Ideal endpoint attachment', page) + self.assertIn('Privileged simulator state', page) + + def test_replay_rejects_invalid_state_and_mislabeled_scope(self): + with tempfile.TemporaryDirectory() as folder: + for change in ("nonfinite", "empty", "backwards", "scope"): + with self.subTest(change=change): + payload = self.payload() + if change == "nonfinite": + payload["episodes"][0]["trace"][0]["endpoint_position"][0] = math.inf + elif change == "empty": + payload["episodes"][0]["trace"] = [] + payload["episodes"][0]["success"] = True + elif change == "backwards": + second = copy.deepcopy(payload["episodes"][0]["trace"][0]) + second["time"] = -0.1 + payload["episodes"][0]["trace"].append(second) + else: + payload["scope"] = "physical-robot" + with self.assertRaises(ValueError): + save_replay(payload, Path(folder) / "replay.html") + + def test_replay_preserves_failed_episodes_with_unavailable_observations(self): + payload = self.payload() + payload["episodes"].append({"seed": 1, "policy": "Fixture", "success": False, + "reason": "rejected_start", "simulated_seconds": 0.0, + "final_observation_available": False, "trace": []}) + with tempfile.TemporaryDirectory() as folder: + page = save_replay(payload, Path(folder) / "replay.html").read_text() + data = re.search(r'', page, re.S) + self.assertEqual(len(json.loads(data.group(1))["episodes"]), 2) + self.assertIn("No usable trajectory recorded", page) + self.assertIn("final observation unavailable", page) + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py new file mode 100644 index 0000000..8a11b41 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py @@ -0,0 +1,142 @@ +"""Public URL boundaries, offline persistence and installation integrity.""" +from __future__ import annotations + +import copy +from hashlib import sha256 +import io +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +from simlab.arm_runner import authored_grounding +from simlab.cli import NetworkGuard +from simlab.installer import (MAX_SOURCE_BYTES, _NoRedirect, fetch_skill_url, install_source, + read_installation, resolve_skill_url) + + +ROOT = Path(__file__).resolve().parents[1] +BUNDLED = ROOT / "simlab" / "place_cup.skill.json" +INLINE = ROOT / "examples" / "arm_place_skillspace.json" + + +class InstallerTests(unittest.TestCase): + def test_observed_public_store_and_direct_pack_routes_resolve_canonically(self): + expected = "https://dvidia.org/packs/dvidia/place_cup/skill.json" + for url in ("https://dvidia.org/store/dvidia/place_cup", + "https://www.dvidia.org/store/dvidia/place_cup/", + "https://dvidia.org/packs/dvidia/place_cup/skill.json"): + with self.subTest(url=url): + self.assertEqual(resolve_skill_url(url), expected) + + def test_private_local_plans_traversal_and_untrusted_origins_are_rejected(self): + urls = ("https://dvidia.org/skillspace?id=space-123", "https://dvidia.org/skillspaces", + "https://dvidia.org/store/dvidia/../place_cup", "https://dvidia.org/store/dvidia/%2e%2e", + "https://dvidia.org/store/dvidia/place%2fcup", "https://dvidia.org/store/dvidia//place_cup", + "https://dvidia.org/store/dvidia/place_cup?source=x", "https://dvidia.org/store/dvidia/place_cup#x", + "https://user:password@dvidia.org/store/dvidia/place_cup", + "https://dvidia.org@evil.example/store/dvidia/place_cup", + "https://dvidia.org.evil.example/store/dvidia/place_cup", + "http://dvidia.org/store/dvidia/place_cup", "https://dvidia.org:443/store/dvidia/place_cup", + "https://localhost/store/dvidia/place_cup", "https://127.0.0.1/store/dvidia/place_cup", + "//dvidia.org/store/dvidia/place_cup", "file:" + "///store/dvidia/place_cup") + for url in urls: + with self.subTest(url=url), self.assertRaises(ValueError): + resolve_skill_url(url) + + def test_download_is_bounded_and_redirects_never_follow(self): + raw = BUNDLED.read_bytes() + with patch("simlab.installer.build_opener") as builder: + builder.return_value.open.return_value = io.BytesIO(raw) + data, url = fetch_skill_url("https://dvidia.org/store/dvidia/place_cup") + self.assertEqual(data, raw) + self.assertEqual(url, "https://dvidia.org/packs/dvidia/place_cup/skill.json") + request = builder.return_value.open.call_args.args[0] + self.assertEqual(request.full_url, url) + self.assertEqual(builder.return_value.open.call_args.kwargs["timeout"], 12) + for raw in (b"", b"x" * (MAX_SOURCE_BYTES + 1), b"not a pack"): + with self.subTest(size=len(raw)), patch("simlab.installer.build_opener") as builder: + builder.return_value.open.return_value = io.BytesIO(raw) + with self.assertRaises(ValueError): + fetch_skill_url("https://dvidia.org/store/dvidia/place_cup") + with self.assertRaises(ValueError): + _NoRedirect().redirect_request(None, None, 302, "redirect", {}, "https://evil.example/") + + def test_install_and_reload_remain_offline_and_preserve_exact_source(self): + raw = BUNDLED.read_bytes() + grounding = authored_grounding(raw) + with tempfile.TemporaryDirectory() as temporary, NetworkGuard(True) as guard: + directory = Path(temporary) + first = install_source(raw, grounding, directory, + source_url="https://dvidia.org/store/dvidia/place_cup") + self.assertEqual(first["source_url"], "https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(read_installation(directory, first["installation_id"]), first) + second = install_source(raw, grounding, directory, + source_url="https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(first["installation_id"], second["installation_id"]) + restored = read_installation(directory, first["installation_id"]) + self.assertEqual(restored, second) + self.assertEqual(restored["source_sha256"], sha256(raw).hexdigest()) + self.assertEqual(restored["source_url"], "https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(restored["scope"], "simulation-only") + self.assertFalse(restored["physical_robot_ready"]) + self.assertFalse(restored["skill"]["source_has_robot_policy"]) + self.assertEqual((directory / first["installation_id"] / "source.json").read_bytes(), raw) + self.assertEqual(guard.record()["attempted_calls"], []) + + def test_tampering_source_grounding_or_manifest_cannot_change_installed_contract(self): + raw = BUNDLED.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + record = install_source(raw, authored_grounding(raw), directory) + installation = directory / record["installation_id"] + path = installation / "installation.json" + mutations = (("schema_version", 99), ("schema_version", True), ("scope", "physical"), + ("status", "robot_ready"), ("physical_robot_ready", True), + ("grounding_mode", "invented"), ("grounding_mode", "inline"), + ("policy_origin", "learned from supplied video")) + for field, value in mutations: + changed = copy.deepcopy(record) + changed[field] = value + path.write_text(json.dumps(changed)) + with self.subTest(field=field, value=value), self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + for section, field, value in (("grounding", "table_height", .3), + ("skill", "object_mass", .08), ("source", "skill", "tie_lace")): + changed = copy.deepcopy(record) + changed[section][field] = value + path.write_text(json.dumps(changed)) + with self.subTest(section=section), self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + path.write_text(json.dumps(record)) + (installation / "source.json").write_bytes(raw + b"\n") + with self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + + def test_inline_export_retains_its_explicit_grounding_and_local_permissions(self): + raw = INLINE.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + record = install_source(raw, authored_grounding(raw), directory) + restored = read_installation(directory, record["installation_id"]) + self.assertEqual(restored["grounding_mode"], "inline") + self.assertEqual(restored["grounding"], json.loads(raw)["simulation_grounding"]) + self.assertEqual(restored["skill"]["source_permissions"], "local_only_no_public_reuse") + self.assertEqual(restored["source_sha256"], sha256(raw).hexdigest()) + + def test_install_rejects_arbitrary_provenance_urls_and_source_size(self): + raw = BUNDLED.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + for url in ("https://evil.example/source.json", "file:" + "///secret", "https://dvidia.org/skillspace?id=private"): + with self.subTest(url=url), self.assertRaises(ValueError): + install_source(raw, authored_grounding(raw), Path(temporary), source_url=url) + for source in (b"", b" " * (MAX_SOURCE_BYTES + 1)): + with self.assertRaises(ValueError): + install_source(source, {}, Path(temporary)) + with self.assertRaises(ValueError): + read_installation(Path(temporary), "../escape") + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py new file mode 100644 index 0000000..e713148 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py @@ -0,0 +1,63 @@ +import argparse +import json +from pathlib import Path +import tempfile +import unittest +import zipfile +from simlab.pack import export_pack, verify_pack +from simlab.cli import NetworkGuard, parse_seeds + + +class PackTests(unittest.TestCase): + def fixture(self, root): + payload = {'config': {'force_limit': .25}, 'episodes': [{'seed':100,'success':True}]} + target = Path(root)/'pack.zip' + export_pack(target, payload, {'kp':4.}) + return target + + def test_hash_verification_detects_modified_policy(self): + with tempfile.TemporaryDirectory() as root: + target = self.fixture(root) + self.assertEqual(verify_pack(target)['qualification']['successes'], 1) + with zipfile.ZipFile(target) as archive: + files = {name:archive.read(name) for name in archive.namelist()} + files['policy.json'] = b'{"kp":999}\n' + with zipfile.ZipFile(target, 'w') as archive: + for name, data in files.items(): + archive.writestr(name,data) + with self.assertRaisesRegex(ValueError,'hash mismatch'): + verify_pack(target) + + def test_manifest_counts_cannot_disagree_with_evidence(self): + with tempfile.TemporaryDirectory() as root: + target = self.fixture(root) + with zipfile.ZipFile(target) as archive: + files = {name:archive.read(name) for name in archive.namelist()} + manifest = json.loads(files['manifest.json']) + manifest['qualification']['successes'] = 99 + files['manifest.json'] = json.dumps(manifest).encode() + with zipfile.ZipFile(target, 'w') as archive: + for name,data in files.items(): + archive.writestr(name,data) + with self.assertRaisesRegex(ValueError,'count mismatch'): + verify_pack(target) + + def test_offline_guard_blocks_and_restores_python_networking(self): + import socket + original = socket.socket + with NetworkGuard(True) as guard: + self.assertEqual(guard.attempts, []) + with self.assertRaisesRegex(RuntimeError,'denied'): + socket.socket() + self.assertEqual(guard.attempts, ['socket']) + self.assertIs(socket.socket, original) + + def test_eval_seed_input_is_frozen_and_unique(self): + self.assertEqual(parse_seeds('100,101,102'), [100,101,102]) + for bad in ['-1','1,1','abc','']: + with self.assertRaises(argparse.ArgumentTypeError): + parse_seeds(bad) + + +if __name__ == '__main__': + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py new file mode 100644 index 0000000..cd5def8 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py @@ -0,0 +1,205 @@ +"""Actual export compatibility and fail-closed physical grounding contracts.""" +from __future__ import annotations + +import copy +from dataclasses import FrozenInstanceError +import hashlib +import json +import math +from pathlib import Path +import unittest + +from simlab.skillspace import (ADAPTER_ID, ARM_PROFILE, MAX_DOCUMENT_BYTES, GroundedSkill, + SkillspaceError, inspect_skillspace, load_skillspace) + + +EXAMPLE = Path(__file__).resolve().parents[1] / "examples" / "arm_place_skillspace.json" + + +def example(): + return json.loads(EXAMPLE.read_text()) + + +def source_metadata(): + # Exact field vocabulary from the shipped dvidia-cli place_cup example. + return {"vdia": "0", "skill": "place_cup", "owner": "dvidia", "version": "0.3.0", + "task": "Set a cup on the mark.", "demos": 100, "accuracy": 88, + "cameras": ["ego", "room"], "format": "lerobot/v3", "license": "open", + "residual": {"claimer": 0.1, "contributors": 0.3, "network": 0.6, "book": "not-live"}} + + +def cup_grounding(): + grounding = example()["simulation_grounding"] + grounding["task_type"] = "place_cup" + grounding["language_aliases"] = ["place a cup", "set a cup on the mark"] + return grounding + + +class SkillspaceTests(unittest.TestCase): + def assertRejected(self, document, code="invalid_document", grounding=None): + with self.assertRaises(SkillspaceError) as context: + load_skillspace(document, grounding) + self.assertEqual(context.exception.code, code) + json.dumps(context.exception.as_dict(), allow_nan=False) + + def test_cli_public_pack_and_current_browser_exports_are_metadata_only(self): + cli = source_metadata() + public = {"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"}} + browser = {**public, "accuracy": None, "robot_type": "human_video_reference", "residual": None, + "earnings_status": "unavailable", "dual": True, "rig": "wrist-room", + "info": "meta/info.json", "lerobot": {"dvidia": {"training_ready": False, + "robot_ready": False, "robot_actions": "absent", "robot_state": "absent"}}} + for source in (cli, public, browser): + with self.subTest(source=source.get("robot_type", "CLI")): + before = copy.deepcopy(source) + report = inspect_skillspace(source) + self.assertEqual(report["skill_id"], "place_cup") + self.assertEqual(report["readiness"], "grounding_required") + self.assertFalse(report["source_has_robot_policy"]) + self.assertFalse(report["robot_ready"]) + self.assertIn("object", report["missing_grounding"]) + self.assertRejected(source, "grounding_required") + self.assertEqual(source, before) + + def test_actual_contribution_brief_shape_preserves_local_permission_boundary(self): + source = example() + del source["simulation_grounding"] + report = inspect_skillspace(source) + self.assertEqual(report["source_format"], "dvidia-contribution-brief:1") + self.assertEqual(report["skill_id"], "place_object") + self.assertEqual(report["permissions"], "local_only_no_public_reuse") + self.assertEqual(report["brief_id"], source["brief"]["id"]) + self.assertRejected(source, "grounding_required") + source["permissions"]["publicReuseGranted"] = True + self.assertRejected(source) + + def test_grounded_example_normalizes_jsonable_immutable_contract(self): + raw = EXAMPLE.read_bytes() + skill = load_skillspace(raw) + self.assertIsInstance(skill, GroundedSkill) + self.assertEqual(skill.source_sha256, hashlib.sha256(raw).hexdigest()) + self.assertEqual(skill.source_hash_kind, "exact_bytes") + self.assertEqual(skill.arm_profile, ARM_PROFILE) + self.assertEqual(skill.adapter_id, ADAPTER_ID) + self.assertEqual(skill.object_size, (.04, .04, .04)) + result = json.loads(json.dumps(skill.to_dict(), allow_nan=False)) + self.assertEqual(result["object_position"], [.42, -.04, .31]) + self.assertEqual(result["object_representation"], "authored_box_proxy") + self.assertFalse(result["robot_ready"]) + with self.assertRaises(FrozenInstanceError): + skill.skill_id = "tie_lace" + report = inspect_skillspace(raw) + self.assertTrue(report["simulation_ready"]) + self.assertEqual(report["readiness"], "simulation_adapter_bound") + + def test_explicit_sidecar_binds_adapter_without_rewriting_source(self): + source = source_metadata() + original = copy.deepcopy(source) + grounding = cup_grounding() + skill = load_skillspace(source, grounding) + self.assertEqual(skill.skill_id, "place_cup") + self.assertEqual(skill.provenance, "authored_simulation_adapter") + self.assertEqual(skill.source_hash_kind, "canonical_json") + self.assertEqual(source, original) + changed = copy.deepcopy(grounding) + changed["object"]["mass"] = .05 + second = load_skillspace(source, changed) + self.assertEqual(skill.source_sha256, second.source_sha256) + self.assertNotEqual(skill.grounding_sha256, second.grounding_sha256) + inline = example() + self.assertRejected(inline, "ambiguous_grounding", inline["simulation_grounding"]) + + def test_unsupported_skills_and_relabeling_fail_explicitly(self): + for identifier in ("tie_lace", "tie your shoes", "wipe_counter", "unknown", "Place cup nearby"): + source = source_metadata() + source["skill"] = identifier + with self.subTest(identifier=identifier): + self.assertRejected(source, "unsupported_task", cup_grounding()) + with self.assertRaises(SkillspaceError): + inspect_skillspace(source) + source = source_metadata() + grounding = cup_grounding() + grounding["task_type"] = "place_object" + self.assertRejected(source, "unsupported_task", grounding) + brief = example() + brief["brief"]["taskTitle"] = "Tie your shoes" + self.assertRejected(brief, "unsupported_task") + + def test_nonfinite_numbers_duplicate_keys_and_oversized_input_are_rejected(self): + for value in (math.nan, math.inf, -math.inf, 10 ** 400): + source = example() + source["simulation_grounding"]["object"]["position"][0] = value + self.assertRejected(source) + for text in ('{"vdia":"0","vdia":"0"}', '{"number":NaN}', '{"number":1e999}', '[]', 'null'): + with self.subTest(text=text): + self.assertRejected(text) + self.assertRejected(b"\xff") + self.assertRejected(" " * (MAX_DOCUMENT_BYTES + 1), "document_too_large") + + def test_geometry_frame_profile_and_goal_bounds_fail_closed(self): + changes = [("frame", "camera"), ("units", "cm"), ("table_height", .3), + ("arm_profile", "physical-arm"), ("adapter_id", "video-policy"), + ("provenance", "learned_from_video"), ("schema_version", True), + ("procedure", ["teleport", "release"])] + for field, value in changes: + source = example() + source["simulation_grounding"][field] = value + with self.subTest(field=field): + self.assertRejected(source) + invalid_objects = [{"size": [.5, .04, .04]}, {"mass": True}, {"friction": .1}, + {"kind": "cup"}, {"position": [.7, 0, .31]}, + {"position": [.42, 0, .50]}, {"position": [0, 0]}, {"velocity": [1, 0, 0]}] + for values in invalid_objects: + source = example() + source["simulation_grounding"]["object"].update(values) + with self.subTest(values=values): + self.assertRejected(source) + invalid_targets = [{"position": [.42, -.04, .31]}, {"position": [.54, .25, .31]}, + {"position": [.60, .20, .31]}, + {"position_tolerance": .2}, {"dwell_seconds": 0}] + for values in invalid_targets: + source = example() + source["simulation_grounding"]["target"].update(values) + with self.subTest(values=values): + self.assertRejected(source) + source = example() + source["simulation_grounding"]["workspace"]["max"][0] = 100 + self.assertRejected(source) + + # A vertical-offset token cannot disguise a too-short horizontal task. + source = example() + source["simulation_grounding"]["object"]["position"] = [.42, 0, .30] + source["simulation_grounding"]["target"]["position"] = [.492, 0, .32] + self.assertRejected(source) + + def test_grounding_missing_unknown_fields_and_ambiguous_aliases_are_rejected(self): + for mutate in (lambda row: row.pop("object"), lambda row: row.update({"execute": "evil()"}), + lambda row: row.update({"language_aliases": []}), + lambda row: row.update({"language_aliases": ["place object", "PLACE OBJECT"]})): + source = example() + mutate(source["simulation_grounding"]) + self.assertRejected(source) + + def test_brief_ids_timestamps_and_draft_terms_cannot_be_forged(self): + for section, field, value in (("brief", "id", "bad-id"), ("brief", "version", True), + ("brief", "createdAt", "2026-02-30T00:00:00.000Z"), + ("commercialProposal", "proposedFounderShareBps", 1), + ("brief", "creatorHandle", "invalid handle")): + source = example() + source[section][field] = value + with self.subTest(field=field): + self.assertRejected(source) + + def test_multiline_brief_text_uses_actual_export_contract(self): + source = example() + source["brief"]["goal"] += "\nThis remains authored scene metadata." + source["brief"]["captureChecklist"][0] += "\nReview it locally." + self.assertEqual(load_skillspace(source).skill_id, "place_object") + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py new file mode 100644 index 0000000..5b79433 --- /dev/null +++ b/docs/downloads/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py @@ -0,0 +1,131 @@ +"""Real loopback HTTP boundaries and offline source-to-native preview bridge.""" +from __future__ import annotations + +import http.client +import json +from pathlib import Path +import tempfile +import threading +import unittest +from unittest.mock import patch + +from simlab.installer import read_installation +from simlab.studio import StudioServer + + +class StudioHTTPTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.temporary = tempfile.TemporaryDirectory() + cls.server = StudioServer(("127.0.0.1", 0), Path(cls.temporary.name), offline=True) + cls.port = cls.server.server_address[1] + cls.thread = threading.Thread(target=cls.server.serve_forever, + kwargs={"poll_interval": .01}, daemon=True) + cls.thread.start() + + @classmethod + def tearDownClass(cls): + cls.server.shutdown() + cls.server.server_close() + cls.thread.join(timeout=2) + cls.temporary.cleanup() + + def request(self, path, value=None, *, method="POST", headers=None, raw=None): + connection = http.client.HTTPConnection("127.0.0.1", self.port, timeout=35) + supplied_headers = {"Content-Type": "application/json", + "Origin": f"http://127.0.0.1:{self.port}"} + supplied_headers.update(headers or {}) + payload = raw if raw is not None else (None if value is None else json.dumps(value)) + try: + connection.request(method, path, body=payload, headers=supplied_headers) + response = connection.getresponse() + data = response.read() + parsed = json.loads(data) if response.getheader("Content-Type", "").startswith("application/json") else data + return response.status, dict(response.getheaders()), parsed + finally: + connection.close() + + def test_loopback_ui_serves_with_browser_guards_and_nonlocal_requests_fail(self): + status, headers, body = self.request("/", method="GET") + self.assertEqual(status, 200) + self.assertIsInstance(body, bytes) + self.assertIn(b"Install", body) + self.assertEqual(headers["X-Content-Type-Options"], "nosniff") + self.assertEqual(headers["Cache-Control"], "no-store") + self.assertIn("frame-ancestors 'none'", headers["Content-Security-Policy"]) + self.assertNotIn("Access-Control-Allow-Origin", headers) + for values in ({"Host": "evil.example"}, {"Origin": "https://evil.example"}, + {"Origin": "null"}, {"Host": f"127.0.0.1:{self.port + 1}"}): + with self.subTest(headers=values): + status, _, body = self.request("/api/install", {"bundled": True}, headers=values) + self.assertEqual(status, 400) + self.assertIn("error", body) + + def test_json_body_media_type_size_duplicate_keys_and_nonfinite_values_reject(self): + cases = (("{}", {"Content-Type": "text/plain"}), ("[]", {}), ("null", {}), + ('{"bundled":false,"bundled":true}', {}), ('{"bundled":true,"scene":NaN}', {}), + ('{"bundled":true,"unrecognized":1}', {}), ('{"bundled":true}', {"Content-Length": "-1"}), + (" " * (256 * 1024 + 1), {})) + for raw, headers in cases: + with self.subTest(raw=raw[:50], headers=headers): + status, _, result = self.request("/api/install", headers=headers, raw=raw) + self.assertEqual(status, 400) + self.assertIn("error", result) + + def test_offline_bundled_install_persists_without_network_or_robot_readiness(self): + with patch("simlab.studio.fetch_skill_url", side_effect=AssertionError("offline install fetched a URL")): + status, _, record = self.request("/api/install", {"bundled": True}) + self.assertEqual(status, 200) + self.assertEqual(record["skill"]["skill_id"], "place_cup") + self.assertEqual(record["scope"], "simulation-only") + self.assertFalse(record["physical_robot_ready"]) + self.assertFalse(record["skill"]["source_has_robot_policy"]) + restored = read_installation(Path(self.temporary.name) / "installed", record["installation_id"]) + self.assertEqual(restored["source_sha256"], record["source_sha256"]) + status, _, error = self.request("/api/install", {"url": "https://dvidia.org/store/dvidia/place_cup"}) + self.assertEqual(status, 400) + self.assertIn("offline", error["error"].lower()) + + def test_inline_json_upload_and_mutually_exclusive_source_modes(self): + document = (Path(__file__).resolve().parents[1] / "examples" / "arm_place_skillspace.json").read_text() + status, _, record = self.request("/api/install", {"document": document}) + self.assertEqual(status, 200) + self.assertEqual(record["grounding_mode"], "inline") + self.assertEqual(record["skill"]["skill_id"], "place_object") + self.assertEqual(record["skill"]["source_permissions"], "local_only_no_public_reuse") + for source in ({"bundled": True, "document": document}, {"bundled": False}, {"document": {}}, {}): + with self.subTest(source=list(source)): + status, _, error = self.request("/api/install", source) + self.assertEqual(status, 400) + self.assertIn("error", error) + + def test_preview_spawns_native_worker_and_honors_independent_grounded_scene(self): + scene = {"object_position": [.36, -.08, .31], "target_position": [.50, .08, .31], "seed": 12} + status, _, preview = self.request("/api/preview", {"scene": scene}) + self.assertEqual(status, 200) + self.assertTrue(preview["info"]["valid"]) + self.assertFalse(preview["info"]["success"]) + observation = preview["observation"] + for coordinate, expected in zip(observation["object_position"][:2], scene["object_position"][:2]): + self.assertAlmostEqual(coordinate, expected, places=6) + self.assertEqual(observation["target_position"], scene["target_position"]) + self.assertEqual(len(observation["joint_position"]), 6) + json.dumps(preview, allow_nan=False) + + def test_invalid_scene_and_execution_identity_do_not_queue_native_runs(self): + before = set(self.server.jobs) + for scene in ({"object_position": [.60, .20, .31]}, {"seed": True}, {"unknown": 1}): + with self.subTest(scene=scene): + status, _, body = self.request("/api/preview", {"scene": scene}) + self.assertEqual(status, 400) + self.assertIn("error", body) + scene = {"object_position": [.42, -.04, .31], "target_position": [.54, .10, .31], "seed": 0} + status, _, body = self.request("/api/run", {"installation_id": "../escape", "scene": scene, "policy": "placement"}) + self.assertEqual(status, 400) + self.assertEqual(set(self.server.jobs), before) + status, _, _ = self.request("/api/jobs/" + "0" * 32, method="GET") + self.assertEqual(status, 404) + + +if __name__ == "__main__": + unittest.main() diff --git a/docs/feed.xml b/docs/feed.xml index e677367..ff65f1f 100644 --- a/docs/feed.xml +++ b/docs/feed.xml @@ -1,2 +1,2 @@ -DVIDIA Researchhttps://research.dvidia.org/Research footprints on demonstrations, calibrated simulation and robot skills.enOffline cable training environmenthttps://research.dvidia.org/papers/offline-cable-training-environment/https://research.dvidia.org/papers/offline-cable-training-environment/Wed, 07 Oct 2026 12:00:00 GMTCPU simulation-only · Controller search and frozen evaluation executed. The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.Fast accurate robot training simulationhttps://research.dvidia.org/papers/fast-accurate-robot-training-simulation/https://research.dvidia.org/papers/fast-accurate-robot-training-simulation/Wed, 07 Oct 2026 12:00:00 GMT54 CPU fixture trials · GPU and physical transfer untested. A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.Grok robotics research on Xhttps://research.dvidia.org/papers/grok-robotics-research-on-x/https://research.dvidia.org/papers/grok-robotics-research-on-x/Wed, 07 Oct 2026 12:00:00 GMTPrimary sources checked · Experiments proposed. Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.Spatially grounded downloadable robot skillshttps://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/https://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/Wed, 07 Oct 2026 12:00:00 GMTSource review · DVIDIA experiments not run. A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.Clef and grounded video observationshttps://research.dvidia.org/papers/clef-and-grounded-video-observations/https://research.dvidia.org/papers/clef-and-grounded-video-observations/Tue, 06 Oct 2026 12:00:00 GMTFive licensed excerpts · Accuracy evaluation outstanding. A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.From Skillspace to robot skillhttps://research.dvidia.org/papers/from-skillspace-to-robot-skill/https://research.dvidia.org/papers/from-skillspace-to-robot-skill/Tue, 06 Oct 2026 12:00:00 GMTGraduation and robot training not run. An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.Turn physical footage into testable evidencehttps://research.dvidia.org/papers/physical-skill-research-agenda/https://research.dvidia.org/papers/physical-skill-research-agenda/Tue, 06 Oct 2026 12:00:00 GMTFour baseline protocols proposed. A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct. +DVIDIA Researchhttps://research.dvidia.org/Research footprints on demonstrations, calibrated simulation and robot skills.enInstalling a Skillspace on a simulated armhttps://research.dvidia.org/papers/skillspace-arm-installation/https://research.dvidia.org/papers/skillspace-arm-installation/Wed, 07 Oct 2026 12:00:00 GMTPublic skill link to authored adapter · 6/6 scene placements. The first link-to-arm product path installs an existing DVIDIA placement envelope, binds a local authored controller to one simulated arm, and reuses it in independently grounded scenes. Native jaw contacts carry a free box; six layouts complete, while no-motion and identical joint commands with open jaws each complete zero of six. Installed execution passes process-level offline checks. Task metadata contains no learned policy; perception, cup geometry, full arm collisions and physical qualification remain open.Offline cable training environmenthttps://research.dvidia.org/papers/offline-cable-training-environment/https://research.dvidia.org/papers/offline-cable-training-environment/Wed, 07 Oct 2026 12:00:00 GMTCPU simulation-only · Controller search and frozen evaluation executed. The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.Fast accurate robot training simulationhttps://research.dvidia.org/papers/fast-accurate-robot-training-simulation/https://research.dvidia.org/papers/fast-accurate-robot-training-simulation/Wed, 07 Oct 2026 12:00:00 GMT54 CPU fixture trials · GPU and physical transfer untested. A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.Grok robotics research on Xhttps://research.dvidia.org/papers/grok-robotics-research-on-x/https://research.dvidia.org/papers/grok-robotics-research-on-x/Wed, 07 Oct 2026 12:00:00 GMTPrimary sources checked · Experiments proposed. Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.Spatially grounded downloadable robot skillshttps://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/https://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/Wed, 07 Oct 2026 12:00:00 GMTSource review · DVIDIA experiments not run. A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.Clef and grounded video observationshttps://research.dvidia.org/papers/clef-and-grounded-video-observations/https://research.dvidia.org/papers/clef-and-grounded-video-observations/Tue, 06 Oct 2026 12:00:00 GMTFive licensed excerpts · Accuracy evaluation outstanding. A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.From Skillspace to robot skillhttps://research.dvidia.org/papers/from-skillspace-to-robot-skill/https://research.dvidia.org/papers/from-skillspace-to-robot-skill/Tue, 06 Oct 2026 12:00:00 GMTGraduation and robot training not run. An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.Turn physical footage into testable evidencehttps://research.dvidia.org/papers/physical-skill-research-agenda/https://research.dvidia.org/papers/physical-skill-research-agenda/Tue, 06 Oct 2026 12:00:00 GMTFour baseline protocols proposed. A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct. diff --git a/docs/index.html b/docs/index.html index 73f1e2f..8bbf858 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ Research journal · DVIDIA Research -

An open research notebook

From observation
to physical skill.

We study how demonstrations become usable evidence, how simulation becomes useful practice, and when a robot skill earns a release.

Published by DVIDIA · hello@dvidia.org

Publications

7 papers and working notes

· Product prototype and local qualification

Offline cable training environment

The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.

CPU simulation-only · Controller search and frozen evaluation executed

· Decision report and local experiment

Fast accurate robot training simulation

A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.

54 CPU fixture trials · GPU and physical transfer untested

· Source review and thesis comparison

Grok robotics research on X

Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.

Primary sources checked · Experiments proposed

· Research synthesis and proposed experiments

Spatially grounded downloadable robot skills

A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.

Source review · DVIDIA experiments not run

· Engineering feasibility pilot

Clef and grounded video observations

A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.

Five licensed excerpts · Accuracy evaluation outstanding

· Source review and implementation proposal

From Skillspace to robot skill

An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.

Graduation and robot training not run

· Research agenda

Turn physical footage into testable evidence

A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct.

Four baseline protocols proposed

Research footprints

  1. The offline cable environment is runnable

    A local controller-training loop and simulation-only skill pack now run on CPU. Trained and baseline feedback each pass 10/10 simulated seeds; zero force and early release each pass 0/10. Real gripping, calibration and GPU qualification remain open.

    Read the first product build and replay
  2. Contact accuracy meets runtime

    54 deterministic CPU fixture trials recorded. Endpoint agreement coexists with unqualified force transients; coarse wall tests expose missed contact. No GPU or physical-transfer claim.

    Read the measurements
  3. Compare the observation-to-skill thesis with prior work

    Spatial attention, demonstration coverage, executable simulation and reusable repairs are reviewed separately. Three parallel Grok 4.7 searches support discovery; primary sources support the claims.

    Read the comparison
  4. Five licensed POV excerpts processed

    Ten image calls completed. A checker accepted an object error and captions omitted visible state changes. The separate accuracy pilot remains unrun.

    Read the feasibility run
  5. Define the evidence and release questions

    Four baseline protocols and a Skillspace graduation proposal establish the questions to test. A proposed protocol is distinct from an executed experiment.

    Read the agenda

Open questions

  • Capture quality — Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.
  • Skill relations — Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.
  • Evaluation and provenance — Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.
  • Physical grounding — Measure whether state/contact evidence and controlled synthetic augmentation improve a defined physical-skill task.

Follow new publications through RSS or inspect the source and revisions on GitHub.

+

An open research notebook

From observation
to physical skill.

We study how demonstrations become usable evidence, how simulation becomes useful practice, and when a robot skill earns a release.

Published by DVIDIA · hello@dvidia.org

Publications

8 papers and working notes

· Product prototype and native contact qualification

Installing a Skillspace on a simulated arm

The first link-to-arm product path installs an existing DVIDIA placement envelope, binds a local authored controller to one simulated arm, and reuses it in independently grounded scenes. Native jaw contacts carry a free box; six layouts complete, while no-motion and identical joint commands with open jaws each complete zero of six. Installed execution passes process-level offline checks. Task metadata contains no learned policy; perception, cup geometry, full arm collisions and physical qualification remain open.

Public skill link to authored adapter · 6/6 scene placements

· Product prototype and local qualification

Offline cable training environment

The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.

CPU simulation-only · Controller search and frozen evaluation executed

· Decision report and local experiment

Fast accurate robot training simulation

A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.

54 CPU fixture trials · GPU and physical transfer untested

· Source review and thesis comparison

Grok robotics research on X

Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.

Primary sources checked · Experiments proposed

· Research synthesis and proposed experiments

Spatially grounded downloadable robot skills

A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.

Source review · DVIDIA experiments not run

· Engineering feasibility pilot

Clef and grounded video observations

A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.

Five licensed excerpts · Accuracy evaluation outstanding

· Source review and implementation proposal

From Skillspace to robot skill

An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.

Graduation and robot training not run

· Research agenda

Turn physical footage into testable evidence

A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct.

Four baseline protocols proposed

Research footprints

  1. A public skill link reaches a simulated arm

    One-click local installation binds a DVIDIA placement envelope to an authored contact controller. Six scene layouts pass; identical joint commands with open jaws and no-motion controls each pass 0/6. Physical transfer and learned policies remain open.

    Read the installation contract and arm replay
  2. The offline cable environment is runnable

    A local controller-training loop and simulation-only skill pack now run on CPU. Trained and baseline feedback each pass 10/10 simulated seeds; zero force and early release each pass 0/10. Real gripping, calibration and GPU qualification remain open.

    Read the first product build and replay
  3. Contact accuracy meets runtime

    54 deterministic CPU fixture trials recorded. Endpoint agreement coexists with unqualified force transients; coarse wall tests expose missed contact. No GPU or physical-transfer claim.

    Read the measurements
  4. Compare the observation-to-skill thesis with prior work

    Spatial attention, demonstration coverage, executable simulation and reusable repairs are reviewed separately. Three parallel Grok 4.7 searches support discovery; primary sources support the claims.

    Read the comparison
  5. Five licensed POV excerpts processed

    Ten image calls completed. A checker accepted an object error and captions omitted visible state changes. The separate accuracy pilot remains unrun.

    Read the feasibility run
  6. Define the evidence and release questions

    Four baseline protocols and a Skillspace graduation proposal establish the questions to test. A proposed protocol is distinct from an executed experiment.

    Read the agenda

Open questions

  • Capture quality — Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.
  • Skill relations — Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.
  • Evaluation and provenance — Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.
  • Physical grounding — Measure whether state/contact evidence and controlled synthetic augmentation improve a defined physical-skill task.

Follow new publications through RSS or inspect the source and revisions on GitHub.

diff --git a/docs/papers/clef-and-grounded-video-observations/index.html b/docs/papers/clef-and-grounded-video-observations/index.html index 90dabf0..6b3dc70 100644 --- a/docs/papers/clef-and-grounded-video-observations/index.html +++ b/docs/papers/clef-and-grounded-video-observations/index.html @@ -1,7 +1,7 @@ Clef and grounded video observations · DVIDIA Research -

Engineering feasibility pilot

Clef and grounded video observations

· DVIDIA

Five licensed excerpts · Accuracy evaluation outstanding

Source & history · Download Markdown

Abstract

A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.

In this paper

Engineering pilot executed · 6 October 2026 · Accuracy evaluation outstanding

+

Engineering feasibility pilot

Clef and grounded video observations

· DVIDIA

Five licensed excerpts · Accuracy evaluation outstanding

Source & history · Download Markdown

Abstract

A preregistered image-API feasibility run processed five licensed three-second POV excerpts using four timestamped frames, a Gemma caption and a Clef-flash check. All five completed at a price-derived inference estimate of $0.00140634. Post-run inspection found an object error accepted by the checker and omitted state changes. API and schema compatibility were demonstrated; annotation accuracy and whole-task success were not.

In this paper

Engineering pilot executed · 6 October 2026 · Accuracy evaluation outstanding

We executed a small, preregistered feasibility run: five existing public, licensed three-second POV excerpts, four original-timestamped frames per excerpt, one Gemma caption call and one Clef-flash check per excerpt. All five completed. The estimated inference cost was $0.00140634. This establishes that the image APIs and bounded data contract work; it does not establish that the annotations are accurate.

The useful finding was a failure: a caption called a pink plate a cutting board, and the second model agreed. Several descriptions listed objects or hand positions while missing visible folding or transfer. Model agreement must not become a “verified” badge. The observations below come from AI-assisted inspection of the exact input frames after outputs were frozen, not independent human annotations.

Preregistration · Complete sanitized results and source/frame hashes · Prompts and request recipes · Next evaluation protocol

diff --git a/docs/papers/fast-accurate-robot-training-simulation/index.html b/docs/papers/fast-accurate-robot-training-simulation/index.html index 1409f75..36c5111 100644 --- a/docs/papers/fast-accurate-robot-training-simulation/index.html +++ b/docs/papers/fast-accurate-robot-training-simulation/index.html @@ -1,7 +1,7 @@ Fast accurate robot training simulation · DVIDIA Research -

Decision report and local experiment

Fast accurate robot training simulation

· DVIDIA

54 CPU fixture trials · GPU and physical transfer untested

Source & history · Download Markdown

Abstract

A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.

In this paper

Decision report · 7 October 2026 · Grok 4.7 research plus primary-source verification · 54 local CPU fixture trials; no GPU training or physical robot tests

+

Decision report and local experiment

Fast accurate robot training simulation

· DVIDIA

54 CPU fixture trials · GPU and physical transfer untested

Source & history · Download Markdown

Abstract

A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured.

In this paper

Decision report · 7 October 2026 · Grok 4.7 research plus primary-source verification · 54 local CPU fixture trials; no GPU training or physical robot tests

Build an offline, self-hosted environment that converts demonstrations into calibrated practice and qualified robot skills. Start with existing physics engines and concentrate the product on task construction, uncertainty, failure/recovery coverage, efficient scheduling and qualification. Use native MuJoCo for local numerical checks, test MuJoCo Warp for batched rigid contact, and qualify Newton rods or another deformable backend against the actual rope task before selecting it. The microscopic intuition explains why objects resist and deform; the useful simulation interface is the resulting force, motion, friction and sensor response at robot scale. The first product vertical should be bounded rope grasping, pulling, threading and regrasping, with bow tying a later capability. One owned GPU is the starting design target; minimum useful VRAM and an “ultrafast” training rate remain unmeasured. Adding GPUs or servers should scale independent practice worlds, while a released skill retains a declared hardware profile and physical evidence.

Reproduce the response that changes the robot's decision

When a fingertip presses a table, resistance ultimately comes from electromagnetic interactions and quantum constraints on matter. “Electrons reject each other” is a useful intuition but incomplete: atoms also attract and bond, and Pauli exclusion restricts allowed electron states rather than adding a separate classical repulsive force. Molecular structure and collective interactions produce elasticity. We do not need to track electrons to calculate whether a gripper holds a lace; we need the effective mechanical behavior at the force, length and time scales the task uses. (Feynman on forces and elasticity, exclusion and matter)

diff --git a/docs/papers/from-skillspace-to-robot-skill/index.html b/docs/papers/from-skillspace-to-robot-skill/index.html index 727f27c..06cdd5b 100644 --- a/docs/papers/from-skillspace-to-robot-skill/index.html +++ b/docs/papers/from-skillspace-to-robot-skill/index.html @@ -1,7 +1,7 @@ From Skillspace to robot skill · DVIDIA Research -

Source review and implementation proposal

From Skillspace to robot skill

· DVIDIA

Graduation and robot training not run

Source & history · Download Markdown

Abstract

An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.

In this paper

Source review and proposal · 6 October 2026 · Graduation experiment not run

+

Source review and implementation proposal

From Skillspace to robot skill

· DVIDIA

Graduation and robot training not run

Source & history · Download Markdown

Abstract

An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun.

In this paper

Source review and proposal · 6 October 2026 · Graduation experiment not run

Follow-up: the Clef image feasibility pilot has now run on five public excerpts. It does not complete the 40-episode accuracy protocol below.

A Skillspace can become the home for a skill's learning history. More uploaded videos do not, by themselves, establish a better policy. We need evidence that new demonstrations add useful coverage, survive quality checks, and improve held-out performance on a specified robot.

This review follows Varun Nair's pipeline post, its linked Argus article, selected upstream source files, and an audit of the DVIDIA website. The design below is our proposal, not an implemented training service. No user footage was sent to any model, no training was run, and no robot was operated for this review.

diff --git a/docs/papers/grok-robotics-research-on-x/index.html b/docs/papers/grok-robotics-research-on-x/index.html index eb3e581..fb5b5f3 100644 --- a/docs/papers/grok-robotics-research-on-x/index.html +++ b/docs/papers/grok-robotics-research-on-x/index.html @@ -1,7 +1,7 @@ Grok robotics research on X · DVIDIA Research -

Source review and thesis comparison

Grok robotics research on X

· DVIDIA

Primary sources checked · Experiments proposed

Source & history · Download Markdown

Abstract

Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.

In this paper

Research snapshot: 7 October 2026 · Grok 4.7 used through Pi CLI · No training, simulation or hardware experiment was run

+

Source review and thesis comparison

Grok robotics research on X

· DVIDIA

Primary sources checked · Experiments proposed

Source & history · Download Markdown

Abstract

Three Grok 4.7 research passes surface observation-to-action, synthetic-practice and reusable-repair ideas. Independent primary-source checks compare those findings with our thesis: observation supplies goals and state, language retrieves a skill, spatial expectations guide attention, and executable feedback with evaluation establishes competence. X posts remain discovery leads. No universal demonstration count or arbitrary-robot transfer follows from the reviewed results.

In this paper

Research snapshot: 7 October 2026 · Grok 4.7 used through Pi CLI · No training, simulation or hardware experiment was run

Your initial thesis has substantial support when expressed as observation-derived goals and task state, language-based retrieval, contextual spatial attention, and simulation-assisted learning of a feedback skill. The evidence does not establish that a fixed quantity of video covers every variant, that XYZ determines what to do, or that a simulated policy downloads unchanged onto arbitrary robots. The strongest interpretation of your small-sample idea is adaptation: existing models supply reusable manipulation knowledge, while new demonstrations specify a task, object or operating region. Recent work makes that interpretation more credible, and also exposes its dependencies. Robots can learn through trial and error and retain useful repairs; execution still needs observable outcomes and compatible actions. A fast virtual training environment is consequently a plausible product hypothesis, but the research first needs to establish which observed information makes training more efficient and which simulated improvements survive physical transfer.

The observation-to-skill thesis matches the evidence when each skill has a tested operating region

The following mapping preserves the sequence you described. “Supported” means a component has demonstrated precedents, not that the complete proposed architecture has been demonstrated.

diff --git a/docs/papers/offline-cable-training-environment/index.html b/docs/papers/offline-cable-training-environment/index.html index 43ce329..c8bb283 100644 --- a/docs/papers/offline-cable-training-environment/index.html +++ b/docs/papers/offline-cable-training-environment/index.html @@ -1,7 +1,7 @@ Offline cable training environment · DVIDIA Research -

Product prototype and local qualification

Offline cable training environment

· DVIDIA

CPU simulation-only · Controller search and frozen evaluation executed

Source & history · Download Markdown

Abstract

The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.

In this paper

Product prototype and local qualification · 7 October 2026 · Native CPU simulation only

+

Product prototype and local qualification

Offline cable training environment

· DVIDIA

CPU simulation-only · Controller search and frozen evaluation executed

Source & history · Download Markdown

Abstract

The first runnable product loop combines an anchored cable environment, local controller-parameter search, frozen evaluation, offline replay and a manifest-backed skill pack. The selected controller and a fixed feedback baseline both completed 10/10 held-out simulated episodes; zero-force and release controls completed 0/10. A native macOS network-denial run completed 3/3 additional episodes. Ideal endpoint attachment and privileged state bound the result; physical rope calibration, gripping, sensors and GPU throughput remain untested.

In this paper

Product prototype and local qualification · 7 October 2026 · Native CPU simulation only

The first runnable product loop now connects an authored environment → local practice → a frozen controller → evaluation → an inspectable skill pack. CableEndReach-v0 bends an anchored cable using bounded forces at its terminal site. The selected controller completed 10/10 held-out simulated episodes, but a fixed feedback baseline also completed 10/10 and finished faster. The result establishes an executable research and packaging foundation, with explicit failure controls. It does not establish physical rope accuracy, shoe tying, realistic grasping or a performance advantage over existing simulators.

Runnable source and instructions · Open the recorded replay · Download the skill pack · Complete qualification

The task has an explicit operating envelope

diff --git a/docs/papers/physical-skill-research-agenda/index.html b/docs/papers/physical-skill-research-agenda/index.html index e868f90..0419251 100644 --- a/docs/papers/physical-skill-research-agenda/index.html +++ b/docs/papers/physical-skill-research-agenda/index.html @@ -1,7 +1,7 @@ Turn physical footage into testable evidence · DVIDIA Research -

Research agenda

Turn physical footage into testable evidence

· DVIDIA

Four baseline protocols proposed

Source & history · Download Markdown

Abstract

A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct.

In this paper

DVIDIA should test the usefulness of its evidence before expanding collection volume. The immediate opportunity is to make demonstrations easier to inspect, compare and reproduce, then measure whether added structure or physical signals help a defined task. Sam Padilla's 5 October essay provides a strategic prompt; the technical sources support narrower, testable questions. The four baseline protocols proposed in this agenda have not run, and neither customer demand nor robot transfer has been established. Four contributor-sized studies cover capture quality, relations over time, provenance and physical grounding.

+

Research agenda

Turn physical footage into testable evidence

· DVIDIA

Four baseline protocols proposed

Source & history · Download Markdown

Abstract

A research agenda covering visible capture evidence, relations over time, evaluation provenance and physical grounding. Each question has a bounded protocol and a failure condition. The aim is to measure whether structure and physical signals improve a defined task before scaling collection. Strategic opinions, author-reported results and our untested proposals are kept distinct.

In this paper

DVIDIA should test the usefulness of its evidence before expanding collection volume. The immediate opportunity is to make demonstrations easier to inspect, compare and reproduce, then measure whether added structure or physical signals help a defined task. Sam Padilla's 5 October essay provides a strategic prompt; the technical sources support narrower, testable questions. The four baseline protocols proposed in this agenda have not run, and neither customer demand nor robot transfer has been established. Four contributor-sized studies cover capture quality, relations over time, provenance and physical grounding.

The essay motivates a hypothesis, not a market forecast

In Robotics Data: Bet Hard Or Get Out, Sam Padilla, 5 October 2026, argues for exceptional collection scale, distinctive physical information or synthetic generation. He warns that buyers can internalize embodiment-specific collection and points to opportunities beyond raw data supply. His conversations and volume anecdote are not independently verified demand evidence. (Original essay).

Our inference is a practical test: does an attributable demonstration with observable state changes improve a specific evaluation more than a clip with coarse tags? This would establish a useful property of a research artifact. It would not establish willingness to pay, a durable business model or an executable robot skill. The first deliverable should therefore be a small benchmark with a clear failure condition, rather than a volume target.

diff --git a/docs/papers/skillspace-arm-installation/index.html b/docs/papers/skillspace-arm-installation/index.html new file mode 100644 index 0000000..8a79e2f --- /dev/null +++ b/docs/papers/skillspace-arm-installation/index.html @@ -0,0 +1,18 @@ + + +Installing a Skillspace on a simulated arm · DVIDIA Research +

Product prototype and native contact qualification

Installing a Skillspace on a simulated arm

· DVIDIA

Public skill link to authored adapter · 6/6 scene placements

Source & history · Download Markdown

Abstract

The first link-to-arm product path installs an existing DVIDIA placement envelope, binds a local authored controller to one simulated arm, and reuses it in independently grounded scenes. Native jaw contacts carry a free box; six layouts complete, while no-motion and identical joint commands with open jaws each complete zero of six. Installed execution passes process-level offline checks. Task metadata contains no learned policy; perception, cup geometry, full arm collisions and physical qualification remain open.

In this paper

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, whose metadata is served at 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. 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.

+
SceneOutcomeFinal target error (mm)Object lift (mm)Active simulation (s)Episode wall (s)
defaultsuccess0.286128.911.3100.642
cross_rightsuccess0.400128.213.3560.739
cross_leftsuccess0.353124.111.3340.567
forwardsuccess0.329129.011.5910.616
reversesuccess0.330124.713.5940.684
widesuccess0.437127.712.7150.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, an executable source adapter archive, full control evidence, gzip JSON, compact metrics, integrity manifest, reproduction receipt, native offline receipt, and a local product guide. 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/papers/spatially-grounded-downloadable-robot-skills/index.html b/docs/papers/spatially-grounded-downloadable-robot-skills/index.html index 951fb4e..5009ccb 100644 --- a/docs/papers/spatially-grounded-downloadable-robot-skills/index.html +++ b/docs/papers/spatially-grounded-downloadable-robot-skills/index.html @@ -1,7 +1,7 @@ Spatially grounded downloadable robot skills · DVIDIA Research -

Research synthesis and proposed experiments

Spatially grounded downloadable robot skills

· DVIDIA

Source review · DVIDIA experiments not run

Source & history · Download Markdown

Abstract

A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.

In this paper

Research synthesis and proposed experiments · 7 October 2026 · No DVIDIA experiment in this report has run

+

Research synthesis and proposed experiments

Spatially grounded downloadable robot skills

· DVIDIA

Source review · DVIDIA experiments not run

Source & history · Download Markdown

Abstract

A synthesis of learning from human demonstrations, language-conditioned spatial attention, simulation expansion and robot-specific skill delivery. Spatial priors can accelerate inspection but do not determine contact state or control. The proposed downloadable skill packages a controller, initiation and termination conditions, compatible sensing and hardware, recovery behavior and measured evidence. Separate experiments would test attention, data coverage, feedback and transfer.

In this paper

Research synthesis and proposed experiments · 7 October 2026 · No DVIDIA experiment in this report has run

My judgment is that the thesis identifies a useful architecture, but its strongest version needs a measurable operating boundary. Human demonstrations can teach what a task means, which state changes matter, and where to inspect; turning those observations into robot control needs an action and embodiment bridge. A command-conditioned spatial prior could accelerate target discovery, provided observation corrects it when a shoe is on a table or the person changes posture. Simulation can expand grounded experience, but generated volume cannot establish coverage of every material, contact, damaged object, or recovery. Fifty examples could adapt a substantial pretrained physical skill model; they are not an established threshold for acquiring all of shoe tying. The falsifiable research claim is: for a fixed pretrained model and robot, task-state annotations, spatially directed inspection, and targeted real/simulated recovery data improve held-out physical success per unit of collection cost, while preserving performance on unusual placements. A downloadable skill is the resulting tested controller, its compatibility and task contract, and evidence of where it works.

This synthesis combines three parallel primary-source research tracks with the existing DVIDIA research context. Grok 4.7 was inaccessible and was not used: the inspected browser was signed out, the exact model could not be verified, and no prompt or response exists. Recent 2026 results below include author-reported preprints; none was independently reproduced here. Architecture, experiments, budgets, and release criteria are proposals.

Demonstrations teach meaning before they supply motor control

diff --git a/docs/publications.json b/docs/publications.json index 08d7379..28bb9ae 100644 --- a/docs/publications.json +++ b/docs/publications.json @@ -5,6 +5,20 @@ "follow": "https://x.com/IAMMRRIVR", "contributor": null, "publications": [ + { + "slug": "skillspace-arm-installation", + "title": "Installing a Skillspace on a simulated arm", + "source": "reports/Installing a Skillspace on a simulated arm.md", + "date": "2026-10-07", + "type": "Product prototype and native contact qualification", + "status": "Public skill link to authored adapter · 6/6 scene placements", + "topics": [ + "physical-grounding", + "skill-relations", + "evaluation-provenance" + ], + "abstract": "The first link-to-arm product path installs an existing DVIDIA placement envelope, binds a local authored controller to one simulated arm, and reuses it in independently grounded scenes. Native jaw contacts carry a free box; six layouts complete, while no-motion and identical joint commands with open jaws each complete zero of six. Installed execution passes process-level offline checks. Task metadata contains no learned policy; perception, cup geometry, full arm collisions and physical qualification remain open." + }, { "slug": "offline-cable-training-environment", "title": "Offline cable training environment", diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 9c582ab..7d0c72f 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1,2 +1,2 @@ -https://research.dvidia.org/2026-10-07https://research.dvidia.org/papers/offline-cable-training-environment/2026-10-07https://research.dvidia.org/papers/fast-accurate-robot-training-simulation/2026-10-07https://research.dvidia.org/papers/grok-robotics-research-on-x/2026-10-07https://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/2026-10-07https://research.dvidia.org/papers/clef-and-grounded-video-observations/2026-10-06https://research.dvidia.org/papers/from-skillspace-to-robot-skill/2026-10-06https://research.dvidia.org/papers/physical-skill-research-agenda/2026-10-06https://research.dvidia.org/topics/capture-quality/2026-10-07https://research.dvidia.org/topics/skill-relations/2026-10-07https://research.dvidia.org/topics/evaluation-provenance/2026-10-07https://research.dvidia.org/topics/physical-grounding/2026-10-07 +https://research.dvidia.org/2026-10-07https://research.dvidia.org/papers/skillspace-arm-installation/2026-10-07https://research.dvidia.org/papers/offline-cable-training-environment/2026-10-07https://research.dvidia.org/papers/fast-accurate-robot-training-simulation/2026-10-07https://research.dvidia.org/papers/grok-robotics-research-on-x/2026-10-07https://research.dvidia.org/papers/spatially-grounded-downloadable-robot-skills/2026-10-07https://research.dvidia.org/papers/clef-and-grounded-video-observations/2026-10-06https://research.dvidia.org/papers/from-skillspace-to-robot-skill/2026-10-06https://research.dvidia.org/papers/physical-skill-research-agenda/2026-10-06https://research.dvidia.org/topics/capture-quality/2026-10-07https://research.dvidia.org/topics/skill-relations/2026-10-07https://research.dvidia.org/topics/evaluation-provenance/2026-10-07https://research.dvidia.org/topics/physical-grounding/2026-10-07 diff --git a/docs/topics/capture-quality/index.html b/docs/topics/capture-quality/index.html index 9eeb078..44becdc 100644 --- a/docs/topics/capture-quality/index.html +++ b/docs/topics/capture-quality/index.html @@ -1,7 +1,7 @@ Capture quality · DVIDIA Research -

Research question

Capture quality

DVIDIA · Visible evidence

Protocols and progress are scoped below

Question

Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.

Question: Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.

+

Research question

Capture quality

DVIDIA · Visible evidence

Protocols and progress are scoped below

Question

Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.

Question: Test whether hands, relevant objects and state changes are actually observable in a POV demonstration.

Status: scoping · Updated 6 October 2026 · Results: not run

Open a research question · Baseline protocol · Bibliography

Primary sources

diff --git a/docs/topics/evaluation-provenance/index.html b/docs/topics/evaluation-provenance/index.html index 94d158d..1f18e1a 100644 --- a/docs/topics/evaluation-provenance/index.html +++ b/docs/topics/evaluation-provenance/index.html @@ -1,7 +1,7 @@ Evaluation and provenance · DVIDIA Research -

Research question

Evaluation and provenance

DVIDIA · Reproducible evidence

Protocols and progress are scoped below

Question

Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.

Question: Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.

+

Research question

Evaluation and provenance

DVIDIA · Reproducible evidence

Protocols and progress are scoped below

Question

Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.

Question: Test episode readback, original-to-derivative lineage and split integrity using small, auditable fixtures.

Status: evaluating · Updated 6 October 2026 · Results: image feasibility run complete; reference accuracy and provenance baselines not run

Open a research question · Baseline protocol · Bibliography

Primary sources

diff --git a/docs/topics/physical-grounding/index.html b/docs/topics/physical-grounding/index.html index 0b9770e..8ec8aff 100644 --- a/docs/topics/physical-grounding/index.html +++ b/docs/topics/physical-grounding/index.html @@ -1,7 +1,9 @@ Physical grounding · DVIDIA Research -

Research question

Physical grounding

DVIDIA · Signals beyond appearance

Protocols and progress are scoped below

Question

Measure whether state/contact evidence and controlled synthetic augmentation improve a defined physical-skill task.

Runnable cable environment — 7 October 2026

+

Research question

Physical grounding

DVIDIA · Signals beyond appearance

Protocols and progress are scoped below

Question

Measure whether state/contact evidence and controlled synthetic augmentation improve a defined physical-skill task.

+

Installing a Skillspace on a simulated arm 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. 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 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. Ideal endpoint attachment and privileged state remain explicit; this is not the retrieval baseline, physical gripping, calibrated rope accuracy or GPU qualification.

Recorded contact fixture — 7 October 2026

The separate native CPU contact fixture records 54 deterministic trials across 18 cases and three repeats. The decision report explains why endpoint agreement does not establish fingertip-force fidelity, and why coarse timesteps can miss collisions. Benchmark source, pinned dependencies, per-trial JSON, an independent AI-assisted code review and a bounded Python-network denial check are published. This fixture does not execute the retrieval baseline below or validate rope materials, GPU training or physical robot transfer.

diff --git a/docs/topics/skill-relations/index.html b/docs/topics/skill-relations/index.html index e000604..61f4f64 100644 --- a/docs/topics/skill-relations/index.html +++ b/docs/topics/skill-relations/index.html @@ -1,7 +1,7 @@ Skill relations · DVIDIA Research -

Research question

Skill relations

DVIDIA · Events with evidence

Protocols and progress are scoped below

Question

Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.

Question: Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.

+

Research question

Skill relations

DVIDIA · Events with evidence

Protocols and progress are scoped below

Question

Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.

Question: Calibrate hand–object relations, then test temporal event graphs whose claims point back to video intervals.

Status: scoping · Updated 6 October 2026 · Results: not run

Open a research question · Baseline protocol · Bibliography

Primary sources

diff --git a/publications.json b/publications.json index b3230f2..28bb9ae 100644 --- a/publications.json +++ b/publications.json @@ -5,13 +5,27 @@ "follow": "https://x.com/IAMMRRIVR", "contributor": null, "publications": [ + { + "slug": "skillspace-arm-installation", + "title": "Installing a Skillspace on a simulated arm", + "source": "reports/Installing a Skillspace on a simulated arm.md", + "date": "2026-10-07", + "type": "Product prototype and native contact qualification", + "status": "Public skill link to authored adapter · 6/6 scene placements", + "topics": [ + "physical-grounding", + "skill-relations", + "evaluation-provenance" + ], + "abstract": "The first link-to-arm product path installs an existing DVIDIA placement envelope, binds a local authored controller to one simulated arm, and reuses it in independently grounded scenes. Native jaw contacts carry a free box; six layouts complete, while no-motion and identical joint commands with open jaws each complete zero of six. Installed execution passes process-level offline checks. Task metadata contains no learned policy; perception, cup geometry, full arm collisions and physical qualification remain open." + }, { "slug": "offline-cable-training-environment", "title": "Offline cable training environment", "source": "reports/Offline cable training environment.md", "date": "2026-10-07", "type": "Product prototype and local qualification", - "status": "CPU simulation-only \u00b7 Controller search and frozen evaluation executed", + "status": "CPU simulation-only · Controller search and frozen evaluation executed", "topics": [ "physical-grounding", "evaluation-provenance" @@ -24,12 +38,12 @@ "source": "reports/Fast accurate robot training simulation.md", "date": "2026-10-07", "type": "Decision report and local experiment", - "status": "54 CPU fixture trials \u00b7 GPU and physical transfer untested", + "status": "54 CPU fixture trials · GPU and physical transfer untested", "topics": [ "physical-grounding", "evaluation-provenance" ], - "abstract": "A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance\u2013accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured." + "abstract": "A design for an offline, self-hosted training environment that turns demonstrations into calibrated practice and qualified robot skills. We examine contact, deformation, sensor feedback and the performance–accuracy tradeoff, then report 54 deterministic native MuJoCo CPU fixture trials. Fine endpoint agreement did not establish accurate contact transients, and coarse timesteps missed collisions. Minimum GPU memory, rope accuracy and physical transfer remain unmeasured." }, { "slug": "grok-robotics-research-on-x", @@ -37,7 +51,7 @@ "source": "reports/Grok robotics research on X.md", "date": "2026-10-07", "type": "Source review and thesis comparison", - "status": "Primary sources checked \u00b7 Experiments proposed", + "status": "Primary sources checked · Experiments proposed", "topics": [ "skill-relations", "physical-grounding" @@ -50,7 +64,7 @@ "source": "reports/Spatially grounded downloadable robot skills.md", "date": "2026-10-07", "type": "Research synthesis and proposed experiments", - "status": "Source review \u00b7 DVIDIA experiments not run", + "status": "Source review · DVIDIA experiments not run", "topics": [ "skill-relations", "physical-grounding", @@ -64,7 +78,7 @@ "source": "reports/Clef and grounded video observations.md", "date": "2026-10-06", "type": "Engineering feasibility pilot", - "status": "Five licensed excerpts \u00b7 Accuracy evaluation outstanding", + "status": "Five licensed excerpts · Accuracy evaluation outstanding", "topics": [ "capture-quality", "evaluation-provenance", @@ -83,7 +97,7 @@ "evaluation-provenance", "skill-relations" ], - "abstract": "An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot\u2019s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun." + "abstract": "An Argus review and a proposal to connect original recordings, reviewed episodes, immutable datasets, training runs, held-out evaluation and robot-tested releases. The review separates video annotation from action supervision and defines compatibility beyond a robot’s degree-of-freedom count. A proposed 40-episode annotation pilot and evidence-based graduation criteria remain unrun." }, { "slug": "physical-skill-research-agenda", diff --git a/reports/Installing a Skillspace on a simulated arm.md b/reports/Installing a Skillspace on a simulated arm.md new file mode 100644 index 0000000..6af9f91 --- /dev/null +++ b/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/scripts/build-papers.mjs b/scripts/build-papers.mjs index a9ddda5..5601a42 100644 --- a/scripts/build-papers.mjs +++ b/scripts/build-papers.mjs @@ -185,7 +185,7 @@ export async function buildPublications() { pages.push({ path: page, date: "2026-10-07" }); } const paperRows = catalog.publications.map(p => `

· ${escapeHtml(p.type)}

${escapeHtml(p.title)}

${escapeHtml(p.abstract)}

${escapeHtml(p.status)}

`).join(""); - const content = `

An open research notebook

From observation
to physical skill.

We study how demonstrations become usable evidence, how simulation becomes useful practice, and when a robot skill earns a release.

Published by DVIDIA · hello@dvidia.org

Publications

${catalog.publications.length} papers and working notes

${paperRows}

Research footprints

  1. The offline cable environment is runnable

    A local controller-training loop and simulation-only skill pack now run on CPU. Trained and baseline feedback each pass 10/10 simulated seeds; zero force and early release each pass 0/10. Real gripping, calibration and GPU qualification remain open.

    Read the first product build and replay
  2. Contact accuracy meets runtime

    54 deterministic CPU fixture trials recorded. Endpoint agreement coexists with unqualified force transients; coarse wall tests expose missed contact. No GPU or physical-transfer claim.

    Read the measurements
  3. Compare the observation-to-skill thesis with prior work

    Spatial attention, demonstration coverage, executable simulation and reusable repairs are reviewed separately. Three parallel Grok 4.7 searches support discovery; primary sources support the claims.

    Read the comparison
  4. Five licensed POV excerpts processed

    Ten image calls completed. A checker accepted an object error and captions omitted visible state changes. The separate accuracy pilot remains unrun.

    Read the feasibility run
  5. Define the evidence and release questions

    Four baseline protocols and a Skillspace graduation proposal establish the questions to test. A proposed protocol is distinct from an executed experiment.

    Read the agenda

Open questions

Follow new publications through RSS or inspect the source and revisions on GitHub.

`; + const content = `

An open research notebook

From observation
to physical skill.

We study how demonstrations become usable evidence, how simulation becomes useful practice, and when a robot skill earns a release.

Published by DVIDIA · hello@dvidia.org

Publications

${catalog.publications.length} papers and working notes

${paperRows}

Research footprints

  1. A public skill link reaches a simulated arm

    One-click local installation binds a DVIDIA placement envelope to an authored contact controller. Six scene layouts pass; identical joint commands with open jaws and no-motion controls each pass 0/6. Physical transfer and learned policies remain open.

    Read the installation contract and arm replay
  2. The offline cable environment is runnable

    A local controller-training loop and simulation-only skill pack now run on CPU. Trained and baseline feedback each pass 10/10 simulated seeds; zero force and early release each pass 0/10. Real gripping, calibration and GPU qualification remain open.

    Read the first product build and replay
  3. Contact accuracy meets runtime

    54 deterministic CPU fixture trials recorded. Endpoint agreement coexists with unqualified force transients; coarse wall tests expose missed contact. No GPU or physical-transfer claim.

    Read the measurements
  4. Compare the observation-to-skill thesis with prior work

    Spatial attention, demonstration coverage, executable simulation and reusable repairs are reviewed separately. Three parallel Grok 4.7 searches support discovery; primary sources support the claims.

    Read the comparison
  5. Five licensed POV excerpts processed

    Ten image calls completed. A checker accepted an object error and captions omitted visible state changes. The separate accuracy pilot remains unrun.

    Read the feasibility run
  6. Define the evidence and release questions

    Four baseline protocols and a Skillspace graduation proposal establish the questions to test. A proposed protocol is distinct from an executed experiment.

    Read the agenda

Open questions

Follow new publications through RSS or inspect the source and revisions on GitHub.

`; await writePage("index.html", layout({ page: "index.html", title: "Research journal", description: "An open notebook on demonstrations, physical grounding, calibrated simulation and qualified robot skills.", content, catalog, topics, active: "index" })); pages.unshift({ path: "index.html", date: "2026-10-07" }); const rss = `\nDVIDIA Research${ORIGIN}/Research footprints on demonstrations, calibrated simulation and robot skills.en${catalog.publications.map(p => { const url = `${ORIGIN}/papers/${p.slug}/`; return `${escapeHtml(p.title)}${url}${url}${new Date(`${p.date}T12:00:00Z`).toUTCString()}${escapeHtml(`${p.status}. ${p.abstract}`)}`; }).join("")}\n`; diff --git a/scripts/publications.test.mjs b/scripts/publications.test.mjs index 8cf7b26..9e88fe8 100644 --- a/scripts/publications.test.mjs +++ b/scripts/publications.test.mjs @@ -3,6 +3,7 @@ import { createHash } from "node:crypto"; import { readFile, readdir, stat } from "node:fs/promises"; import { dirname, resolve } from "node:path"; import test from "node:test"; +import { gunzipSync } from "node:zlib"; import { buildPublications, renderMarkdown, ROOT, safeUrl, validatePublications } from "./build-papers.mjs"; const DOCS = resolve(ROOT, "docs"); @@ -119,6 +120,42 @@ test("published cable product source matches its measured skill manifest and off assert.equal(reproduced.exact_trace_and_final_info_match, true); }); +test("published arm adapter binds exact source, contact outcomes and offline reproduction", async () => { + const root = resolve(ROOT, "topics/physical-grounding/runs/2026-10-07-skillspace-arm"); + const manifest = JSON.parse(await readFile(resolve(root, "release-v0/manifest.json"))); + const result = JSON.parse(gunzipSync(await readFile(resolve(root, "release-v0/run.json.gz")))); + assert.equal(manifest.scope, "simulation-only"); + assert.equal(manifest.physical_robot_ready, false); + assert.equal(manifest.source_has_robot_policy, false); + for (const [name, expected] of Object.entries(manifest.files)) { + const path = name.startsWith("simlab/") ? resolve(root, name) : name.startsWith("evidence/") ? resolve(root, "release-v0", name.slice(9)) : null; + if (!path || name === "evidence/run.json" || name === "README.md") continue; + assert.equal(createHash("sha256").update(await readFile(path)).digest("hex"), expected, name); + } + assert.equal(createHash("sha256").update(gunzipSync(await readFile(resolve(root, "release-v0/run.json.gz")))).digest("hex"), manifest.files["evidence/run.json"]); + assert.equal(result.skill.source_sha256, createHash("sha256").update(await readFile(resolve(root, "release-v0/source.json"))).digest("hex")); + assert.equal(result.summary.by_policy.placement.successes, 6); + assert.equal(result.summary.by_policy.idle.successes, 0); + assert.equal(result.summary.by_policy.replay_open_jaw.successes, 0); + assert.equal(new Set(result.episodes.map(e => e.scene_id)).size, 6); + for (const episode of result.episodes.filter(e => e.policy === "placement")) { + assert.equal(episode.final_info.success, true); + assert.equal(episode.final_info.grasp_seen, true); + assert.equal(episode.final_info.lift_seen, true); + assert.deepEqual(episode.final_info.warnings, []); + assert.equal(episode.final_info.grasp_contacts.left + episode.final_info.grasp_contacts.right, 0); + assert.ok(episode.final_info.table_contacts > 0); + assert.ok(episode.final_info.max_object_lift >= .055); + } + const offline = JSON.parse(await readFile(resolve(root, "native-offline/native-policy.json"))); + assert.equal(offline.passed, true); + assert.equal(offline.errno, 1); + const reproduced = JSON.parse(await readFile(resolve(root, "release-v0/reproduction.json"))); + assert.equal(reproduced.source_imported_from_extracted_bundle, true); + assert.equal(reproduced.exact_trace_actions_final_info_match, true); + for (const file of await files(root)) assert.ok((await stat(file)).size < 25 * 1024 * 1024, file); +}); + test("generated publication output is deterministic and excludes local session data", async () => { const snapshot = async () => { const paths = (await files(DOCS)).filter(path => /\/(?:papers|topics|downloads)\//.test(path) || /\/(?:index\.html|publications\.json|feed\.xml|sitemap\.xml|robots\.txt)$/.test(path)); diff --git a/topics/physical-grounding/README.md b/topics/physical-grounding/README.md index e0f6b0b..ab60ff1 100644 --- a/topics/physical-grounding/README.md +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/ARM_RESEARCH.md b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/ARM_RESEARCH.md new file mode 100644 index 0000000..6af9f91 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/PRODUCT.md new file mode 100644 index 0000000..a322e53 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/examples/arm_place_skillspace.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/examples/arm_place_skillspace.json new file mode 100644 index 0000000..f5dca23 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/native-policy.json new file mode 100644 index 0000000..370b389 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/replay.html b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/replay.html new file mode 100644 index 0000000..690db8b --- /dev/null +++ b/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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/run.json.gz b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/run.json.gz new file mode 100644 index 0000000..85b3823 Binary files /dev/null and b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/native-offline/run.json.gz differ diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml new file mode 100644 index 0000000..4ae18f4 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "dvidia-simlab" +version = "0.2.0" +description = "Offline simulation tasks, measured rollouts and simulation-only skill packs" +license = {text = "MIT"} +requires-python = ">=3.12" +dependencies = ["mujoco==3.15.0", "numpy==2.5.3"] + +[project.scripts] +dvidia-simlab = "simlab.cli:main" +dvidia-skill-lab = "simlab.studio:main" +dvidia-arm = "simlab.arm_runner:main" + +[tool.setuptools.packages.find] +include = ["simlab*"] + +[tool.setuptools.package-data] +simlab = ["requirements.lock.txt", "LICENSE", "studio.html", "place_cup.skill.json"] diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json new file mode 100644 index 0000000..85d1ca5 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/grounding.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_type": "place_cup", + "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": [ + "Set a cup on the mark." + ], + "workspace": { + "min": [ + 0.25, + -0.2, + 0.29 + ], + "max": [ + 0.6, + 0.2, + 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.1, + 0.31 + ], + "position_tolerance": 0.025, + "dwell_seconds": 0.25 + }, + "procedure": [ + "approach", + "descend", + "close", + "lift", + "transfer", + "place", + "release", + "retreat", + "verify" + ] +} diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json new file mode 100644 index 0000000..7b1cd96 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/manifest.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "task": "ArmPickPlace-v0", + "scope": "simulation-only", + "status": "authored_adapter_with_recorded_simulation_evidence", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "source_has_robot_policy": false, + "physical_robot_ready": false, + "summary": { + "successes": 6, + "episodes": 18, + "simulated_seconds": 289.89999999997985, + "episode_wall_seconds": 13.607119331369177, + "by_policy": { + "placement": { + "successes": 6, + "episodes": 6, + "simulated_seconds": 73.89999999999168, + "episode_wall_seconds": 3.91412145702634 + }, + "idle": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.776218706043437 + }, + "replay_open_jaw": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.916779168299399 + } + } + }, + "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." + ], + "files": { + "README.md": "52834d6a7ce417879f1c924b5792a19bf4cca7575d75923d6e238c56e676c96d", + "evidence/grounding.json": "1a5956173cefe659559fb0e273ebb2071a6fcbe7a64792075750221927fde892", + "evidence/run.json": "f48888ce02eb09b5f2c7747bd77d26b4a88ce7050cc39269479d67735f6727c8", + "evidence/source.json": "16b4e1ef0f3799345c1d18ce9f1da83b072863ab00ce30a83424080fb467d4ec", + "requirements.lock.txt": "5a435f5b6e4ebcdb78fa12ec223b9c09d972daca6008700e854255664f6fb2a4", + "simlab/LICENSE": "ab47d245880a661fdca3c6a4cb91671031302deee50d64f8d2d6df86832962e1", + "simlab/__init__.py": "e710fdac4ab49a1ccea99179928b827a2d1cfde23d230dcfeb9e48a2cd258c14", + "simlab/__main__.py": "6d8b7d7846a845059d7a3107143f11131f63c5511d669b44085b15ec5e3d2279", + "simlab/arm_env.py": "395d9b7ab2fc09458081d8fae162ec701adcd8b944e65a171c7184deb45e5fb3", + "simlab/arm_native_offline_check.py": "37ec414189bd1c379eeaa8c444667739fe97dcdc0a6677e4e58bf9cbde942275", + "simlab/arm_pack.py": "350964fe0636d7e07cbc50441bd70c233cdd57f8b2ad8876dd01f74ce2f11241", + "simlab/arm_policy.py": "6cb7d9644b6eda2f79e4253a37fe33b5942f736ca341756fb8b968dfb0a255b2", + "simlab/arm_qualify.py": "e89dffc46994a5b9c41c30f76d295910ef3e15a361bdd67ec8fcbfeb02d5382f", + "simlab/arm_runner.py": "db5d65883126ae9318d4c8ea541e14dc1ac7f5d9d8c756b05fb783a4fcb202f4", + "simlab/cli.py": "f2b82eb89d617fd8033de44248b138b9166d2f10600484aeae8225332fbd4ccb", + "simlab/env.py": "929c1d8c3c4cafe0054c633ee5f3e51c551dd6b26ae014ab1ea9219b58eca8e4", + "simlab/installer.py": "f590898da30a96af15d9da792d6631a1fa73af832a8dc3fba10bdff2c7d8fb10", + "simlab/native_offline_check.py": "f550f650a1e7fdaeff38c0aec07782df7cf456e20663c7fba6cede8510e9120e", + "simlab/pack.py": "885e973907499a505fef4d28ac6bb5eb2b2dbba498efc94d9e6c8125b9bd52f9", + "simlab/place_cup.skill.json": "23f27bea18abdf54ffd8a123fc099036ab7ee81fcd44714c894f5d1b12720a15", + "simlab/policies.py": "f52071d8af4ffa215c0c5ac57a7591e12e9e17b834b4bfb2a1705e7e0a7f5154", + "simlab/qualify.py": "2f9566f9c550723cbf96342e075e68dc291446c4fbd3935cec9d333371ab1457", + "simlab/requirements.lock.txt": "5a435f5b6e4ebcdb78fa12ec223b9c09d972daca6008700e854255664f6fb2a4", + "simlab/skillspace.py": "34b651609358ae9a58b9a610545ce7b85b83fb3d6c699613414ff8e0ea457b3c", + "simlab/studio.html": "ac10f95d610bf8816cb1760b09a77295f56a1566c8e169dc79a91efd5dcffd12", + "simlab/studio.py": "d0ed528c5d69e8aa319d2f850c3310814342cd46622aa063c3b2043b14a45c83", + "simlab/viewer.py": "2fc396aaace350c0fa795fdd907dff96179fcb919116d3d5f1a7b3fa9392376d" + } +} diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json new file mode 100644 index 0000000..9457d70 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/metrics.json @@ -0,0 +1,3129 @@ +{ + "task": "ArmPickPlace-v0", + "scope": "simulation-only", + "hardware": { + "system": "Darwin", + "machine": "arm64", + "python": "3.12.9", + "mujoco": "3.15.0", + "numpy": "2.5.3" + }, + "summary": { + "successes": 6, + "episodes": 18, + "simulated_seconds": 289.89999999997985, + "episode_wall_seconds": 13.607119331369177, + "by_policy": { + "placement": { + "successes": 6, + "episodes": 6, + "simulated_seconds": 73.89999999999168, + "episode_wall_seconds": 3.91412145702634 + }, + "idle": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.776218706043437 + }, + "replay_open_jaw": { + "successes": 0, + "episodes": 6, + "simulated_seconds": 107.99999999999409, + "episode_wall_seconds": 4.916779168299399 + } + } + }, + "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.", + "protocol": { + "name": "frozen-six-layout-placement-v0", + "seeds": [ + 400, + 401, + 402, + 403, + 404, + 405 + ], + "scenes": [ + { + "id": "default", + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ] + }, + { + "id": "cross_right", + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ] + }, + { + "id": "cross_left", + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ] + }, + { + "id": "forward", + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ] + }, + { + "id": "reverse", + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ] + }, + { + "id": "wide", + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ] + } + ], + "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." + }, + "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." + ], + "episodes": [ + { + "seed": 400, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0002862948097583906, + "simulated_seconds": 11.309999999999171, + "episode_wall_seconds": 0.642286124988459, + "setup_seconds": 0.014417625032365322, + "control_latency_p50_seconds": 0.001080208458006382, + "control_latency_p95_seconds": 0.0015997602604329586, + "simulated_seconds_per_wall_second": 17.608974505252462, + "control_steps": 566, + "reward": 1.1841045919207631, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.309999999999171, + "steps": 566, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12888431537193734, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6113886813382758, + "target_distance": 0.0002862948097583906, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 400, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.18439088673452475, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.928927208064124, + "setup_seconds": 0.007484375033527613, + "control_latency_p50_seconds": 0.0009191670105792582, + "control_latency_p95_seconds": 0.0015534496807958925, + "simulated_seconds_per_wall_second": 19.377191069159075, + "control_steps": 900, + "reward": -4.003380960071468e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673452475, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 400, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.18439088673440412, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8634222920518368, + "setup_seconds": 0.005889708991162479, + "control_latency_p50_seconds": 0.0009115415159612894, + "control_latency_p95_seconds": 0.001161949709057808, + "simulated_seconds_per_wall_second": 20.847272725868375, + "control_steps": 900, + "reward": -3.882755228445944e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673052137, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 400, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.18439088673440412, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.4200000002042822, + -0.03999999673455797, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.42, + -0.04, + 0.31 + ], + "target_position": [ + 0.54, + 0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2fbdf0f987f862da58495b0aef594eac8c03c601a2d9490643b23b80fe89ad41" + }, + "scene_id": "default" + }, + { + "seed": 401, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0004001095323778411, + "simulated_seconds": 13.355999999998037, + "episode_wall_seconds": 0.738930291030556, + "setup_seconds": 0.006179833086207509, + "control_latency_p50_seconds": 0.0010702084982767701, + "control_latency_p95_seconds": 0.0014304771786555646, + "simulated_seconds_per_wall_second": 18.074776690194913, + "control_steps": 668, + "reward": 1.227634978082459, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 13.355999999998037, + "steps": 668, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12815347400938681, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6074140054963362, + "target_distance": 0.0004001095323778411, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 401, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2280350876204795, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7713305830257013, + "setup_seconds": 0.005402500042691827, + "control_latency_p50_seconds": 0.0008317704778164625, + "control_latency_p95_seconds": 0.000980684772366658, + "simulated_seconds_per_wall_second": 23.336297556607114, + "control_steps": 900, + "reward": -5.642736278232974e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2280350876204795, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 401, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.22803508762038868, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8249195840908214, + "setup_seconds": 0.004946542088873684, + "control_latency_p50_seconds": 0.0008586039766669273, + "control_latency_p95_seconds": 0.0011958705261349675, + "simulated_seconds_per_wall_second": 21.820308727228937, + "control_steps": 900, + "reward": -5.551920034818636e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508761483676, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 401, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22803508762038868, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.38000000018374086, + 0.09000000322870635, + 0.30999147829693885 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.38, + 0.09, + 0.31 + ], + "target_position": [ + 0.52, + -0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "06a2639116798aecb2ebfb8b52c873690bcbd1bebc8e6d0e404d9e6f0b3c8b57" + }, + "scene_id": "cross_right" + }, + { + "seed": 402, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.00035282827156375165, + "simulated_seconds": 11.333999999999158, + "episode_wall_seconds": 0.5672361659817398, + "setup_seconds": 0.005027625011280179, + "control_latency_p50_seconds": 0.001027792110107839, + "control_latency_p95_seconds": 0.0011855499469675124, + "simulated_seconds_per_wall_second": 19.981095493766553, + "control_steps": 567, + "reward": 1.2367125667701417, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.333999999999158, + "steps": 567, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.124081266864903, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6106354897624153, + "target_distance": 0.00035282827156375165, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 402, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2370653950366419, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7535420410567895, + "setup_seconds": 0.004998874966986477, + "control_latency_p50_seconds": 0.0008035204955376685, + "control_latency_p95_seconds": 0.000988022272940725, + "simulated_seconds_per_wall_second": 23.887187468339906, + "control_steps": 900, + "reward": 5.063727215315339e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2370653950366419, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 402, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.23706539503680316, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7642012090655044, + "setup_seconds": 0.00494783406611532, + "control_latency_p50_seconds": 0.0008183330064639449, + "control_latency_p95_seconds": 0.0009806024143472311, + "simulated_seconds_per_wall_second": 23.554006178569296, + "control_steps": 900, + "reward": 4.902467320988535e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539504170562, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 402, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 1.6653345369377348e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.23706539503680316, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.48000000015500166, + -0.12000000337990512, + 0.3099914782969389 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.48, + -0.12, + 0.31 + ], + "target_position": [ + 0.37, + 0.09, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "2c176a162a3ac0a472f3d4d7c1618b64e936adefbc1700d807dbac0b289d3409" + }, + "scene_id": "cross_left" + }, + { + "seed": 403, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.000329102764761287, + "simulated_seconds": 11.590999999999015, + "episode_wall_seconds": 0.6161619999911636, + "setup_seconds": 0.0052045839838683605, + "control_latency_p50_seconds": 0.0010288340272381902, + "control_latency_p95_seconds": 0.0012569641636218873, + "simulated_seconds_per_wall_second": 18.811611232379214, + "control_steps": 580, + "reward": 1.2480657465069822, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 11.590999999999015, + "steps": 580, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12896120822561669, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6279205591518218, + "target_distance": 0.000329102764761287, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 403, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.2483948492778613, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7823899579234421, + "setup_seconds": 0.00494079093914479, + "control_latency_p50_seconds": 0.0008280210313387215, + "control_latency_p95_seconds": 0.0011099458555690943, + "simulated_seconds_per_wall_second": 23.0064302560493, + "control_steps": 900, + "reward": -6.117939488348156e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.2483948492778613, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 403, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.24839484927786165, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8182696660514921, + "setup_seconds": 0.004890291020274162, + "control_latency_p50_seconds": 0.0008616044651716948, + "control_latency_p95_seconds": 0.0011869964306242763, + "simulated_seconds_per_wall_second": 21.99763812198595, + "control_steps": 900, + "reward": -6.1183003108311595e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927174335, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 403, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.24839484927786165, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.35000000015411553, + -0.08000000353336417, + 0.30999147829693857 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.35, + -0.08, + 0.31 + ], + "target_position": [ + 0.54, + 0.08, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "72aa0e27419ec0f9ceadc07a2859b109808c36d81b64e71960e391bc7d0e38c1" + }, + "scene_id": "forward" + }, + { + "seed": 404, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.0003297844138246607, + "simulated_seconds": 13.593999999997905, + "episode_wall_seconds": 0.6844325410202146, + "setup_seconds": 0.005055165966041386, + "control_latency_p50_seconds": 0.000948166532907635, + "control_latency_p95_seconds": 0.0012114014243707056, + "simulated_seconds_per_wall_second": 19.861709058623514, + "control_steps": 680, + "reward": 1.2232770114113305, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 13.593999999997905, + "steps": 680, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12465005382416378, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.6003089213633297, + "target_distance": 0.0003297844138246607, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 404, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.22360679582933574, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.79080008296296, + "setup_seconds": 0.004971624934114516, + "control_latency_p50_seconds": 0.0008094789809547365, + "control_latency_p95_seconds": 0.0010557247092947363, + "simulated_seconds_per_wall_second": 22.761757854851048, + "control_steps": 900, + "reward": -4.180683577104105e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 4.440892098500626e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582933574, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 404, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.22360679582898266, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7739569590194151, + "setup_seconds": 0.005098458961583674, + "control_latency_p50_seconds": 0.0008174580289050937, + "control_latency_p95_seconds": 0.001071626809425652, + "simulated_seconds_per_wall_second": 23.257107246383036, + "control_steps": 900, + "reward": -3.82760489969769e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582515505, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 404, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.22360679582898266, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.46000000044592976, + 0.09999999744346799, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.46, + 0.1, + 0.31 + ], + "target_position": [ + 0.36, + -0.1, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "6702b32f6125fcdbe65cabfaa47951404f3694f83b53d46f546e0832d142e2df" + }, + "scene_id": "reverse" + }, + { + "seed": 405, + "policy": "placement", + "success": true, + "reason": "success", + "final_distance": 0.00043674634503465114, + "simulated_seconds": 12.714999999998392, + "episode_wall_seconds": 0.6650743340142071, + "setup_seconds": 0.0051423750119283795, + "control_latency_p50_seconds": 0.0010449375258758664, + "control_latency_p95_seconds": 0.0013206767907831818, + "simulated_seconds_per_wall_second": 19.118163714504096, + "control_steps": 636, + "reward": 1.385438879388436, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "success", + "success": true, + "valid": true, + "simulation_time": 12.714999999998392, + "steps": 636, + "dwell_elapsed": 0.25000000000000017, + "grasp_seen": true, + "lift_seen": true, + "max_object_lift": 0.12773119946639627, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 1.602003343787234, + "target_distance": 0.00043674634503465114, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + }, + { + "seed": 405, + "policy": "idle", + "success": false, + "reason": "horizon", + "final_distance": 0.385875625729108, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.7492288330104202, + "setup_seconds": 0.004885416012257338, + "control_latency_p50_seconds": 0.0007987499702721834, + "control_latency_p95_seconds": 0.0009575083386152982, + "simulated_seconds_per_wall_second": 24.02470274358578, + "control_steps": 900, + "reward": 4.362676886415784e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 3.3306690738754696e-16, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.385875625729108, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + }, + { + "seed": 405, + "policy": "replay_open_jaw", + "success": false, + "reason": "horizon", + "final_distance": 0.38587562572902734, + "simulated_seconds": 17.999999999999016, + "episode_wall_seconds": 0.8720094580203295, + "setup_seconds": 0.004923583008348942, + "control_latency_p50_seconds": 0.0008870000019669533, + "control_latency_p95_seconds": 0.0011872020841110493, + "simulated_seconds_per_wall_second": 20.641977944669694, + "control_steps": 900, + "reward": 4.4433345891548015e-12, + "reset_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "running", + "success": false, + "valid": true, + "simulation_time": 0.0, + "steps": 0, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.3858756257334707, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "final_info": { + "task_id": "ArmPickPlace-v0", + "arm_profile": "dvidia-authored-6dof-parallel-jaw-v0", + "adapter_id": "contact-pick-place-box-v0", + "seed": 405, + "reason": "horizon", + "success": false, + "valid": true, + "simulation_time": 17.999999999999016, + "steps": 900, + "dwell_elapsed": 0.0, + "grasp_seen": false, + "lift_seen": false, + "max_object_lift": 0.0, + "grasp_contacts": { + "left": 0, + "right": 0 + }, + "pad_normal_forces": { + "left": 0.0, + "right": 0.0 + }, + "table_contacts": 4, + "max_pad_normal_force": 0.0, + "target_distance": 0.38587562572902734, + "warnings": [], + "lift_dwell_elapsed": 0.0, + "effective_sliding_friction": { + "jaw_object": 1.0, + "table_object": 0.8, + "mixing": "maximum at equal geom priority" + }, + "initial_object_position": [ + 0.30000000276319727, + -0.14999999934523794, + 0.3099914782969386 + ], + "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": { + "timestep": 0.001, + "control_dt": 0.02, + "horizon": 18.0, + "settle_time": 0.4, + "object_position": [ + 0.3, + -0.15, + 0.31 + ], + "target_position": [ + 0.5, + 0.18, + 0.31 + ], + "object_half_size": [ + 0.02, + 0.02, + 0.02 + ], + "object_mass": 0.04, + "object_friction": 0.8, + "table_height": 0.29, + "position_tolerance": 0.025, + "dwell_seconds": 0.25, + "scene_jitter": 0, + "joint_torque_limit": 40.0, + "jaw_force_limit": 15.0, + "gravity": 9.81 + }, + "engine": "3.15.0", + "scene_sha256": "82cb4dcaf9b6ba951c86516cb978fbe7c3a50cfb2ecfb03e7b1b40a68cff9945" + }, + "scene_id": "wide" + } + ] +} diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.html new file mode 100644 index 0000000..94a1ab7 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/replay.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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/reproduction.json new file mode 100644 index 0000000..77c970d --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/run.json.gz differ diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/skill-adapter.zip differ diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/source.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/release-v0/source.json new file mode 100644 index 0000000..836c0db --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/requirements.lock.txt b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/requirements.lock.txt new file mode 100644 index 0000000..4e02498 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/LICENSE b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/LICENSE new file mode 100644 index 0000000..a7056f2 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__init__.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__init__.py new file mode 100644 index 0000000..774bf4c --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py new file mode 100644 index 0000000..4e28416 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/__main__.py @@ -0,0 +1,3 @@ +from .cli import main + +main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_env.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_env.py new file mode 100644 index 0000000..aacc09d --- /dev/null +++ b/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'''''' + + 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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_native_offline_check.py b/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/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_pack.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_pack.py new file mode 100644 index 0000000..8cd75de --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_policy.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_policy.py new file mode 100644 index 0000000..5a1221b --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_qualify.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_qualify.py new file mode 100644 index 0000000..e2c1669 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_runner.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/arm_runner.py new file mode 100644 index 0000000..0f57cf4 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/cli.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/cli.py new file mode 100644 index 0000000..ffaa932 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/env.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/env.py new file mode 100644 index 0000000..25f257d --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/installer.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/installer.py new file mode 100644 index 0000000..9fd3167 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/native_offline_check.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/native_offline_check.py new file mode 100644 index 0000000..c88f5fb --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/pack.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/pack.py new file mode 100644 index 0000000..470734a --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/place_cup.skill.json b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/place_cup.skill.json new file mode 100644 index 0000000..8988249 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/policies.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/policies.py new file mode 100644 index 0000000..23e066f --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/qualify.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/qualify.py new file mode 100644 index 0000000..ef5809a --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/requirements.lock.txt b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/requirements.lock.txt new file mode 100644 index 0000000..4e02498 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/skillspace.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/skillspace.py new file mode 100644 index 0000000..579b9b6 --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.html b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.html new file mode 100644 index 0000000..7d7c5e2 --- /dev/null +++ b/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.

6 joints / parallel jaws
+
objecttargetdrag to orbit
Preparing environment…0.00 s
+ +
Task outcome—
Object to target—
Simulation / wall—
Execution time—
+

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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/studio.py new file mode 100644 index 0000000..106467a --- /dev/null +++ b/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/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/viewer.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/simlab/viewer.py new file mode 100644 index 0000000..2368ac3 --- /dev/null +++ b/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.

+ +
+''' diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py new file mode 100644 index 0000000..e92c45d --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/__init__.py @@ -0,0 +1 @@ +"""Behavioral checks for the offline simulation lab.""" diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py new file mode 100644 index 0000000..e86b4aa --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_env.py @@ -0,0 +1,167 @@ +"""Native contact qualification of the authored arm placement adapter.""" +import copy +from dataclasses import replace +import unittest + +import mujoco +import numpy as np + +from simlab.arm_env import ArmConfig, ArmEnv, JOINT_LIMITS +from simlab.arm_policy import ArmPickPlacePolicy + + +def execute(env, policy): + observation, info = env.reset(seed=0) + records = [] + while True: + action = policy(observation) + observation, _, done, truncated, info = env.step(action) + records.append((copy.deepcopy(action), observation, info, policy.stage, env.data.actuator_force.copy())) + if done or truncated: + return records + + +class ArmContactTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.success_env = ArmEnv() + cls.records = execute(cls.success_env, ArmPickPlacePolicy(cls.success_env)) + + def test_native_model_has_six_hinges_free_object_and_bounded_jaw_servos(self): + env = self.success_env + self.assertEqual(env.model.nmocap, 0) + self.assertEqual(env.model.neq, 0) + self.assertEqual(len(env.joint_ids), 6) + self.assertTrue(np.all(env.model.jnt_type[env.joint_ids] == mujoco.mjtJoint.mjJNT_HINGE)) + object_joint = mujoco.mj_name2id(env.model, mujoco.mjtObj.mjOBJ_JOINT, "object_free") + self.assertEqual(env.model.jnt_type[object_joint], mujoco.mjtJoint.mjJNT_FREE) + self.assertTrue(env.model.actuator_forcelimited.all()) + for _, _, _, _, forces in self.records: + self.assertLessEqual(float(np.abs(forces[:6]).max()), env.config.joint_torque_limit + 1e-9) + self.assertLessEqual(float(np.abs(forces[6:]).max()), env.config.jaw_force_limit + 1e-9) + self.assertTrue(np.all(env.data.xfrc_applied[env.object_id] == 0)) + + def test_contact_pick_lift_release_and_settled_target_dwell(self): + _, observation, info, stage, _ = self.records[-1] + self.assertTrue(info["success"]) + self.assertTrue(info["valid"]) + self.assertEqual(info["warnings"], []) + self.assertTrue(info["grasp_seen"] and info["lift_seen"]) + self.assertGreater(info["max_object_lift"], .10) + self.assertGreater(observation["gripper_width"], .065) + self.assertEqual(observation["grasp_contacts"], {"left": 0, "right": 0}) + self.assertGreater(observation["table_contacts"], 0) + self.assertGreaterEqual(observation["end_effector_position"][2], observation["object_position"][2] + .10) + self.assertLess(np.linalg.norm(observation["object_velocity"]), .035) + self.assertLess(np.linalg.norm(observation["object_angular_velocity"]), .3) + self.assertLess(info["target_distance"], self.success_env.config.position_tolerance) + self.assertGreaterEqual(info["dwell_elapsed"] + 1e-12, self.success_env.config.dwell_seconds) + self.assertEqual(stage, "verify") + # Being inside the goal while still gripped cannot complete placement. + gripped_at_goal = [entry for entry in self.records if entry[2]["target_distance"] < self.success_env.config.position_tolerance + and entry[1]["grasp_contacts"]["left"] > 0 and entry[1]["grasp_contacts"]["right"] > 0] + self.assertTrue(gripped_at_goal) + self.assertTrue(all(not entry[2]["success"] for entry in gripped_at_goal)) + + def test_identical_arm_action_tape_with_open_jaws_cannot_pick_up_object(self): + env = ArmEnv() + _, info = env.reset(seed=0) + for recorded_action, *_ in self.records: + action = {"joint_targets": recorded_action["joint_targets"], "gripper_width": .08} + _, _, done, truncated, info = env.step(action) + if done or truncated: + break + self.assertFalse(info["success"]) + self.assertFalse(info["grasp_seen"]) + self.assertFalse(info["lift_seen"]) + self.assertLess(info["max_object_lift"], .002) + self.assertGreater(info["target_distance"], env.config.position_tolerance) + + def test_opening_jaws_after_lift_loses_object_retention(self): + env = ArmEnv() + observation, info = env.reset(seed=0) + released = False + for recorded_action, *_ in self.records: + if info["lift_seen"]: + released = True + action = copy.deepcopy(recorded_action) + if released: + action["gripper_width"] = .08 + observation, _, done, truncated, info = env.step(action) + if done or truncated: + break + self.assertTrue(released) + self.assertGreater(info["max_object_lift"], .055) + self.assertFalse(info["success"]) + self.assertAlmostEqual(observation["object_position"][2], env.config.table_height + env.config.object_half_size[2], delta=.002) + self.assertEqual(observation["grasp_contacts"], {"left": 0, "right": 0}) + self.assertGreater(info["target_distance"], env.config.position_tolerance) + + def test_same_adapter_executes_a_changed_valid_scene(self): + config = replace(ArmConfig(), object_position=(.38, -.08, .31), target_position=(.48, .14, .31), scene_jitter=0) + env = ArmEnv(config) + records = execute(env, ArmPickPlacePolicy(env)) + observation, info = records[-1][1:3] + self.assertTrue(info["success"], info["reason"]) + np.testing.assert_allclose(observation["target_position"], [.48, .14, .31], atol=0, rtol=0) + self.assertLess(info["target_distance"], config.position_tolerance) + + def test_seeded_initial_state_and_native_steps_are_deterministic(self): + first, second = ArmEnv(), ArmEnv() + obs1, _ = first.reset(seed=3) + obs2, _ = second.reset(seed=3) + np.testing.assert_allclose(obs1["object_position"], obs2["object_position"], atol=0, rtol=0) + policy = ArmPickPlacePolicy(first) + for _ in range(12): + action = policy(obs1) + obs1, reward1, done1, truncated1, info1 = first.step(action) + obs2, reward2, done2, truncated2, info2 = second.step(action) + for key in ("joint_position", "end_effector_position", "object_position", "object_quaternion", "arm_points", "gripper_points"): + np.testing.assert_allclose(obs1[key], obs2[key], atol=1e-12, rtol=0) + self.assertEqual((reward1, done1, truncated1, info1["reason"]), (reward2, done2, truncated2, info2["reason"])) + + def test_invalid_action_is_rejected_before_native_state_changes(self): + env = ArmEnv() + env.reset(seed=0) + valid = {"joint_targets": list(env.data.qpos[env.joint_qpos]), "gripper_width": .08} + invalid = [dict(valid, gripper_width=.09), dict(valid, joint_targets=[0]*5), dict(valid, joint_targets=[float('nan')]*6), + dict(valid, joint_targets=[JOINT_LIMITS[0][1]+.01]+valid["joint_targets"][1:])] + for action in invalid: + with self.subTest(action=action): + before = env.data.qpos.copy(), env.data.qvel.copy(), env.data.ctrl.copy(), float(env.data.time) + with self.assertRaises(ValueError): + env.step(action) + np.testing.assert_array_equal(env.data.qpos, before[0]) + np.testing.assert_array_equal(env.data.qvel, before[1]) + np.testing.assert_array_equal(env.data.ctrl, before[2]) + self.assertEqual(env.data.time, before[3]) + + def test_unreachable_layouts_and_rejected_reset_cannot_execute(self): + for target in ((2., 0., .31), (.60, .20, .31), (.54, .10, .60)): + with self.subTest(target=target): + with self.assertRaises(ValueError): + replace(ArmConfig(), target_position=target) + env = ArmEnv() + env.reset(seed=0) + with self.assertRaises(ValueError): + env.reset(seed=0, target_position=(3., 0., .31)) + with self.assertRaises(RuntimeError): + env.step({"joint_targets": [0]*6, "gripper_width": .08}) + + def test_motion_free_open_jaw_baseline_does_not_report_success(self): + env = ArmEnv(replace(ArmConfig(), horizon=.8)) + obs, _ = env.reset(seed=0) + action = {"joint_targets": obs["joint_position"], "gripper_width": .08} + for _ in range(40): + _, _, done, truncated, info = env.step(action) + self.assertFalse(info["success"]) + if done or truncated: + break + self.assertFalse(done) + self.assertTrue(truncated) + self.assertEqual(info["reason"], "horizon") + self.assertFalse(info["grasp_seen"] or info["lift_seen"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py new file mode 100644 index 0000000..ce69e5c --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_arm_pack.py @@ -0,0 +1,204 @@ +"""Integrity and scope checks for inert, inspectable simulation adapter bundles.""" +import copy +from hashlib import sha256 +import json +from pathlib import Path +import re +import tempfile +import unittest +from zipfile import ZipFile, ZIP_DEFLATED + +from simlab.arm_pack import export_arm_pack, verify_arm_pack +from simlab.arm_runner import authored_grounding +from simlab.skillspace import load_skillspace + + +def encoded(value): + return (json.dumps(value, indent=2, allow_nan=False) + '\n').encode() + + +def archive_files(path): + with ZipFile(path) as archive: + return {name: archive.read(name) for name in archive.namelist()} + + +def rewrite_archive(path, files): + with ZipFile(path, 'w', ZIP_DEFLATED) as archive: + for name, data in files.items(): + archive.writestr(name, data) + + +def update_evidence(files, payload, manifest): + files['evidence/run.json'] = encoded(payload) + manifest['files']['evidence/run.json'] = sha256(files['evidence/run.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + + +class ArmPackTests(unittest.TestCase): + def fixture(self, directory): + directory = Path(directory) + source = Path(__file__).resolve().parents[1].joinpath('simlab/place_cup.skill.json').read_bytes() + grounding = authored_grounding(source) + skill = load_skillspace(source, grounding).to_dict() + # Deliberately synthetic pack-verification fixture. Native physics and + # recorded qualification are tested separately; no run is claimed here. + episodes = [{'seed': 100, 'policy': 'placement', 'success': True, 'reason': 'success', + 'simulated_seconds': 1.0, 'episode_wall_seconds': .1}, + {'seed': 100, 'policy': 'idle', 'success': False, 'reason': 'horizon', + 'simulated_seconds': 2.0, 'episode_wall_seconds': .2}] + summary = {'successes': 1, 'episodes': 2, 'simulated_seconds': 3.0, 'episode_wall_seconds': .3, + 'by_policy': {'placement': {'successes': 1, 'episodes': 1, 'simulated_seconds': 1.0, 'episode_wall_seconds': .1}, + 'idle': {'successes': 0, 'episodes': 1, 'simulated_seconds': 2.0, 'episode_wall_seconds': .2}}} + payload = {'schema_version': 1, 'task': 'ArmPickPlace-v0', 'scope': 'simulation-only', + 'skill': skill, 'summary': summary, 'episodes': episodes, + 'limitations': ['Synthetic test fixture; no physical or learned robot policy.']} + (directory / 'source.json').write_bytes(source) + (directory / 'grounding.json').write_bytes(encoded(grounding)) + (directory / 'run.json').write_bytes(encoded(payload)) + export_arm_pack(directory) + return directory / 'skill-adapter.zip' + + def test_bundle_preserves_explicit_scope_source_and_qualification(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + manifest = verify_arm_pack(path) + self.assertEqual(manifest['task'], 'ArmPickPlace-v0') + self.assertEqual(manifest['scope'], 'simulation-only') + self.assertIs(manifest['physical_robot_ready'], False) + self.assertIs(manifest['source_has_robot_policy'], False) + self.assertEqual(manifest['summary']['successes'], 1) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + self.assertEqual(payload['skill']['source_sha256'], sha256(files['evidence/source.json']).hexdigest()) + self.assertEqual(manifest['limitations'], payload['limitations']) + + def test_modified_source_code_fails_content_integrity(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + files['simlab/arm_policy.py'] += b'\n# Changed after export\n' + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_source_identity_remains_bound_after_a_file_hash_is_replaced(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + files['evidence/source.json'] += b' ' + manifest = json.loads(files['manifest.json']) + manifest['files']['evidence/source.json'] = sha256(files['evidence/source.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_grounding_identity_cannot_change_under_recorded_evidence(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + grounding = json.loads(files['evidence/grounding.json']) + grounding['object']['mass'] = .06 + files['evidence/grounding.json'] = encoded(grounding) + manifest = json.loads(files['manifest.json']) + manifest['files']['evidence/grounding.json'] = sha256(files['evidence/grounding.json']).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_summary_counts_cannot_disagree_with_episode_evidence(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload['summary']['successes'] = 2 + manifest['summary'] = copy.deepcopy(payload['summary']) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_policy_counts_cannot_credit_a_failed_negative_control(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + files = archive_files(path) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload['summary']['by_policy']['idle']['successes'] = 1 + manifest['summary'] = copy.deepcopy(payload['summary']) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_manifest_cannot_claim_physical_or_learned_policy_qualification(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for change in ({'scope': 'physical-ready'}, {'physical_robot_ready': True}, + {'source_has_robot_policy': True}, {'task': 'HardwarePickPlace-v1'}, + {'schema_version': 99}, {'arm_profile': 'unrelated-arm'}, + {'adapter_id': 'unrelated-controller'}): + with self.subTest(change=change): + files = copy.deepcopy(original) + manifest = json.loads(files['manifest.json']) + manifest.update(change) + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_run_scope_must_match_the_adapter_even_with_updated_hashes(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for change in ({'scope': 'physical-ready'}, {'task': 'DifferentTask-v0'}): + with self.subTest(change=change): + files = copy.deepcopy(original) + payload = json.loads(files['evidence/run.json']) + manifest = json.loads(files['manifest.json']) + payload.update(change) + update_evidence(files, payload, manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_portable_archive_paths_cannot_escape_an_extraction_directory(self): + with tempfile.TemporaryDirectory() as folder: + path = self.fixture(folder) + original = archive_files(path) + for name in ('/absolute.py', 'simlab/../../escape.py', 'C:/escape.py', 'simlab\\..\\escape.py'): + with self.subTest(name=name): + files = copy.deepcopy(original) + files[name] = b'# inert path fixture\n' + manifest = json.loads(files['manifest.json']) + manifest['files'][name] = sha256(files[name]).hexdigest() + files['manifest.json'] = encoded(manifest) + rewrite_archive(path, files) + with self.assertRaises(ValueError): + verify_arm_pack(path) + + def test_bundle_contains_runnable_sources_and_local_static_studio(self): + with tempfile.TemporaryDirectory() as folder: + files = archive_files(self.fixture(folder)) + required = ('simlab/__init__.py', 'simlab/arm_env.py', 'simlab/arm_policy.py', + 'simlab/arm_runner.py', 'simlab/arm_qualify.py', 'simlab/skillspace.py', + 'simlab/installer.py', 'simlab/studio.py', 'simlab/studio.html', + 'simlab/env.py', 'simlab/cli.py', 'simlab/LICENSE', 'requirements.lock.txt', + 'evidence/run.json', 'evidence/source.json', 'evidence/grounding.json') + for name in required: + self.assertIn(name, files) + self.assertGreater(len(files[name]), 0) + self.assertEqual(files['requirements.lock.txt'], files['simlab/requirements.lock.txt']) + studio = files['simlab/studio.html'].decode() + self.assertIn(']+src=') + self.assertNotRegex(studio, r']+href=["\']https?://') + self.assertNotRegex(studio, r'\b(?:eval|Function)\s*\(') + self.assertIn('Hashes check content integrity, not publisher identity', files['README.md'].decode()) + + +if __name__ == '__main__': + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py new file mode 100644 index 0000000..8eb7686 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_env.py @@ -0,0 +1,349 @@ +"""Tests of numerical continuation, actual goal conditions and failure semantics.""" +from __future__ import annotations + +import copy +from dataclasses import replace +import json +import math +from pathlib import Path +import re +import tempfile +import unittest + +import numpy as np + +from simlab.env import CableEndReachEnv, Config +from simlab.viewer import save_replay + + +def feedback(observation, limit): + """A bounded PD fixture, independent of the production policy module.""" + force = 10.0 * (np.asarray(observation["target"]) - observation["endpoint_position"]) + force -= 0.25 * np.asarray(observation["endpoint_velocity"]) + force[2] += 0.1 + norm = np.linalg.norm(force) + if norm > limit: + force *= limit / norm + return force.tolist() + + +class CableEndReachTests(unittest.TestCase): + def assertObservationEqual(self, first, second): + self.assertEqual(set(first), set(second)) + for key in first: + np.testing.assert_allclose(first[key], second[key], rtol=0, atol=1e-11, err_msg=key) + + def assertFiniteObservation(self, observation): + for values in observation.values(): + self.assertTrue(np.isfinite(np.asarray(values)).all()) + + def test_seeded_reset_and_control_are_deterministic(self): + first, second = CableEndReachEnv(), CableEndReachEnv() + obs1, info1 = first.reset(seed=7) + obs2, info2 = second.reset(seed=7) + self.assertObservationEqual(obs1, obs2) + self.assertEqual(info1["scene_hash"], info2["scene_hash"]) + self.assertEqual(info1["parameters"], info2["parameters"]) + for _ in range(12): + force = [0.12, -0.03, 0.06] + obs1, reward1, done1, trunc1, info1 = first.step(force) + obs2, reward2, done2, trunc2, info2 = second.step(force) + self.assertObservationEqual(obs1, obs2) + self.assertEqual((reward1, done1, trunc1), (reward2, done2, trunc2)) + self.assertEqual(info1["reason"], info2["reason"]) + self.assertFiniteObservation(obs1) + self.assertAlmostEqual(info1["simulation_time"], 12 * first.config.control_dt, places=10) + + def test_seed_changes_the_authored_scene(self): + env = CableEndReachEnv() + _, first = env.reset(seed=3) + _, second = env.reset(seed=4) + self.assertNotEqual(first["scene_hash"], second["scene_hash"]) + self.assertNotEqual(first["parameters"], second["parameters"]) + + def test_json_snapshot_preserves_full_continuation(self): + original = CableEndReachEnv() + observation, _ = original.reset(seed=2) + for _ in range(9): + observation, _, done, truncated, _ = original.step(feedback(observation, original.config.force_limit)) + self.assertFalse(done or truncated) + # Serialization exercises the documented portable state, not an in-memory + # data-object alias or a saved qpos-only approximation. + saved = json.loads(json.dumps(original.snapshot(), allow_nan=False)) + restored = CableEndReachEnv() + self.assertObservationEqual(observation, restored.restore(saved)) + for _ in range(15): + action = feedback(observation, original.config.force_limit) + expected = original.step(action) + actual = restored.step(action) + self.assertObservationEqual(expected[0], actual[0]) + self.assertAlmostEqual(expected[1], actual[1], places=11) + self.assertEqual(expected[2:4], actual[2:4]) + for key in ("reason", "success", "valid", "steps", "contact_samples", "max_contact_count"): + self.assertEqual(expected[4][key], actual[4][key], key) + for key in ("simulation_time", "dwell_elapsed", "distance"): + self.assertAlmostEqual(expected[4][key], actual[4][key], places=11, msg=key) + observation = expected[0] + if expected[2] or expected[3]: + break + self.assertEqual(original.snapshot()["integration_state"], restored.snapshot()["integration_state"]) + + def test_snapshot_rejects_incompatible_or_nonfinite_state(self): + env = CableEndReachEnv() + env.reset(seed=0) + saved = env.snapshot() + incompatible = CableEndReachEnv(replace(Config(), force_limit=1.5)) + with self.assertRaises(ValueError): + incompatible.restore(saved) + invalid = copy.deepcopy(saved) + invalid["integration_state"][0] = math.nan + with self.assertRaises(ValueError): + CableEndReachEnv().restore(invalid) + mismatched = copy.deepcopy(saved) + mismatched["target"][0] += 0.1 + with self.assertRaises(ValueError): + CableEndReachEnv().restore(mismatched) + + def test_malformed_snapshot_cannot_forge_success_or_mutate_live_state(self): + env = CableEndReachEnv() + env.reset(seed=0) + env.step([0.1, 0.0, 0.03]) + original = env.snapshot() + corruptions = ({"elapsed": math.nan}, {"steps": -1}, {"dwell_elapsed": -0.1}, + {"terminated": True, "done": False, "reason": "success"}, + {"done": True, "terminated": True, "reason": "success", "dwell_elapsed": 0}, + {"last_action": [math.inf, 0, 0]}) + for corruption in corruptions: + with self.subTest(corruption=corruption): + malformed = copy.deepcopy(original) + malformed["episode"].update(corruption) + with self.assertRaises(ValueError): + env.restore(malformed) + self.assertEqual(original, env.snapshot()) + + def test_invalid_physics_returns_json_safe_failure_without_resumable_state(self): + for field in ("position", "clock"): + with self.subTest(field=field): + env = CableEndReachEnv() + env.reset(seed=0) + # Fault injection into native solver input exercises automatic + # reset/clock detection, without mocking a failure or reward. + if field == "position": + env.data.qpos[0] = math.nan + else: + env.data.time = math.nan + observation, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertFalse(info["success"]) + self.assertFalse(info["valid"]) + self.assertFalse(info["observations_available"]) + self.assertIsNone(info["distance"]) + self.assertEqual(observation["endpoint_position"], []) + self.assertEqual(observation["rope_points"], []) + self.assertEqual(reward, -1.0) + json.dumps({"observation": observation, "info": info, "reward": reward}, allow_nan=False) + with self.assertRaises(RuntimeError): + env.snapshot() + + def test_cable_centerline_preserves_authored_length_during_motion(self): + env = CableEndReachEnv() + observation, info = env.reset(seed=2) + authored_length = info["parameters"]["rope_length"] + for _ in range(25): + points = np.asarray(observation["rope_points"]) + arc_length = float(np.linalg.norm(np.diff(points, axis=0), axis=1).sum()) + # The elasticity plugin supplies bending/twist, not axial stretch. + # This checks the marker mapping and the fixed segment lengths. + self.assertAlmostEqual(arc_length, authored_length, delta=1e-7) + observation, _, done, truncated, info = env.step(feedback(observation, env.config.force_limit)) + self.assertTrue(info["valid"]) + if done or truncated: + break + + def test_refined_timestep_tracks_the_same_fixed_action_tape(self): + coarse = CableEndReachEnv() + fine = CableEndReachEnv(replace(Config(), timestep=0.0005)) + coarse_observation, _ = coarse.reset(seed=2) + fine_observation, _ = fine.reset(seed=2) + coarse_initial = np.asarray(coarse_observation["endpoint_position"]) + fine_initial = np.asarray(fine_observation["endpoint_position"]) + # Both settle independently. Their initial states and relative targets + # differ slightly; subtracting each initial point also checks displacement. + self.assertLess(np.linalg.norm(coarse_initial - fine_initial), 0.0001) + for _ in range(12): + action = feedback(coarse_observation, coarse.config.force_limit) + coarse_observation, _, done1, truncated1, info1 = coarse.step(action) + fine_observation, _, done2, truncated2, info2 = fine.step(action) + self.assertFalse(done1 or truncated1 or done2 or truncated2) + self.assertTrue(info1["valid"] and info2["valid"]) + coarse_endpoint = np.asarray(coarse_observation["endpoint_position"]) + fine_endpoint = np.asarray(fine_observation["endpoint_position"]) + self.assertLess(np.linalg.norm(coarse_endpoint - fine_endpoint), 0.002) + self.assertLess(np.linalg.norm((coarse_endpoint - coarse_initial) - (fine_endpoint - fine_initial)), 0.002) + # The 2 mm regression bound is 8% of the configured 25 mm target radius. + # A two-resolution comparison does not establish convergence or fidelity + # to physical cable dynamics. + + def test_success_requires_movement_and_actual_continuous_dwell(self): + env = CableEndReachEnv() + observation, info = env.reset(seed=0) + initial_distance = info["distance"] + self.assertGreater(initial_distance, env.config.tolerance) + self.assertFalse(info["success"]) + inside_before_success = False + for _ in range(round(env.config.horizon / env.config.control_dt)): + observation, reward, done, truncated, info = env.step(feedback(observation, env.config.force_limit)) + self.assertFiniteObservation(observation) + self.assertTrue(math.isfinite(reward)) + self.assertTrue(info["valid"], info["reason"]) + if info["distance"] <= env.config.tolerance and not info["success"]: + inside_before_success = True + if info["dwell_elapsed"] + 1e-12 < env.config.dwell: + self.assertFalse(info["success"]) + if done or truncated: + break + self.assertTrue(inside_before_success, "Entering the target must not immediately release the skill") + self.assertTrue(info["success"], info["reason"]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertLessEqual(info["distance"], env.config.tolerance) + self.assertGreaterEqual(info["dwell_elapsed"] + 1e-12, env.config.dwell) + self.assertLess(info["distance"], initial_distance) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_zero_action_cannot_claim_success(self): + env = CableEndReachEnv(replace(Config(), horizon=0.8)) + env.reset(seed=0) + for _ in range(40): + observation, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertFiniteObservation(observation) + self.assertFalse(info["success"]) + self.assertTrue(info["valid"], info["reason"]) + if done or truncated: + break + self.assertFalse(done) + self.assertTrue(truncated) + self.assertEqual(info["reason"], "horizon") + self.assertAlmostEqual(info["simulation_time"], env.config.horizon, places=10) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_invalid_action_is_rejected_without_state_change(self): + env = CableEndReachEnv() + env.reset(seed=0) + for action in ([math.nan, 0, 0], [math.inf, 0, 0], [0, 0], [0, 0, 0, 0], + [[0, 0, 0]], [env.config.force_limit + 0.001, 0, 0], ["invalid", 0, 0]): + with self.subTest(action=action): + before = env.snapshot() + with self.assertRaises(ValueError): + env.step(action) + self.assertEqual(before, env.snapshot()) + self.assertFalse(before["episode"]["done"]) + + def test_force_norm_limit_is_enforced_across_axes(self): + env = CableEndReachEnv() + env.reset(seed=0) + with self.assertRaises(ValueError): + env.step([env.config.force_limit, env.config.force_limit, 0]) + observation, _, _, _, _ = env.step([0.3, 0.4, 0.0]) + self.assertEqual(observation["last_action"], [0.3, 0.4, 0.0]) + + def test_explicit_failure_cannot_be_reported_as_success(self): + env = CableEndReachEnv(replace(Config(), workspace_radius_factor=0.05)) + env.reset(seed=0) + _, reward, done, truncated, info = env.step([0, 0, 0]) + self.assertEqual(info["reason"], "workspace_violation") + self.assertFalse(info["valid"]) + self.assertFalse(info["success"]) + self.assertTrue(done) + self.assertFalse(truncated) + self.assertEqual(reward, -1.0) + + def test_unreachable_and_trivial_targets_are_rejected(self): + for offset in ((99.0, 0.0, 0.0), (0.0, 0.0, 0.0)): + with self.subTest(offset=offset): + env = CableEndReachEnv(replace(Config(), target_offset=offset, target_jitter=0)) + with self.assertRaises(ValueError): + env.reset(seed=0) + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + + def test_timing_and_geometry_profiles_reject_unsupported_values(self): + for change in ({"timestep": 0}, {"control_dt": 0.0205}, {"horizon": 0.061}, + {"dwell": 7}, {"force_limit": math.inf}, {"rope_nodes": 4}, + {"rope_radius": 0.02}, {"target_offset": (0, math.nan, 0)}): + with self.subTest(change=change): + with self.assertRaises(ValueError): + replace(Config(), **change) + + def test_reset_required_for_control_and_snapshot(self): + env = CableEndReachEnv() + with self.assertRaises(RuntimeError): + env.step([0, 0, 0]) + with self.assertRaises(RuntimeError): + env.snapshot() + + +class ReplayTests(unittest.TestCase): + def payload(self): + frame = {"time": 0.0, "endpoint_position": [0.1, 0.0, 0.1], + "endpoint_velocity": [0, 0, 0], "target": [0.12, 0.01, 0.1], + "rope_points": [[0, 0, 0.2], [0.1, 0, 0.1]], "last_action": [0, 0, 0]} + return {"schema_version": 1, "task": "CableEndReach-v0", "scope": "simulation-only", + "actuation": "ideal endpoint attachment", "observations": "privileged simulator state", + "config": {"tolerance": 0.025}, "episodes": [{"seed": 0, "policy": "Fixture", + "success": False, "reason": "horizon", "simulated_seconds": 0, + "control_steps": 0, "trace": [frame]}]} + + def test_saved_replay_is_self_contained_and_script_safe(self): + payload = self.payload() + payload["episodes"][0]["policy"] = '' + with tempfile.TemporaryDirectory() as folder: + path = save_replay(payload, Path(folder) / "nested" / "replay.html") + page = path.read_text() + self.assertNotIn(']+src=') + self.assertNotRegex(page, r']+(?:href=)') + data = re.search(r'', page, re.S) + self.assertIsNotNone(data) + self.assertEqual(json.loads(data.group(1)), payload) + self.assertIn('Simulation only', page) + self.assertIn('Ideal endpoint attachment', page) + self.assertIn('Privileged simulator state', page) + + def test_replay_rejects_invalid_state_and_mislabeled_scope(self): + with tempfile.TemporaryDirectory() as folder: + for change in ("nonfinite", "empty", "backwards", "scope"): + with self.subTest(change=change): + payload = self.payload() + if change == "nonfinite": + payload["episodes"][0]["trace"][0]["endpoint_position"][0] = math.inf + elif change == "empty": + payload["episodes"][0]["trace"] = [] + payload["episodes"][0]["success"] = True + elif change == "backwards": + second = copy.deepcopy(payload["episodes"][0]["trace"][0]) + second["time"] = -0.1 + payload["episodes"][0]["trace"].append(second) + else: + payload["scope"] = "physical-robot" + with self.assertRaises(ValueError): + save_replay(payload, Path(folder) / "replay.html") + + def test_replay_preserves_failed_episodes_with_unavailable_observations(self): + payload = self.payload() + payload["episodes"].append({"seed": 1, "policy": "Fixture", "success": False, + "reason": "rejected_start", "simulated_seconds": 0.0, + "final_observation_available": False, "trace": []}) + with tempfile.TemporaryDirectory() as folder: + page = save_replay(payload, Path(folder) / "replay.html").read_text() + data = re.search(r'', page, re.S) + self.assertEqual(len(json.loads(data.group(1))["episodes"]), 2) + self.assertIn("No usable trajectory recorded", page) + self.assertIn("final observation unavailable", page) + + +if __name__ == "__main__": + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py new file mode 100644 index 0000000..8a11b41 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_installer.py @@ -0,0 +1,142 @@ +"""Public URL boundaries, offline persistence and installation integrity.""" +from __future__ import annotations + +import copy +from hashlib import sha256 +import io +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +from simlab.arm_runner import authored_grounding +from simlab.cli import NetworkGuard +from simlab.installer import (MAX_SOURCE_BYTES, _NoRedirect, fetch_skill_url, install_source, + read_installation, resolve_skill_url) + + +ROOT = Path(__file__).resolve().parents[1] +BUNDLED = ROOT / "simlab" / "place_cup.skill.json" +INLINE = ROOT / "examples" / "arm_place_skillspace.json" + + +class InstallerTests(unittest.TestCase): + def test_observed_public_store_and_direct_pack_routes_resolve_canonically(self): + expected = "https://dvidia.org/packs/dvidia/place_cup/skill.json" + for url in ("https://dvidia.org/store/dvidia/place_cup", + "https://www.dvidia.org/store/dvidia/place_cup/", + "https://dvidia.org/packs/dvidia/place_cup/skill.json"): + with self.subTest(url=url): + self.assertEqual(resolve_skill_url(url), expected) + + def test_private_local_plans_traversal_and_untrusted_origins_are_rejected(self): + urls = ("https://dvidia.org/skillspace?id=space-123", "https://dvidia.org/skillspaces", + "https://dvidia.org/store/dvidia/../place_cup", "https://dvidia.org/store/dvidia/%2e%2e", + "https://dvidia.org/store/dvidia/place%2fcup", "https://dvidia.org/store/dvidia//place_cup", + "https://dvidia.org/store/dvidia/place_cup?source=x", "https://dvidia.org/store/dvidia/place_cup#x", + "https://user:password@dvidia.org/store/dvidia/place_cup", + "https://dvidia.org@evil.example/store/dvidia/place_cup", + "https://dvidia.org.evil.example/store/dvidia/place_cup", + "http://dvidia.org/store/dvidia/place_cup", "https://dvidia.org:443/store/dvidia/place_cup", + "https://localhost/store/dvidia/place_cup", "https://127.0.0.1/store/dvidia/place_cup", + "//dvidia.org/store/dvidia/place_cup", "file:" + "///store/dvidia/place_cup") + for url in urls: + with self.subTest(url=url), self.assertRaises(ValueError): + resolve_skill_url(url) + + def test_download_is_bounded_and_redirects_never_follow(self): + raw = BUNDLED.read_bytes() + with patch("simlab.installer.build_opener") as builder: + builder.return_value.open.return_value = io.BytesIO(raw) + data, url = fetch_skill_url("https://dvidia.org/store/dvidia/place_cup") + self.assertEqual(data, raw) + self.assertEqual(url, "https://dvidia.org/packs/dvidia/place_cup/skill.json") + request = builder.return_value.open.call_args.args[0] + self.assertEqual(request.full_url, url) + self.assertEqual(builder.return_value.open.call_args.kwargs["timeout"], 12) + for raw in (b"", b"x" * (MAX_SOURCE_BYTES + 1), b"not a pack"): + with self.subTest(size=len(raw)), patch("simlab.installer.build_opener") as builder: + builder.return_value.open.return_value = io.BytesIO(raw) + with self.assertRaises(ValueError): + fetch_skill_url("https://dvidia.org/store/dvidia/place_cup") + with self.assertRaises(ValueError): + _NoRedirect().redirect_request(None, None, 302, "redirect", {}, "https://evil.example/") + + def test_install_and_reload_remain_offline_and_preserve_exact_source(self): + raw = BUNDLED.read_bytes() + grounding = authored_grounding(raw) + with tempfile.TemporaryDirectory() as temporary, NetworkGuard(True) as guard: + directory = Path(temporary) + first = install_source(raw, grounding, directory, + source_url="https://dvidia.org/store/dvidia/place_cup") + self.assertEqual(first["source_url"], "https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(read_installation(directory, first["installation_id"]), first) + second = install_source(raw, grounding, directory, + source_url="https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(first["installation_id"], second["installation_id"]) + restored = read_installation(directory, first["installation_id"]) + self.assertEqual(restored, second) + self.assertEqual(restored["source_sha256"], sha256(raw).hexdigest()) + self.assertEqual(restored["source_url"], "https://dvidia.org/packs/dvidia/place_cup/skill.json") + self.assertEqual(restored["scope"], "simulation-only") + self.assertFalse(restored["physical_robot_ready"]) + self.assertFalse(restored["skill"]["source_has_robot_policy"]) + self.assertEqual((directory / first["installation_id"] / "source.json").read_bytes(), raw) + self.assertEqual(guard.record()["attempted_calls"], []) + + def test_tampering_source_grounding_or_manifest_cannot_change_installed_contract(self): + raw = BUNDLED.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + record = install_source(raw, authored_grounding(raw), directory) + installation = directory / record["installation_id"] + path = installation / "installation.json" + mutations = (("schema_version", 99), ("schema_version", True), ("scope", "physical"), + ("status", "robot_ready"), ("physical_robot_ready", True), + ("grounding_mode", "invented"), ("grounding_mode", "inline"), + ("policy_origin", "learned from supplied video")) + for field, value in mutations: + changed = copy.deepcopy(record) + changed[field] = value + path.write_text(json.dumps(changed)) + with self.subTest(field=field, value=value), self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + for section, field, value in (("grounding", "table_height", .3), + ("skill", "object_mass", .08), ("source", "skill", "tie_lace")): + changed = copy.deepcopy(record) + changed[section][field] = value + path.write_text(json.dumps(changed)) + with self.subTest(section=section), self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + path.write_text(json.dumps(record)) + (installation / "source.json").write_bytes(raw + b"\n") + with self.assertRaises(ValueError): + read_installation(directory, record["installation_id"]) + + def test_inline_export_retains_its_explicit_grounding_and_local_permissions(self): + raw = INLINE.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + record = install_source(raw, authored_grounding(raw), directory) + restored = read_installation(directory, record["installation_id"]) + self.assertEqual(restored["grounding_mode"], "inline") + self.assertEqual(restored["grounding"], json.loads(raw)["simulation_grounding"]) + self.assertEqual(restored["skill"]["source_permissions"], "local_only_no_public_reuse") + self.assertEqual(restored["source_sha256"], sha256(raw).hexdigest()) + + def test_install_rejects_arbitrary_provenance_urls_and_source_size(self): + raw = BUNDLED.read_bytes() + with tempfile.TemporaryDirectory() as temporary: + for url in ("https://evil.example/source.json", "file:" + "///secret", "https://dvidia.org/skillspace?id=private"): + with self.subTest(url=url), self.assertRaises(ValueError): + install_source(raw, authored_grounding(raw), Path(temporary), source_url=url) + for source in (b"", b" " * (MAX_SOURCE_BYTES + 1)): + with self.assertRaises(ValueError): + install_source(source, {}, Path(temporary)) + with self.assertRaises(ValueError): + read_installation(Path(temporary), "../escape") + + +if __name__ == "__main__": + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py new file mode 100644 index 0000000..e713148 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_pack.py @@ -0,0 +1,63 @@ +import argparse +import json +from pathlib import Path +import tempfile +import unittest +import zipfile +from simlab.pack import export_pack, verify_pack +from simlab.cli import NetworkGuard, parse_seeds + + +class PackTests(unittest.TestCase): + def fixture(self, root): + payload = {'config': {'force_limit': .25}, 'episodes': [{'seed':100,'success':True}]} + target = Path(root)/'pack.zip' + export_pack(target, payload, {'kp':4.}) + return target + + def test_hash_verification_detects_modified_policy(self): + with tempfile.TemporaryDirectory() as root: + target = self.fixture(root) + self.assertEqual(verify_pack(target)['qualification']['successes'], 1) + with zipfile.ZipFile(target) as archive: + files = {name:archive.read(name) for name in archive.namelist()} + files['policy.json'] = b'{"kp":999}\n' + with zipfile.ZipFile(target, 'w') as archive: + for name, data in files.items(): + archive.writestr(name,data) + with self.assertRaisesRegex(ValueError,'hash mismatch'): + verify_pack(target) + + def test_manifest_counts_cannot_disagree_with_evidence(self): + with tempfile.TemporaryDirectory() as root: + target = self.fixture(root) + with zipfile.ZipFile(target) as archive: + files = {name:archive.read(name) for name in archive.namelist()} + manifest = json.loads(files['manifest.json']) + manifest['qualification']['successes'] = 99 + files['manifest.json'] = json.dumps(manifest).encode() + with zipfile.ZipFile(target, 'w') as archive: + for name,data in files.items(): + archive.writestr(name,data) + with self.assertRaisesRegex(ValueError,'count mismatch'): + verify_pack(target) + + def test_offline_guard_blocks_and_restores_python_networking(self): + import socket + original = socket.socket + with NetworkGuard(True) as guard: + self.assertEqual(guard.attempts, []) + with self.assertRaisesRegex(RuntimeError,'denied'): + socket.socket() + self.assertEqual(guard.attempts, ['socket']) + self.assertIs(socket.socket, original) + + def test_eval_seed_input_is_frozen_and_unique(self): + self.assertEqual(parse_seeds('100,101,102'), [100,101,102]) + for bad in ['-1','1,1','abc','']: + with self.assertRaises(argparse.ArgumentTypeError): + parse_seeds(bad) + + +if __name__ == '__main__': + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py new file mode 100644 index 0000000..cd5def8 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_skillspace.py @@ -0,0 +1,205 @@ +"""Actual export compatibility and fail-closed physical grounding contracts.""" +from __future__ import annotations + +import copy +from dataclasses import FrozenInstanceError +import hashlib +import json +import math +from pathlib import Path +import unittest + +from simlab.skillspace import (ADAPTER_ID, ARM_PROFILE, MAX_DOCUMENT_BYTES, GroundedSkill, + SkillspaceError, inspect_skillspace, load_skillspace) + + +EXAMPLE = Path(__file__).resolve().parents[1] / "examples" / "arm_place_skillspace.json" + + +def example(): + return json.loads(EXAMPLE.read_text()) + + +def source_metadata(): + # Exact field vocabulary from the shipped dvidia-cli place_cup example. + return {"vdia": "0", "skill": "place_cup", "owner": "dvidia", "version": "0.3.0", + "task": "Set a cup on the mark.", "demos": 100, "accuracy": 88, + "cameras": ["ego", "room"], "format": "lerobot/v3", "license": "open", + "residual": {"claimer": 0.1, "contributors": 0.3, "network": 0.6, "book": "not-live"}} + + +def cup_grounding(): + grounding = example()["simulation_grounding"] + grounding["task_type"] = "place_cup" + grounding["language_aliases"] = ["place a cup", "set a cup on the mark"] + return grounding + + +class SkillspaceTests(unittest.TestCase): + def assertRejected(self, document, code="invalid_document", grounding=None): + with self.assertRaises(SkillspaceError) as context: + load_skillspace(document, grounding) + self.assertEqual(context.exception.code, code) + json.dumps(context.exception.as_dict(), allow_nan=False) + + def test_cli_public_pack_and_current_browser_exports_are_metadata_only(self): + cli = source_metadata() + public = {"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"}} + browser = {**public, "accuracy": None, "robot_type": "human_video_reference", "residual": None, + "earnings_status": "unavailable", "dual": True, "rig": "wrist-room", + "info": "meta/info.json", "lerobot": {"dvidia": {"training_ready": False, + "robot_ready": False, "robot_actions": "absent", "robot_state": "absent"}}} + for source in (cli, public, browser): + with self.subTest(source=source.get("robot_type", "CLI")): + before = copy.deepcopy(source) + report = inspect_skillspace(source) + self.assertEqual(report["skill_id"], "place_cup") + self.assertEqual(report["readiness"], "grounding_required") + self.assertFalse(report["source_has_robot_policy"]) + self.assertFalse(report["robot_ready"]) + self.assertIn("object", report["missing_grounding"]) + self.assertRejected(source, "grounding_required") + self.assertEqual(source, before) + + def test_actual_contribution_brief_shape_preserves_local_permission_boundary(self): + source = example() + del source["simulation_grounding"] + report = inspect_skillspace(source) + self.assertEqual(report["source_format"], "dvidia-contribution-brief:1") + self.assertEqual(report["skill_id"], "place_object") + self.assertEqual(report["permissions"], "local_only_no_public_reuse") + self.assertEqual(report["brief_id"], source["brief"]["id"]) + self.assertRejected(source, "grounding_required") + source["permissions"]["publicReuseGranted"] = True + self.assertRejected(source) + + def test_grounded_example_normalizes_jsonable_immutable_contract(self): + raw = EXAMPLE.read_bytes() + skill = load_skillspace(raw) + self.assertIsInstance(skill, GroundedSkill) + self.assertEqual(skill.source_sha256, hashlib.sha256(raw).hexdigest()) + self.assertEqual(skill.source_hash_kind, "exact_bytes") + self.assertEqual(skill.arm_profile, ARM_PROFILE) + self.assertEqual(skill.adapter_id, ADAPTER_ID) + self.assertEqual(skill.object_size, (.04, .04, .04)) + result = json.loads(json.dumps(skill.to_dict(), allow_nan=False)) + self.assertEqual(result["object_position"], [.42, -.04, .31]) + self.assertEqual(result["object_representation"], "authored_box_proxy") + self.assertFalse(result["robot_ready"]) + with self.assertRaises(FrozenInstanceError): + skill.skill_id = "tie_lace" + report = inspect_skillspace(raw) + self.assertTrue(report["simulation_ready"]) + self.assertEqual(report["readiness"], "simulation_adapter_bound") + + def test_explicit_sidecar_binds_adapter_without_rewriting_source(self): + source = source_metadata() + original = copy.deepcopy(source) + grounding = cup_grounding() + skill = load_skillspace(source, grounding) + self.assertEqual(skill.skill_id, "place_cup") + self.assertEqual(skill.provenance, "authored_simulation_adapter") + self.assertEqual(skill.source_hash_kind, "canonical_json") + self.assertEqual(source, original) + changed = copy.deepcopy(grounding) + changed["object"]["mass"] = .05 + second = load_skillspace(source, changed) + self.assertEqual(skill.source_sha256, second.source_sha256) + self.assertNotEqual(skill.grounding_sha256, second.grounding_sha256) + inline = example() + self.assertRejected(inline, "ambiguous_grounding", inline["simulation_grounding"]) + + def test_unsupported_skills_and_relabeling_fail_explicitly(self): + for identifier in ("tie_lace", "tie your shoes", "wipe_counter", "unknown", "Place cup nearby"): + source = source_metadata() + source["skill"] = identifier + with self.subTest(identifier=identifier): + self.assertRejected(source, "unsupported_task", cup_grounding()) + with self.assertRaises(SkillspaceError): + inspect_skillspace(source) + source = source_metadata() + grounding = cup_grounding() + grounding["task_type"] = "place_object" + self.assertRejected(source, "unsupported_task", grounding) + brief = example() + brief["brief"]["taskTitle"] = "Tie your shoes" + self.assertRejected(brief, "unsupported_task") + + def test_nonfinite_numbers_duplicate_keys_and_oversized_input_are_rejected(self): + for value in (math.nan, math.inf, -math.inf, 10 ** 400): + source = example() + source["simulation_grounding"]["object"]["position"][0] = value + self.assertRejected(source) + for text in ('{"vdia":"0","vdia":"0"}', '{"number":NaN}', '{"number":1e999}', '[]', 'null'): + with self.subTest(text=text): + self.assertRejected(text) + self.assertRejected(b"\xff") + self.assertRejected(" " * (MAX_DOCUMENT_BYTES + 1), "document_too_large") + + def test_geometry_frame_profile_and_goal_bounds_fail_closed(self): + changes = [("frame", "camera"), ("units", "cm"), ("table_height", .3), + ("arm_profile", "physical-arm"), ("adapter_id", "video-policy"), + ("provenance", "learned_from_video"), ("schema_version", True), + ("procedure", ["teleport", "release"])] + for field, value in changes: + source = example() + source["simulation_grounding"][field] = value + with self.subTest(field=field): + self.assertRejected(source) + invalid_objects = [{"size": [.5, .04, .04]}, {"mass": True}, {"friction": .1}, + {"kind": "cup"}, {"position": [.7, 0, .31]}, + {"position": [.42, 0, .50]}, {"position": [0, 0]}, {"velocity": [1, 0, 0]}] + for values in invalid_objects: + source = example() + source["simulation_grounding"]["object"].update(values) + with self.subTest(values=values): + self.assertRejected(source) + invalid_targets = [{"position": [.42, -.04, .31]}, {"position": [.54, .25, .31]}, + {"position": [.60, .20, .31]}, + {"position_tolerance": .2}, {"dwell_seconds": 0}] + for values in invalid_targets: + source = example() + source["simulation_grounding"]["target"].update(values) + with self.subTest(values=values): + self.assertRejected(source) + source = example() + source["simulation_grounding"]["workspace"]["max"][0] = 100 + self.assertRejected(source) + + # A vertical-offset token cannot disguise a too-short horizontal task. + source = example() + source["simulation_grounding"]["object"]["position"] = [.42, 0, .30] + source["simulation_grounding"]["target"]["position"] = [.492, 0, .32] + self.assertRejected(source) + + def test_grounding_missing_unknown_fields_and_ambiguous_aliases_are_rejected(self): + for mutate in (lambda row: row.pop("object"), lambda row: row.update({"execute": "evil()"}), + lambda row: row.update({"language_aliases": []}), + lambda row: row.update({"language_aliases": ["place object", "PLACE OBJECT"]})): + source = example() + mutate(source["simulation_grounding"]) + self.assertRejected(source) + + def test_brief_ids_timestamps_and_draft_terms_cannot_be_forged(self): + for section, field, value in (("brief", "id", "bad-id"), ("brief", "version", True), + ("brief", "createdAt", "2026-02-30T00:00:00.000Z"), + ("commercialProposal", "proposedFounderShareBps", 1), + ("brief", "creatorHandle", "invalid handle")): + source = example() + source[section][field] = value + with self.subTest(field=field): + self.assertRejected(source) + + def test_multiline_brief_text_uses_actual_export_contract(self): + source = example() + source["brief"]["goal"] += "\nThis remains authored scene metadata." + source["brief"]["captureChecklist"][0] += "\nReview it locally." + self.assertEqual(load_skillspace(source).skill_id, "place_object") + + +if __name__ == "__main__": + unittest.main() diff --git a/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py new file mode 100644 index 0000000..5b79433 --- /dev/null +++ b/topics/physical-grounding/runs/2026-10-07-skillspace-arm/tests/test_studio.py @@ -0,0 +1,131 @@ +"""Real loopback HTTP boundaries and offline source-to-native preview bridge.""" +from __future__ import annotations + +import http.client +import json +from pathlib import Path +import tempfile +import threading +import unittest +from unittest.mock import patch + +from simlab.installer import read_installation +from simlab.studio import StudioServer + + +class StudioHTTPTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.temporary = tempfile.TemporaryDirectory() + cls.server = StudioServer(("127.0.0.1", 0), Path(cls.temporary.name), offline=True) + cls.port = cls.server.server_address[1] + cls.thread = threading.Thread(target=cls.server.serve_forever, + kwargs={"poll_interval": .01}, daemon=True) + cls.thread.start() + + @classmethod + def tearDownClass(cls): + cls.server.shutdown() + cls.server.server_close() + cls.thread.join(timeout=2) + cls.temporary.cleanup() + + def request(self, path, value=None, *, method="POST", headers=None, raw=None): + connection = http.client.HTTPConnection("127.0.0.1", self.port, timeout=35) + supplied_headers = {"Content-Type": "application/json", + "Origin": f"http://127.0.0.1:{self.port}"} + supplied_headers.update(headers or {}) + payload = raw if raw is not None else (None if value is None else json.dumps(value)) + try: + connection.request(method, path, body=payload, headers=supplied_headers) + response = connection.getresponse() + data = response.read() + parsed = json.loads(data) if response.getheader("Content-Type", "").startswith("application/json") else data + return response.status, dict(response.getheaders()), parsed + finally: + connection.close() + + def test_loopback_ui_serves_with_browser_guards_and_nonlocal_requests_fail(self): + status, headers, body = self.request("/", method="GET") + self.assertEqual(status, 200) + self.assertIsInstance(body, bytes) + self.assertIn(b"Install", body) + self.assertEqual(headers["X-Content-Type-Options"], "nosniff") + self.assertEqual(headers["Cache-Control"], "no-store") + self.assertIn("frame-ancestors 'none'", headers["Content-Security-Policy"]) + self.assertNotIn("Access-Control-Allow-Origin", headers) + for values in ({"Host": "evil.example"}, {"Origin": "https://evil.example"}, + {"Origin": "null"}, {"Host": f"127.0.0.1:{self.port + 1}"}): + with self.subTest(headers=values): + status, _, body = self.request("/api/install", {"bundled": True}, headers=values) + self.assertEqual(status, 400) + self.assertIn("error", body) + + def test_json_body_media_type_size_duplicate_keys_and_nonfinite_values_reject(self): + cases = (("{}", {"Content-Type": "text/plain"}), ("[]", {}), ("null", {}), + ('{"bundled":false,"bundled":true}', {}), ('{"bundled":true,"scene":NaN}', {}), + ('{"bundled":true,"unrecognized":1}', {}), ('{"bundled":true}', {"Content-Length": "-1"}), + (" " * (256 * 1024 + 1), {})) + for raw, headers in cases: + with self.subTest(raw=raw[:50], headers=headers): + status, _, result = self.request("/api/install", headers=headers, raw=raw) + self.assertEqual(status, 400) + self.assertIn("error", result) + + def test_offline_bundled_install_persists_without_network_or_robot_readiness(self): + with patch("simlab.studio.fetch_skill_url", side_effect=AssertionError("offline install fetched a URL")): + status, _, record = self.request("/api/install", {"bundled": True}) + self.assertEqual(status, 200) + self.assertEqual(record["skill"]["skill_id"], "place_cup") + self.assertEqual(record["scope"], "simulation-only") + self.assertFalse(record["physical_robot_ready"]) + self.assertFalse(record["skill"]["source_has_robot_policy"]) + restored = read_installation(Path(self.temporary.name) / "installed", record["installation_id"]) + self.assertEqual(restored["source_sha256"], record["source_sha256"]) + status, _, error = self.request("/api/install", {"url": "https://dvidia.org/store/dvidia/place_cup"}) + self.assertEqual(status, 400) + self.assertIn("offline", error["error"].lower()) + + def test_inline_json_upload_and_mutually_exclusive_source_modes(self): + document = (Path(__file__).resolve().parents[1] / "examples" / "arm_place_skillspace.json").read_text() + status, _, record = self.request("/api/install", {"document": document}) + self.assertEqual(status, 200) + self.assertEqual(record["grounding_mode"], "inline") + self.assertEqual(record["skill"]["skill_id"], "place_object") + self.assertEqual(record["skill"]["source_permissions"], "local_only_no_public_reuse") + for source in ({"bundled": True, "document": document}, {"bundled": False}, {"document": {}}, {}): + with self.subTest(source=list(source)): + status, _, error = self.request("/api/install", source) + self.assertEqual(status, 400) + self.assertIn("error", error) + + def test_preview_spawns_native_worker_and_honors_independent_grounded_scene(self): + scene = {"object_position": [.36, -.08, .31], "target_position": [.50, .08, .31], "seed": 12} + status, _, preview = self.request("/api/preview", {"scene": scene}) + self.assertEqual(status, 200) + self.assertTrue(preview["info"]["valid"]) + self.assertFalse(preview["info"]["success"]) + observation = preview["observation"] + for coordinate, expected in zip(observation["object_position"][:2], scene["object_position"][:2]): + self.assertAlmostEqual(coordinate, expected, places=6) + self.assertEqual(observation["target_position"], scene["target_position"]) + self.assertEqual(len(observation["joint_position"]), 6) + json.dumps(preview, allow_nan=False) + + def test_invalid_scene_and_execution_identity_do_not_queue_native_runs(self): + before = set(self.server.jobs) + for scene in ({"object_position": [.60, .20, .31]}, {"seed": True}, {"unknown": 1}): + with self.subTest(scene=scene): + status, _, body = self.request("/api/preview", {"scene": scene}) + self.assertEqual(status, 400) + self.assertIn("error", body) + scene = {"object_position": [.42, -.04, .31], "target_position": [.54, .10, .31], "seed": 0} + status, _, body = self.request("/api/run", {"installation_id": "../escape", "scene": scene, "policy": "placement"}) + self.assertEqual(status, 400) + self.assertEqual(set(self.server.jobs), before) + status, _, _ = self.request("/api/jobs/" + "0" * 32, method="GET") + self.assertEqual(status, 404) + + +if __name__ == "__main__": + unittest.main()