feat: scene-layout JSON export and rig files for operator tools#31
Merged
Conversation
Add a deterministic scene-layout JSON contract (a regenerable projection of an instance at a given eval_seed/epoch, single-source frame-local coordinates) plus a hand-authored per-lab rig format that anchors the bench frame to the two arm bases. specs.py stays the source of truth; the JSON is generated, never edited. - layout.py: export_scene_layout, canonical serializer, strict loaders (frozen dataclasses, field-specific errors, bench-handedness check), kitchenbench-layout CLI ([project.scripts]) - schemas/: draft 2020-12 JSON Schemas shipped as package data - rigs/yam-bimanual.json: reference rig - docs/layouts.md: formats, frame convention, determinism story - tests: determinism, seed alignment, blueprint fidelity, 50-instance schema sweep (jsonschema, dev extra only), loader rejections, CLI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KXT3ha5z8tirtRQSFbHgae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a machine-readable placement layer for operator setup tools and simulator adapters, per the design discussed in-session:
export_scene_layout(instance_id, eval_seed=0, epoch=0)derives the trial seed exactly aseval()does (derive_seed(eval_seed, crc32(instance_id), epoch)) and projectsbuild_blueprint()into a versioned JSON contract. Coordinates are single-source and frame-local: each object carriesframe("bench"or a parent object name) plusxy_cm; no resolved duplicates.rigs/yam-bimanual.json.layout_versions rejected.jsonschemain the dev extra only).kitchenbench-layout <instance_id> [--eval-seed N] [--epoch N] [-o FILE], byte-identical output for identical inputs.docs/layouts.md(formats, frame convention, determinism story).specs.pyremains the single source of truth; the JSON is a regenerable projection pinned bykitchenbench_version+sim_contract_version. Nothing undersim/,specs.py, orinstances.pychanged.Verification
ruff check/ruff format --check: cleanmypy(strict): cleanpytest --cov: 376 passed, 100% coveragemkdocs build --strict: clean🤖 Generated with Claude Code
https://claude.ai/code/session_01KXT3ha5z8tirtRQSFbHgae