Skip to content

Commit

Permalink
Hotfix for failing on a vec3f that comes in object parts when object …
Browse files Browse the repository at this point in the history
…parts is empty
  • Loading branch information
cgokmen committed Oct 10, 2023
1 parent 217188b commit 422dbbf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions omnigibson/transition_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ def transition(cls, object_candidates):
# Object parts offset annotation are w.r.t the base link of the whole object.
pos, orn = sliceable_obj.get_position_orientation()

# If it has no parts, silently fail
if not sliceable_obj.metadata["object_parts"]:
continue

# Load object parts
for i, part in enumerate(sliceable_obj.metadata["object_parts"].values()):
# List of dicts gets replaced by {'0':dict, '1':dict, ...}
Expand Down

0 comments on commit 422dbbf

Please sign in to comment.