diff --git a/mani_skill2/envs/tasks/README.md b/mani_skill2/envs/tasks/README.md index fffa92f2e..588d3c017 100644 --- a/mani_skill2/envs/tasks/README.md +++ b/mani_skill2/envs/tasks/README.md @@ -1,5 +1,13 @@ # All new ManiSkill tasks +To add a new task, create either a standalone python file your_task_name.py or folder (useful if you use some custom assets). We recommend using the mani_skill2/envs/template.py file to get started and filling out the code in there and following the comments. + +Moreover, each task is required to come along with a "Task Sheet" which quickly describes some core components of the task, namely +- Randomization: how is the task randomized upon each environment reset? +- Success Conditions: when is the task considered solved? +- Visualization: Link to a gif / video of the task being solved + + Difficulty rankings (training on 4090 GPU): 1 - PPO takes < 2 minutes to train? 2 - PPO takes < 5 minutes diff --git a/mani_skill2/envs/tasks/pick_cube.py b/mani_skill2/envs/tasks/pick_cube.py index 8df2ffb8e..76a880508 100644 --- a/mani_skill2/envs/tasks/pick_cube.py +++ b/mani_skill2/envs/tasks/pick_cube.py @@ -17,6 +17,8 @@ @register_env("PickCube-v1", max_episode_steps=100) class PickCubeEnv(BaseEnv): """ + Task Description + ---------------- A simple task where the objective is to grasp a cube and move it to a target goal position. Randomizations diff --git a/mani_skill2/envs/tasks/push_cube.py b/mani_skill2/envs/tasks/push_cube.py index c1cbf2186..f08fbdfa9 100644 --- a/mani_skill2/envs/tasks/push_cube.py +++ b/mani_skill2/envs/tasks/push_cube.py @@ -37,6 +37,8 @@ @register_env("PushCube-v0", max_episode_steps=50) class PushCubeEnv(BaseEnv): """ + Task Description + ---------------- A simple task where the objective is to push and move a cube to a goal region in front of it Randomizations diff --git a/mani_skill2/envs/template.py b/mani_skill2/envs/template.py index 075c59750..ba240cfca 100644 --- a/mani_skill2/envs/template.py +++ b/mani_skill2/envs/template.py @@ -35,6 +35,23 @@ # register the environment by a unique ID and specify a max time limit. Now once this file is imported you can do gym.make("CustomEnv-v0") @register_env(name="CustomEnv-v0", max_episode_steps=200) class CustomEnv(BaseEnv): + """ + Task Description + ---------------- + Add a task description here + + Randomizations + -------------- + - how is it randomized? + - how is that randomized? + + Success Conditions + ------------------ + - what is done to check if this task is solved? + + Visualization: link to a video/gif of the task being solved + """ + # in the __init__ function you can pick a default robot your task should use e.g. the panda robot def __init__(self, *args, robot_uid="panda", robot_init_qpos_noise=0.02, **kwargs): self.robot_init_qpos_noise = robot_init_qpos_noise