Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,69 @@ Ontology

.. automodule:: embodichain.gen_sim.task_engine.ontology
:members:

Scene adaptation and feasibility
--------------------------------

.. automodule:: embodichain.gen_sim.task_engine.scene
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene.conservative_graph
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene.contracts
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene.feasibility
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene.final_inspection
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene.scene_engine_v1
:members:

.. automodule:: embodichain.gen_sim.task_engine.scene_backend
:members:

Orchestration
-------------

.. automodule:: embodichain.gen_sim.task_engine.orchestration
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.artifacts
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.contracts
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.coordinator
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.legacy_scene
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.scene_adapter
:members:

.. automodule:: embodichain.gen_sim.task_engine.orchestration.scene_source
:members:

.. automodule:: embodichain.gen_sim.task_engine.run_directory
:members:

.. automodule:: embodichain.gen_sim.task_engine.state_machine
:members:

.. automodule:: embodichain.gen_sim.task_engine.workflow
:members:

.. automodule:: embodichain.gen_sim.task_engine.workflow_contracts
:members:

.. automodule:: embodichain.gen_sim.task_engine.config
:members:

.. automodule:: embodichain.gen_sim.task_engine.cli
:members:
2 changes: 1 addition & 1 deletion docs/source/overview/sim/atomic_actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ instances to the engine's planning services:
```python
engine = AtomicActionEngine(motion_generator, control_profiles=profiles)

# All eleven built-ins are immediately usable by stable skill ID.
# All twelve built-ins are immediately usable by stable skill ID.
assert "move_end_effector" in engine.actions
assert "pick_up" in engine.actions
```
Expand Down
5 changes: 5 additions & 0 deletions embodichain/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class Command:
target="embodichain.gen_sim.scene_engine.cli.start:main",
help="Generate a scene export from an input image using gen_sim/.env.",
),
Command(
name="task-engine",
target="embodichain.gen_sim.task_engine.cli:main",
help="Run the GenSim task-first scene, planning, and execution workflow.",
),
Command(
name="preview-scene",
target="embodichain.gen_sim.scene_engine.cli.preview:main",
Expand Down
2 changes: 1 addition & 1 deletion embodichain/gen_sim/action_engine/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# ----------------------------------------------------------------------------

"""Command-line entry points for Action Engine generation."""
"""Command-line entry points for Action Engine generation and execution."""

from __future__ import annotations

Expand Down
84 changes: 84 additions & 0 deletions embodichain/gen_sim/task_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

from __future__ import annotations

from typing import Any

from .agent import (
TaskAgent,
TaskGenerationError,
Expand Down Expand Up @@ -58,6 +60,33 @@
task_contract,
task_success_type,
)
from .config import (
TASK_ENGINE_DEFAULTS_SCHEMA,
TaskEngineExecutionCfg,
TaskEnginePlanningCfg,
TaskEngineWorkflowCfg,
load_task_engine_config,
)
from .state_machine import (
StageStatus,
TaskEngineState,
WorkflowStage,
complete_stage,
fail_stage,
initial_state,
replay_events,
skip_stage,
start_stage,
)
from .workflow_contracts import (
TASK_RUN_REQUEST_SCHEMA,
SceneInputKind,
TaskRunRequest,
scene_input_kind,
validate_scene_history_root,
validate_scene_output_separation,
validate_task_run_request,
)

__all__ = [
"INSTRUCTION_INTENT_SCHEMA",
Expand All @@ -80,16 +109,71 @@
"TaskContract",
"TaskDraft",
"TaskGenerationError",
"TASK_RUN_REQUEST_SCHEMA",
"TASK_ENGINE_DEFAULTS_SCHEMA",
"SceneInputKind",
"SceneAnalysis",
"SceneEngineBackend",
"SceneRevision",
"StageStatus",
"TaskEngineState",
"TaskEngineExecutionCfg",
"TaskEnginePlanningCfg",
"TaskEngineWorkflowCfg",
"TaskEngineRunResult",
"TaskEngineWorkflow",
"TaskRunRequest",
"WorkflowStage",
"TASK_ENGINE_RUN_MANIFEST_SCHEMA",
"SubprocessActionExecutor",
"canonical_hash",
"derive_scene_request",
"derive_success_spec",
"complete_stage",
"fail_stage",
"initial_state",
"interpret_instruction_draft",
"load_task_engine_config",
"replay_events",
"task_contract",
"task_success_type",
"scene_input_kind",
"validate_scene_history_root",
"scene_blueprint_objects",
"skip_stage",
"start_stage",
"validate_instruction_intent",
"validate_scene_request",
"validate_scene_output_separation",
"validate_success_spec",
"validate_task_candidate",
"validate_task_candidate_set",
"validate_task_draft",
"validate_task_run_request",
]

_SCENE_BACKEND_EXPORTS = {
"SceneAnalysis",
"SceneEngineBackend",
"SceneRevision",
"scene_blueprint_objects",
}
_WORKFLOW_EXPORTS = {
"TASK_ENGINE_RUN_MANIFEST_SCHEMA",
"SubprocessActionExecutor",
"TaskEngineRunResult",
"TaskEngineWorkflow",
}


def __getattr__(name: str) -> Any:
"""Load orchestration entry points lazily to avoid engine import cycles."""
if name in _SCENE_BACKEND_EXPORTS:
from . import scene_backend

return getattr(scene_backend, name)
if name in _WORKFLOW_EXPORTS:
from . import workflow

return getattr(workflow, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
27 changes: 27 additions & 0 deletions embodichain/gen_sim/task_engine/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2021-2026 DexForce Technology Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------

"""Module entry point for Task Engine workflows."""

from __future__ import annotations

from .cli import main

__all__ = ["main"]


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading