Skip to content

Commit 70986d9

Browse files
committed
don't include gripper in the first anchor phase
1 parent a791ba1 commit 70986d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/rpad/rlbench_utils/placement_dataset.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ def get_anchor_points(
209209
rgb, point_cloud, mask, handle_mapping, BACKGROUND_NAMES
210210
)
211211
elif anchor_mode == AnchorMode.BACKGROUND_ROBOT_REMOVED:
212-
return filter_out_names(
213-
rgb,
214-
point_cloud,
215-
mask,
216-
handle_mapping,
217-
BACKGROUND_NAMES + ROBOT_NONGRIPPER_NAMES,
218-
)
212+
names = BACKGROUND_NAMES + ROBOT_NONGRIPPER_NAMES
213+
214+
# If it's the first phase, we also omit the gripper.
215+
if phase == TASK_DICT[task_name]["phase_order"][0]:
216+
names += GRIPPER_OBJ_NAMES
217+
218+
return filter_out_names(rgb, point_cloud, mask, handle_mapping, names)
219219
elif anchor_mode == AnchorMode.SINGLE_OBJECT:
220220
if use_from_simulator:
221221
return get_rgb_point_cloud_by_object_names(

0 commit comments

Comments
 (0)