Skip to content

Commit 27321c5

Browse files
committed
add failure case
1 parent 84f84f0 commit 27321c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rpad/rlbench_utils/placement_dataset.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def load_state_pos_dict(
202202

203203
def filter_out_names(rgb, point_cloud, mask, handlemapping, names=BACKGROUND_NAMES):
204204
# Get the indices of the background.
205-
background_handles = [handlemapping[name] for name in names]
205+
background_handles = [
206+
handlemapping[name] for name in names if name in handlemapping
207+
]
206208
background_handles.append(65535) # It's -1, cast as uint16.
207209
background_indices = np.isin(mask, background_handles).reshape((-1))
208210

0 commit comments

Comments
 (0)