Skip to content

feat(expert-program): validate parallel joint segments - #482

Open
yuecideng wants to merge 1 commit into
feat/placement-relation-bindingsfrom
feat/production-parallel-safety
Open

feat(expert-program): validate parallel joint segments#482
yuecideng wants to merge 1 commit into
feat/placement-relation-bindingsfrom
feat/production-parallel-safety

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Every supplied sample is checked against cuRobo joint bounds, self-collision, and the registry-backed live static/dynamic world. Uncovered joints, overlapping commands, collision rows, and sample-cap under-sampling fail closed. The gate validates the command as written; it neither replans nor replaces the trajectory.

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_parallel_safety.py tests/sim/planners/test_curobo_planner.py tests/gym/envs/expert_program/test_catalog.py tests/gym/envs/expert_program/test_extensions.py tests/gym/envs/expert_program/test_simulation_environment.py — 164 passed, 1 skipped, 2 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 exact sample order, dense interpolation, row-local collision, live world updates, and fail-closed configuration.
  • No dependency update is required.

@yuecideng
yuecideng force-pushed the feat/production-parallel-safety branch from a271c5a to a41a4cd Compare August 11, 2026 16:09
@yuecideng yuecideng added motion gen Things related to motion generation for robot 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:12
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds a cuRobo-backed safety gate for synchronized joint-position branches, validating densely interpolated command segments against joint limits, self-collision, and the live collision world.

  • Adds registration and runtime wiring for the new validator factory.
  • Adds exact joint-trajectory validation to the planner and motion-generator contracts.
  • Adds coverage for interpolation, row-local collision failures, uncovered joints, configuration limits, and cuRobo joint ordering.

Confidence Score: 4/5

The implementation appears safe to merge, with the non-blocking requirement to document the newly exported validator APIs.

The safety-validation flow is coherently wired and tested, and no concrete blocking runtime failure remains; the accepted issue is limited to missing documentation for the new public surface.

Files Needing Attention: embodichain/lab/gym/envs/expert_program/init.py and public documentation

Important Files Changed

Filename Overview
embodichain/lab/gym/envs/expert_program/simulation_parallel_safety.py Adds the production validator, runtime binding checks, segment interpolation, live-scene snapshots, and fail-closed collision handling.
embodichain/lab/sim/planners/curobo/curobo_planner.py Adds cuRobo configuration-level validation for each supplied trajectory sample and integrates live dynamic-obstacle updates.
embodichain/lab/sim/planners/motion_generator.py Exposes and validates the planner capability and boolean trajectory-validity contract.
embodichain/lab/gym/envs/expert_program/catalog.py Extends safety-validator creation with the assembled scene registry and atomic-action engine while enforcing robot identity.
embodichain/lab/gym/envs/expert_program/init.py Publicly exports the new validator APIs without the documentation required for public API additions.
tests/gym/envs/expert_program/test_simulation_parallel_safety.py Covers dense merged trajectories, row-local rejection, uncovered joints, interpolation caps, configuration validation, and runtime binding.

Sequence Diagram

sequenceDiagram
    participant Runtime as Parallel Runtime
    participant Gate as Safety Validator
    participant Robot
    participant Scene as Scene Registry
    participant MG as Motion Generator
    participant Curobo as cuRobo Checker
    Runtime->>Gate: validate(branch frames, merged frame)
    Gate->>Robot: read measured joint positions
    Gate->>Gate: merge targets and densify segment
    Gate->>Scene: snapshot live obstacle poses
    Gate->>MG: validate_joint_trajectory(samples, poses)
    MG->>Curobo: validate every sample
    Curobo-->>MG: validity mask (B, T)
    MG-->>Gate: validity mask
    alt every active row is valid
        Gate-->>Runtime: allow dispatch
    else any active row is invalid
        Gate-->>Runtime: raise ParallelSafetyError
    end
Loading

Fix All in Codex Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
embodichain/lab/gym/envs/expert_program/__init__.py:158-161
**Document the public safety APIs**

These exports add public validator and factory APIs without documenting their required aggregate control-part configuration, interpolation limits, runtime dependencies, or integration procedure, leaving users without the repository's required public API guidance.

---

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

Reviews (1): Last reviewed commit: "feat(expert-program): validate parallel ..." | Re-trigger Greptile

Comment on lines +158 to +161
from .simulation_parallel_safety import (
CuroboParallelCommandSafetyValidator,
CuroboParallelSafetyValidatorFactory,
)

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 safety APIs

These exports add public validator and factory APIs without documenting their required aggregate control-part configuration, interpolation limits, runtime dependencies, or integration procedure, leaving users without the repository's required public API guidance.

Context Used: AGENTS.md (source)

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

Comment:
**Document the public safety APIs**

These exports add public validator and factory APIs without documenting their required aggregate control-part configuration, interpolation limits, runtime dependencies, or integration procedure, leaving users without the repository's required public API guidance.

**Context Used:** AGENTS.md ([source](https://github.com/dexforce/embodichain/blob/main/AGENTS.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

enhancement New feature or request gym robot learning env and its related features motion gen Things related to motion generation for robot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant