Closed JorenVDL closed 2 years ago
Thanks, this fixed the issue with loading my urdf as well. For reference, here is the error I get without this patch:
robot.show()
File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 3543, in show
fk = self.visual_trimesh_fk(cfg=cfg)
File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 3200, in visual_trimesh_fk
for mesh in visual.geometry.meshes:
File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 736, in meshes
return self.geometry.meshes
File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 396, in meshes
if len(self._meshes) == 0:
TypeError: object of type 'NoneType' has no len()
I can confirm this pull request fixed the problem. Please merge.
self._meshes was set to None instead of []. And in def meshes, self._mesh was returned instead of self._meshes