Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from mees/dummyLink
Browse files Browse the repository at this point in the history
Add check to avoid crash with dummy links
  • Loading branch information
wx405557858 authored Apr 26, 2021
2 parents a93a065 + 8c5e1c5 commit d9b6a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tacto/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ def add_object(self, urdf_fn, obj_id, globalScaling=1.0):
robot = URDF.load(urdf_fn)

for link_id, link in enumerate(robot.links):
if len(link.visuals) == 0:
continue
link_id = link_id - 1

# Get each links
visual = link.visuals[0]
obj_trimesh = visual.geometry.meshes[0]
Expand Down

0 comments on commit d9b6a8b

Please sign in to comment.