This project implements Spatial Constraint Planning (SCP) for robotic manipulation tasks within the MuJoCo. It is partially based on the Rekep and supports testing in MimicGen and Robosuite environments.
-
Create a Conda Environment:
conda create -n scp python=3.10 conda activate scp
-
Install SCP Package:
cd scp/ pip install -e .
-
Install MimicGen:
cd ../mimicgen pip install -e .
-
Install Robosuite:
cd ../robosuite pip install -e .
cd scp/scp
python main.py --visualize --use_cached_query
--visualize
: Provides visualization of the planned trajectory.--use_cached_query
: Uses a cached GPT-4o query for faster execution.
-
Configure API Key:
- Edit
config.yaml
in thescp/scp
directory. - Set your OpenAI API key in the
API_KEY
field. - Optionally, modify
API_BASE
.
- Edit
-
Run with Custom Query:
python main.py --visualize
Use the --task
argument to specify tasks.
-
Run a specific task (e.g., Lift):
python main.py --task Lift --visualize
-
Adding New Task Descriptions: For new tasks, add descriptions to
task_descriptions
inconfig.yaml
. Example for "Lift":task_descriptions: Lift: description: "lift the red cube and lift it straight up vertically" env: Lift
description
: Task description.env
: Environment name.