Skip to content

Commit

Permalink
Temporary patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hang-yin committed Oct 1, 2024
1 parent cc2ad85 commit a3f97f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions omnigibson/sensors/vision_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,7 @@ def _remap_instance_segmentation(self, img, id_to_labels, semantic_img, semantic
key = int(key)
if value in ["BACKGROUND", "UNLABELLED"]:
value = value.lower()
else:
assert "/" in value, f"Instance segmentation (ID) label {value} is not a valid prim path!"
elif "/" in value:
prim_name = value.split("/")[-1]
# Hacky way to get the particles of MacroVisual/PhysicalParticleSystem
# Remap instance segmentation and instance segmentation ID labels to system name
Expand All @@ -440,6 +439,9 @@ def _remap_instance_segmentation(self, img, id_to_labels, semantic_img, semantic
# Keep the instance segmentation ID labels intact (prim paths of visual meshes)
else:
pass
else:
# TODO: This is a temporary fix unexpected labels e.g. INVALID introduced in new Isaac Sim versions
value = "unlabelled"

self._register_instance(value, id=id)
replicator_mapping[key] = value
Expand Down

0 comments on commit a3f97f6

Please sign in to comment.