-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathspoons_in_pot.py
More file actions
43 lines (36 loc) · 1.75 KB
/
spoons_in_pot.py
File metadata and controls
43 lines (36 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: CC-BY-NC-4.0
from dataclasses import dataclass
import isaaclab.envs.mdp as mdp
from isaaclab.managers import TerminationTermCfg as DoneTerm
from isaaclab.utils import configclass
from robolab.core.scenes.utils import import_scene
from robolab.core.task.conditionals import object_in_container, pick_and_place
from robolab.core.task.task import Task
@configclass
class Terminations:
time_out = DoneTerm(func=mdp.time_out, time_out=True)
success = DoneTerm(
func=object_in_container,
params={"object": ["ladle", "ladle_01", "red_serving_spoon"], "container": "anza_medium", "logical": "all", "tolerance": 0.0, "require_gripper_detached": True}
)
@dataclass
class SpoonsInPotTask(Task):
contact_object_list = ["table", "anza_medium", "ladle", "plate_large", "plate_small", "fork_big", "fork_small", "spatula_13", "spatula_14", "spatula_15", "pink_spaghetti_spoon", "ladle_01", "red_serving_spoon", "green_serving_spoon"]
scene = import_scene("ladle_pot.usda", contact_object_list)
terminations = Terminations
instruction = {
"default": "Put all of the serving spoons with no holes in the pot",
"vague": "Put the spoons with no holes in the pot",
"specific": "Pick up all of the serving spoons (two green, one red) with no holes from the table and place them inside the cooking pot",
}
episode_length_s: int = 180
attributes = ['reorientation', 'semantics', 'affordance']
subtasks = [
pick_and_place(
object=["ladle", "ladle_01", "red_serving_spoon"],
container="anza_medium",
logical="all",
score=1.0
)
]