Skip to content

feat(skills): add declarative placement relations - #481

Open
yuecideng wants to merge 1 commit into
feat/workflow-reacquisitionfrom
feat/placement-relation-bindings
Open

feat(skills): add declarative placement relations#481
yuecideng wants to merge 1 commit into
feat/workflow-reacquisitionfrom
feat/placement-relation-bindings

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Defaults remain capability-scoped and all target poses are resolved from fresh registry snapshots. The implementation never guesses a frame from an entity name, mesh, or bounding box, so new tasks using an existing placement capability need scene configuration rather than task-local motion code.

Refs #471
Refs #474

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Not applicable.

Validation

  • pytest -q tests/gym/envs/expert_program/test_simulation.py tests/sim/skills/test_compiler.py tests/gym/envs/expert_program/test_catalog.py -k 'support or container or relation or placement' — 12 passed, 58 deselected
  • Black 26.3.1 check on changed Python files

Checklist

  • Changed Python files pass Black 26.3.1.
  • Public API and usage documentation is completed by follow-up layer test(tasks): gate cube physical recovery #483.
  • Tests cover declarations, defaults, live grounding, and automatic registration.
  • No dependency update is required.

@yuecideng
yuecideng force-pushed the feat/placement-relation-bindings branch from 06a764e to 6fd5714 Compare August 11, 2026 16:09
@yuecideng yuecideng added atomic action atomic action related functionality gym robot learning env and its related features enhancement New feature or request labels Aug 11, 2026
@yuecideng
yuecideng marked this pull request as ready for review August 11, 2026 16:11
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds declarative support-surface and container placement relations, registers their typed scene affordances, and automatically installs matching relation grounders.

  • Adds capability-scoped placement defaults for object, articulation, and link parents.
  • Resolves placement targets from current scene snapshots while enforcing configured confidence thresholds.
  • Adds package exports and tests for declaration, registration, grounding, and default selection.

Confidence Score: 4/5

The PR appears safe to merge from a runtime perspective, with the non-blocking requirement that its newly exported placement APIs be documented.

The placement declaration, registry, and grounding paths maintain explicit parent typing, capability-scoped defaults, and late-bound pose resolution; the remaining accepted concern is missing documentation for the new public interfaces.

Files Needing Attention: embodichain/lab/gym/envs/expert_program/simulation.py

Important Files Changed

Filename Overview
embodichain/lab/gym/envs/expert_program/simulation.py Adds validated placement bindings and projects them into provider-free manifests and live scene registries; the public API lacks an in-PR documentation update.
embodichain/lab/gym/envs/expert_program/catalog.py Automatically installs exact-version support and container relation grounders when corresponding scene declarations are present.
embodichain/lab/sim/skills/compiler.py Adds typed relation grounders that preserve late pose resolution and affordance confidence thresholds.
embodichain/lab/sim/skills/scene.py Defines the versioned support-surface and container affordance payload contracts.
tests/gym/envs/expert_program/test_simulation.py Exercises placement declarations, capability-scoped defaults, live parent-relative poses, and confidence payloads.
tests/gym/envs/expert_program/test_catalog.py Verifies automatic grounder installation and relation preflight integration.
tests/sim/skills/test_compiler.py Verifies both built-in grounders produce late-bound targets with preserved confidence thresholds.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    B[Placement binding] --> M[SimulationSceneBinding]
    M --> R[SceneRegistry affordance]
    M --> D[Capability-scoped default]
    M --> G[Automatic relation grounder]
    D --> S[Semantic relation selection]
    S --> G
    G --> P[Late-bound SceneEntityPose]
    R --> P
    P --> A[Placement action planning]
Loading

Fix All in Codex Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
embodichain/lab/gym/envs/expert_program/simulation.py:363
**Document the public placement API**

The newly exported placement bindings, affordance payloads, and relation grounders have no corresponding public documentation in this changeset, leaving users without guidance on declaration fields, registration behavior, or usage.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(skills): add declarative placement ..." | Re-trigger Greptile

raise TypeError("is_default must be a bool.")


@dataclass(frozen=True, slots=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Document the public placement API

The newly exported placement bindings, affordance payloads, and relation grounders have no corresponding public documentation in this changeset, leaving users without guidance on declaration fields, registration behavior, or usage.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/gym/envs/expert_program/simulation.py
Line: 363

Comment:
**Document the public placement API**

The newly exported placement bindings, affordance payloads, and relation grounders have no corresponding public documentation in this changeset, leaving users without guidance on declaration fields, registration behavior, or usage.

**Context Used:** CLAUDE.md ([source](https://github.com/dexforce/embodichain/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic action atomic action related functionality enhancement New feature or request gym robot learning env and its related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant