Add task-first GenSim action and orchestration pipeline - #531
skywhite1024 wants to merge 143 commits into
Conversation
…mentation client)
…cs and tests may not be updated
…ption, and add check code
…ption in objects' names
…but no real-world scale...
…refactor_v37 # Conflicts: # embodichain/gen_sim/task_engine/_task_program/assembly.py # embodichain/gen_sim/task_engine/task_program_bundle.py
| count = ( | ||
| len(tracks[0]) | ||
| if scope.kind == "slide" | ||
| else trajectory.positions.shape[1] | ||
| ) | ||
| simulation = SimulationManager.get_instance( | ||
| scope.generator.planner.cfg.sim_instance_id | ||
| ) | ||
| collision = check_free_motion( | ||
| robot, simulation, trajectory.positions[0, :count], part |
There was a problem hiding this comment.
Recovered retreat skips collision checks
When a failed E6 Slide plan is recovered, the new path includes a release retreat after the approach, reach, and pull. This check examines only the approach frames, so it can accept a retreat that moves the robot through an obstacle.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/task_engine/_task_program/articulation_recovery.py
Line: 411-420
Comment:
**Recovered retreat skips collision checks**
When a failed E6 Slide plan is recovered, the new path includes a release retreat after the approach, reach, and pull. This check examines only the approach frames, so it can accept a retreat that moves the robot through an obstacle.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| has_place = any(node["call"].get("kind") == "place" for node in result["nodes"]) | ||
| if not has_place: | ||
| return result | ||
| for group in result.get("task_groups", ()): | ||
| ids = group.get("node_ids", ()) | ||
| if group.get("task_type") != "E6" or not ids: | ||
| continue | ||
| first = nodes[ids[0]]["call"] | ||
| if first.get("arguments", {}).get("state") != "closed": | ||
| continue | ||
| primary = first.get("resources", {}).get("primary") | ||
| # The right arm is the alternate in the supported dual-arm profile. | ||
| # Keep an already-right close route idempotent across bundle passes. | ||
| alternate = "right" if primary == "left" else primary |
There was a problem hiding this comment.
Unrelated drawer closes switch arms
If the graph contains any Place call, this rewrite moves every left-arm E6 close group to the right arm. It does not check whether the close belongs to that placement or whether the left arm was explicitly selected, so an unrelated drawer close can run on the wrong arm and fail to reach its target.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/task_engine/_task_program/drawer_binding.py
Line: 155-168
Comment:
**Unrelated drawer closes switch arms**
If the graph contains any Place call, this rewrite moves every left-arm E6 close group to the right arm. It does not check whether the close belongs to that placement or whether the left arm was explicitly selected, so an unrelated drawer close can run on the wrong arm and fail to reach its target.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Superseded by #729, which carries v36 onto the latest main and includes the drawer, cuRobo, IK, policy, test, and API documentation fixes. |
Note
Superseded by native GitHub Stack #539 (PRs #532 through #538). Review and merge the incremental stack instead of this closed aggregate PR.
Description
This PR introduces a task-first GenSim pipeline that connects scene preparation, symbolic task planning, direct AtomicAction graph execution, and auditable workflow recovery.
The main changes are:
prepare,run, andrun-allCLI flows across image, image-edit, scene, and scene-edit inputs;The change consolidates cross-engine ownership under Task Engine while keeping Scene Engine responsible for scene materialization and Action Engine responsible for graph compilation and execution.
Issue: none linked.
Dependencies: no new third-party Python dependency is introduced. Runtime workflows continue to use the existing optional model, image/geometry service, simulator, and motion-planning integrations.
Type of change
Validation
git diff --check origin/main...origin/ljd/action_engine_refactorblack --check --diff --color ./— one file requires reformatting:tests/gen_sim/action_engine/config/test_runtime_policy.py; 845 files pass.pytest -q tests/gen_sim/action_engine tests/gen_sim/task_engine tests/gen_sim/scene_engine— 703 passed, 3 failed, 9 warnings. The failures are stale expectations forCoordinatedPickment.middle_empty_ratio(0.4expected,0.7configured) and camera recordinginterval_step(5expected,1configured).The source branch is currently four commits behind
main; it should be synchronized before merge so CI validates the final integration state.Screenshots
Not included. Generated SeedGraph PNGs and runtime artifacts are covered by the visualization and generation tests.
Checklist
black .command to format the code base.