Skip to content

Commit cc44c22

Browse files
Merge pull request #655 from ARISE-Initiative/allow-base-type-specification
Allow base_type specification in manipulation envs
2 parents 76842f9 + 1843171 commit cc44c22

6 files changed

Lines changed: 46 additions & 4 deletions

File tree

robosuite/environments/manipulation/door.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class Door(ManipulationEnv):
3333
overrides the default gripper. Should either be single str if same gripper type is to be used for all
3434
robots or else it should be a list of the same length as "robots" param
3535
36+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
37+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
38+
None results in no base, and any other (valid) model overrides the default base. Should either be
39+
single str if same base type is to be used for all robots or else it should be a list of the same
40+
length as "robots" param
41+
3642
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
3743
The expected keys and corresponding value types are specified below:
3844
@@ -138,6 +144,7 @@ def __init__(
138144
env_configuration="default",
139145
controller_configs=None,
140146
gripper_types="default",
147+
base_types="default",
141148
initialization_noise="default",
142149
use_latch=True,
143150
use_camera_obs=True,
@@ -183,7 +190,7 @@ def __init__(
183190
robots=robots,
184191
env_configuration=env_configuration,
185192
controller_configs=controller_configs,
186-
base_types="default",
193+
base_types=base_types,
187194
gripper_types=gripper_types,
188195
initialization_noise=initialization_noise,
189196
use_camera_obs=use_camera_obs,

robosuite/environments/manipulation/lift.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class Lift(ManipulationEnv):
3535
overrides the default gripper. Should either be single str if same gripper type is to be used for all
3636
robots or else it should be a list of the same length as "robots" param
3737
38+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
39+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
40+
None results in no base, and any other (valid) model overrides the default base. Should either be
41+
single str if same base type is to be used for all robots or else it should be a list of the same
42+
length as "robots" param
43+
3844
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
3945
The expected keys and corresponding value types are specified below:
4046
@@ -142,6 +148,7 @@ def __init__(
142148
env_configuration="default",
143149
controller_configs=None,
144150
gripper_types="default",
151+
base_types="default",
145152
initialization_noise="default",
146153
table_full_size=(0.8, 0.8, 0.05),
147154
table_friction=(1.0, 5e-3, 1e-4),

robosuite/environments/manipulation/pick_place.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class PickPlace(ManipulationEnv):
4444
overrides the default gripper. Should either be single str if same gripper type is to be used for all
4545
robots or else it should be a list of the same length as "robots" param
4646
47+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
48+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
49+
None results in no base, and any other (valid) model overrides the default base. Should either be
50+
single str if same base type is to be used for all robots or else it should be a list of the same
51+
length as "robots" param
52+
4753
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
4854
The expected keys and corresponding value types are specified below:
4955
@@ -173,6 +179,7 @@ def __init__(
173179
env_configuration="default",
174180
controller_configs=None,
175181
gripper_types="default",
182+
base_types="default",
176183
initialization_noise="default",
177184
table_full_size=(0.39, 0.49, 0.82),
178185
table_friction=(1, 0.005, 0.0001),
@@ -238,7 +245,7 @@ def __init__(
238245
robots=robots,
239246
env_configuration=env_configuration,
240247
controller_configs=controller_configs,
241-
base_types="default",
248+
base_types=base_types,
242249
gripper_types=gripper_types,
243250
initialization_noise=initialization_noise,
244251
use_camera_obs=use_camera_obs,

robosuite/environments/manipulation/stack.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class Stack(ManipulationEnv):
3535
overrides the default gripper. Should either be single str if same gripper type is to be used for all
3636
robots or else it should be a list of the same length as "robots" param
3737
38+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
39+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
40+
None results in no base, and any other (valid) model overrides the default base. Should either be
41+
single str if same base type is to be used for all robots or else it should be a list of the same
42+
length as "robots" param
43+
3844
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
3945
The expected keys and corresponding value types are specified below:
4046
@@ -142,6 +148,7 @@ def __init__(
142148
env_configuration="default",
143149
controller_configs=None,
144150
gripper_types="default",
151+
base_types="default",
145152
initialization_noise="default",
146153
table_full_size=(0.8, 0.8, 0.05),
147154
table_friction=(1.0, 5e-3, 1e-4),
@@ -188,7 +195,7 @@ def __init__(
188195
robots=robots,
189196
env_configuration=env_configuration,
190197
controller_configs=controller_configs,
191-
base_types="default",
198+
base_types=base_types,
192199
gripper_types=gripper_types,
193200
initialization_noise=initialization_noise,
194201
use_camera_obs=use_camera_obs,

robosuite/environments/manipulation/tool_hang.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ class ToolHang(ManipulationEnv):
3636
overrides the default gripper. Should either be single str if same gripper type is to be used for all
3737
robots or else it should be a list of the same length as "robots" param
3838
39+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
40+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
41+
None results in no base, and any other (valid) model overrides the default base. Should either be
42+
single str if same base type is to be used for all robots or else it should be a list of the same
43+
length as "robots" param
44+
3945
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
4046
The expected keys and corresponding value types are specified below:
4147
@@ -139,6 +145,7 @@ def __init__(
139145
env_configuration="default",
140146
controller_configs=None,
141147
gripper_types="default",
148+
base_types="default",
142149
initialization_noise="default",
143150
table_full_size=(0.8, 0.8, 0.05),
144151
table_friction=(1.0, 5e-3, 1e-4),
@@ -181,7 +188,7 @@ def __init__(
181188
robots=robots,
182189
env_configuration=env_configuration,
183190
controller_configs=controller_configs,
184-
base_types="default",
191+
base_types=base_types,
185192
gripper_types=gripper_types,
186193
initialization_noise=initialization_noise,
187194
use_camera_obs=use_camera_obs,

robosuite/environments/manipulation/wipe.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ class Wipe(ManipulationEnv):
6565
For this environment, setting a value other than the default ("WipingGripper") will raise an
6666
AssertionError, as this environment is not meant to be used with any other alternative gripper.
6767
68+
base_types (None or str or list of str): type of base, used to instantiate base models from base factory.
69+
Default is "default", which is the default base associated with the robot(s) the 'robots' specification.
70+
None results in no base, and any other (valid) model overrides the default base. Should either be
71+
single str if same base type is to be used for all robots or else it should be a list of the same
72+
length as "robots" param
73+
6874
initialization_noise (dict or list of dict): Dict containing the initialization noise parameters.
6975
The expected keys and corresponding value types are specified below:
7076
@@ -169,6 +175,7 @@ def __init__(
169175
env_configuration="default",
170176
controller_configs=None,
171177
gripper_types="WipingGripper",
178+
base_types="default",
172179
initialization_noise="default",
173180
use_camera_obs=True,
174181
use_object_obs=True,

0 commit comments

Comments
 (0)