An end-to-end LLM-powered task generation pipeline for robotic manipulation
Assets → Registries → LLM task spec → HumanCheck layout → Outputs
- Overview
- Quick Start
- Model API / Keys
- Assets
- Core Scripts
- Outputs
- File Structure
- Notes / Dependencies
- Acknowledgement
TaskGen is designed to:
- Manage and register assets into
taskgen_json/registries. - Generate manipulation tasks in JSON + PKL + Python task class, optionally human-check layouts in a UI.
- Support multiple LLM providers such as OpenAI, DeepSeek, and custom OpenAI-compatible endpoints.
All model-provider configuration is centralized in taskgen/model_api.py.
- Tabletop Task Generation
taskgen_demo_tabletop.mp4
- Complex Layout Task Generation
taskgen_demo_multi_obj.mp4
- Prepare assets - Register assets into
taskgen_json/and adjust initial poses if needed. - Generate tasks - Use
gpt_gen.pyto create a task spec and initial layout. - HumanCheck (optional) - Use
gpt_layout_adjust.pyto manually adjust object positions. - Integrate & Use - Use the generated task files in your simulation environment.
git clone <repo-url>
cd AxisTaskGenTaskGen uses the OpenAI Python SDK for chat-completions, but the provider is selected via
taskgen/model_api.py and/or environment variables.
Generic override, works for any OpenAI-compatible base URL:
export MODEL_API_KEY="..."
export MODEL_BASE_URL="https://api.openai.com/v1" # or yourV custom endpoint
export MODEL_MODEL="gpt-4o-2024-08-06" # or "deepseek-chat"Optional tuning:
export MODEL_TEMPERATURE=0.3
export MODEL_MAX_TOKENS=8192
export MODEL_SLEEP_S=0.0python gpt_gen.pypython gpt_layout_adjust.py --prompt "Put the ketchup into the basket" --human-checkThe generated JSON, PKL, and Python files can be integrated into your simulation environment.
All provider logic is centralized in taskgen/model_api.py
You can configure TaskGen in two ways.
Edit taskgen/model_api.py and set:
ACTIVE_PROFILE = "openai" # or "deepseek"Generic override (works for any compatible base URL):
export MODEL_API_KEY="..."
export MODEL_BASE_URL="https://api.openai.com/v1" # or your custom endpoint
export MODEL_MODEL="gpt-4o-2024-08-06" # or "deepseek-chat"Provider-specific variables:
# OpenAI
export MODEL_PROFILE=openai
export OPENAI_API_KEY="..."
export OPENAI_BASE_URL="https://api.openai.com/v1"
export OPENAI_MODEL="gpt-4o-2024-08-06"
# DeepSeek
export MODEL_PROFILE=deepseek
export DEEPSEEK_API_KEY="..."
export DEEPSEEK_BASE_URL="https://api.deepseek.com/"
export DEEPSEEK_MODEL="deepseek-chat"TaskGen expects each asset to follow this layout:
<asset_name>/
mesh/ # meshes + materials + textures
mjcf/model.xml # MJCF for MuJoCo
urdf/model.urdf # optional
usd/model.usd # optional
description.txt # optional
TaskGen-managed assets are registered in taskgen_json/ directory with references to:
- Rigid assets
- Articulated assets
Use gpt_gen.py for automatic task generation:
python gpt_gen.pyThis will:
- Interactively select environment and asset categories
- Generate task specification via LLM
- Create initial object layout
- Output: JSON task config, PKL trajectory init state, Python task class
Use gpt_layout_adjust.py to generate a task and optionally launch the manual layout tool:
python gpt_layout_adjust.py --prompt "Put the ketchup into the basket" --human-checkThis allows you to:
- Generate a task from a natural language prompt
- Open an interactive UI to manually adjust object positions
- Save the corrected layout back to JSON/PKL
Use taskgen/manage_asset.py to classify assets into categories and register them into taskgen_json/ registries:
python taskgen/manage_asset.py <path_to_assets> --object-type rigidOptions:
--object-type: Chooserigidorarticulated- The script uses LLM to automatically categorize assets
Use taskgen/physical_pose_adjust.py when an asset loads with incorrect initial position/rotation/scale:
python taskgen/physical_pose_adjust.pyThis opens an interactive viewer and writes the corrected init state back into taskgen_json/ detail JSON.
Tip: Run manage_asset.py first to register assets.
Use taskgen/manage_gpt_task.py for interactive cleanup of generated tasks:
python taskgen/manage_gpt_task.pyThis provides a TUI (Text User Interface) to:
- Browse generated tasks
- Delete unwanted tasks
- Clean up the task registry
Generated task files are placed in configurable output directories:
- Task JSON config: Contains task specification, object list, and initial poses
- Task PKL (trajectory init state): Serialized initial state for simulation
- Task Python class: Executable task class for integration
Axis_Task_Gen/
├── gpt_gen.py # Main task generator
├── gpt_layout_adjust.py # HumanCheck UI
├── taskgen/
│ ├── __init__.py
│ ├── manage_asset.py # Asset classification & registration
│ ├── manage_gpt_task.py # Task cleanup TUI
│ ├── physical_pose_adjust.py # Asset pose adjustment tool
│ └── model_api.py # LLM provider configuration
└── taskgen_json/ # Asset registries
- Common Python deps:
openai,trimesh, and others depending on your simulation backend - For asset processing, additional tools may be needed, e.g.,
urdf2mjcffor URDF conversion. - If you see auth/provider issues, check:
taskgen/model_api.py- Your env vars (
MODEL_*,OPENAI_*,DEEPSEEK_*)
This project is built upon RoboVerse. We gratefully acknowledge the RoboVerse project and its contributors for providing the foundational infrastructure that made this work possible.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.