feat(action-engine): add runtime grounding and action adapters - #536
Conversation
Greptile SummaryThis PR introduces runtime grounding, predicate evaluation, robot-frame helpers, atomic-action adapters, and a checksummed V-HACD grasp-collision cache.
Confidence Score: 3/5This PR is not safe to merge until the fallback planner preserves dynamic-obstacle collision safety or refuses fallback for collision-aware requests. Generated scenes enable dynamic collision for rigid objects, but a failed primary plan can be replaced by an accepted IK trajectory whose collision-world mode is explicitly disabled. Files Needing Attention: embodichain/gen_sim/action_engine/runtime/actions.py
|
| Filename | Overview |
|---|---|
| embodichain/gen_sim/action_engine/runtime/actions.py | Adds the main atomic-action planning adapter; its automatic IK fallback drops configured dynamic-obstacle collision handling. |
| embodichain/gen_sim/action_engine/runtime/grounding.py | Adds batched semantic grounding, arrangement, placement, and candidate-generation logic without an accepted actionable defect. |
| embodichain/gen_sim/action_engine/runtime/grasp_collision_cache.py | Adds private, atomic, metadata- and SHA-256-validated V-HACD cache generation; scanner leads did not establish a changed-code vulnerability. |
| embodichain/gen_sim/action_engine/runtime/predicates.py | Adds runtime predicate evaluation supporting the new grounding and action flow. |
| embodichain/gen_sim/action_engine/runtime/frames.py | Adds batched robot-base and relation-frame calculations used by grounding and action configuration. |
| embodichain/gen_sim/action_engine/runtime/atomic_compat.py | Adds compatibility behavior for exact-target held-object motion. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Semantic action] --> B[Runtime grounding]
B --> C[AtomicActionAdapter]
C --> D[Collision-aware motion_gen plan]
D -->|success| E[Selected trajectory]
D -->|failure| F[ik_interp fallback]
F -->|DynamicCollisionMode.OFF| E
E --> G[Execution and state effects]
Prompt To Fix All With AI
### Issue 1
embodichain/gen_sim/action_engine/runtime/actions.py:382-385
**Fallback disables obstacle collisions**
When a generated scene configures rigid objects as dynamic obstacles, the default `auto` safety mode allows a failed collision-aware `motion_gen` request to fall back to `ik_interp` with `DynamicCollisionMode.OFF`; successful fallback rows are then executed without considering those obstacles, allowing the robot or held object to collide with them.
**How this was verified:** The generated-scene configuration enables dynamic collision for rigid objects, while OFF mode bypasses the scene collision world and the adapter accepts successful fallback rows.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(action-engine): add runtime groundi..." | Re-trigger Greptile
| fallback_policy = replace( | ||
| invocation.motion_policy, | ||
| strategy=str(fallback_strategy), | ||
| dynamic_collision_mode=DynamicCollisionMode.OFF, |
There was a problem hiding this comment.
Fallback disables obstacle collisions
When a generated scene configures rigid objects as dynamic obstacles, the default auto safety mode allows a failed collision-aware motion_gen request to fall back to ik_interp with DynamicCollisionMode.OFF; successful fallback rows are then executed without considering those obstacles, allowing the robot or held object to collide with them.
How this was verified: The generated-scene configuration enables dynamic collision for rigid objects, while OFF mode bypasses the scene collision world and the adapter accepts successful fallback rows.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/action_engine/runtime/actions.py
Line: 382-385
Comment:
**Fallback disables obstacle collisions**
When a generated scene configures rigid objects as dynamic obstacles, the default `auto` safety mode allows a failed collision-aware `motion_gen` request to fall back to `ik_interp` with `DynamicCollisionMode.OFF`; successful fallback rows are then executed without considering those obstacles, allowing the robot or held object to collide with them.
**How this was verified:** The generated-scene configuration enables dynamic collision for rigid objects, while OFF mode bypasses the scene collision world and the adapter accepts successful fallback rows.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.4159ce5 to
b666762
Compare
b666762 to
83c3bc1
Compare
83c3bc1 to
553e3f0
Compare
Description
Stack
ljd/gen-sim-refactor-04-planning-generationAdd live target grounding, frame and predicate resolution, collision-cache preparation, action configuration materialization, and the adapter from SeedGraph nodes to the shared AtomicAction engine.
The adapter is rebased onto main's generic endpoint bindings and explicit trajectory timing. It preserves the original GenSim behavior without reverting the newer AtomicAction runtime contracts.
Refs #531
Type of change
Validation
git diff --check- passedChecklist