Skip to content

Commit 9c676c2

Browse files
committed
feat(scenes): add zed cameras to droid setup
1 parent e8ee101 commit 9c676c2

1 file changed

Lines changed: 73 additions & 3 deletions

File tree

‎python/rcs/envs/configs.py‎

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def config(self) -> SimEnvCreatorConfig:
180180
)
181181

182182
class EmptyWorldDroid(EmptyWorldFR3):
183-
# TODO: add zed cameras
184183

185184
def config(self) -> SimEnvCreatorConfig:
186185
cfg = super().config()
@@ -206,8 +205,79 @@ def config(self) -> SimEnvCreatorConfig:
206205
lead_robot_name: GRIPPER_MOUNT_OFFSETS[rcs.common.GripperType("Robotiq2F85")]
207206
}
208207

209-
cfg.camera_cfgs = None
210-
cfg.camera_adds = None
208+
cfg.robot_frame_objects = {
209+
"right": {
210+
"zed_mount": (
211+
OBJECT_PATHS["droid_wrist_mount"],
212+
rcs.common.Pose(rpy_vector=[-np.pi/2, 0, np.pi/2], translation=[-0.034, 0, -0.008]),
213+
)
214+
},
215+
}
216+
cfg.camera_adds = {
217+
"wrist": CameraAdderConfig(
218+
xml_path=CAMERA_PATHS["zed_mini"],
219+
220+
offset=rcs.common.Pose(
221+
translation=[-0.077, 0.009, -0.008],
222+
rpy_vector=np.deg2rad([0, -70, 0]),
223+
),
224+
robot_name="right",
225+
),
226+
"over_shoulder_left": CameraAdderConfig(
227+
xml_path=CAMERA_PATHS["zed2i"],
228+
offset=rcs.common.Pose(
229+
# values from RoboLab
230+
translation=[0.039831, 0.577923, 0.676088],
231+
quaternion=[-0.415841, 0.851484, 0.287128, -0.140028],
232+
),
233+
),
234+
"over_shoulder_right": CameraAdderConfig(
235+
xml_path=CAMERA_PATHS["zed2i"],
236+
offset=rcs.common.Pose(
237+
# values from RoboLab
238+
translation=[0.039831, -0.577923, 0.676088],
239+
quaternion=[0.851484, -0.415841, -0.140028, 0.287128],
240+
),
241+
),
242+
"front": CameraAdderConfig(
243+
xml_path=CAMERA_PATHS["zed2i"],
244+
offset=rcs.common.Pose(
245+
# values from head camera in RoboLab
246+
translation=[1.51669, -0.005, 1.01102],
247+
quaternion=[0.335028, 0.622701, 0.622701, -0.335028],
248+
),
249+
),
250+
}
251+
cfg.camera_cfgs = {
252+
"over_shoulder_left": SimCameraConfig(
253+
identifier="over_shoulder_left",
254+
type=CameraType.fixed,
255+
resolution_width=1280,
256+
resolution_height=720,
257+
frame_rate=30,
258+
),
259+
"over_shoulder_right": SimCameraConfig(
260+
identifier="over_shoulder_right",
261+
type=CameraType.fixed,
262+
resolution_width=1280,
263+
resolution_height=720,
264+
frame_rate=30,
265+
),
266+
"front": SimCameraConfig(
267+
identifier="front",
268+
type=CameraType.fixed,
269+
resolution_width=1280,
270+
resolution_height=720,
271+
frame_rate=30,
272+
),
273+
"wrist": SimCameraConfig(
274+
identifier="wrist",
275+
type=CameraType.fixed,
276+
resolution_width=1280,
277+
resolution_height=720,
278+
frame_rate=30,
279+
),
280+
}
211281

212282
return cfg
213283

0 commit comments

Comments
 (0)