Skip to content

Commit

Permalink
guard against empty element.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
yck011522 committed Oct 30, 2024
1 parent 2a45bf8 commit 0ff399a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compas_robots/model/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def _extract_link_meshes(self, link_elements, meshes_at_link_origin=True):
# Note: Each Link can have multiple visual nodes
for element in link_elements:
# Some elements may have a non-identity origin frame
origin = element.origin.to_compas_frame()
origin = element.origin.to_compas_frame() if element.origin else Frame.worldXY()
t_origin = Transformation.from_frame(origin)
# If `meshes_at_link_origin` is False, we use an identity transformation
t_origin = t_origin if meshes_at_link_origin else Transformation()
Expand Down

0 comments on commit 0ff399a

Please sign in to comment.