Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mani_skill/envs/tasks/tabletop/pick_clutter_ycb.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ def _load_scene(self, options: dict):
def _sample_target_objects(self):
# note this samples new target objects for every sub-scene
target_objects = []
for i in range(self.num_envs):
selected_obj_idxs = torch.randint(low=0, high=99999, size=(self.num_envs,))
selected_obj_idxs[i] = selected_obj_idxs[i] % len(
self.selectable_target_objects[-1]
selected_obj_idxs = self._batched_episode_rng.randint(low=0, high=99999)
for i, selected_obj_idx in enumerate(selected_obj_idxs):
selected_obj_idx = selected_obj_idx % len(
self.selectable_target_objects[i]
)
target_objects.append(
self.selectable_target_objects[-1][selected_obj_idxs[i]]
self.selectable_target_objects[i][selected_obj_idx]
)
self.target_object = Actor.merge(target_objects, name="target_object")

Expand Down