Traceback (most recent call last):
File "./test.py", line 33, in <module>
robot.show(cfg=config)
File "/Users/kevin/pyvenv/cv/lib/python3.7/site-packages/urdfpy/urdf.py", line 3540, in show
fk = self.visual_trimesh_fk(cfg=cfg)
File "/Users/kevin/pyvenv/cv/lib/python3.7/site-packages/urdfpy/urdf.py", line 3197, in visual_trimesh_fk
for mesh in visual.geometry.meshes:
File "/Users/kevin/pyvenv/cv/lib/python3.7/site-packages/urdfpy/urdf.py", line 734, in meshes
return self.geometry.meshes
File "/Users/kevin/pyvenv/cv/lib/python3.7/site-packages/urdfpy/urdf.py", line 396, in meshes
if len(self._meshes) == 0:
TypeError: object of type 'NoneType' has no len()
I am using python 3.7 on macOS 10.15 and just installed urdfpy
Python
#!/usr/bin/env python
from urdfpy import URDF
from math import pi
def deg2rad(x):
return x*pi/180
robot = URDF.load("kevin.urdf")
config = {
"joint1": deg2rad(45),
"joint2": deg2rad(45),
"joint3": deg2rad(90),
"joint4": deg2rad(-45)
}
fk = robot.link_fk(cfg=config)
for k in robot.links:
print('-'*25)
print(k.name)
print(fk[k])
for j in robot.joints:
print('-'*25)
print('{}: {} to {}'.format(j.name, j.parent, j.child))
# print(j.name)
# print(dir(j))
# print(j.origin)
# print(dir(j.origin))
robot.show(cfg=config)
I just started to work with this an made a simple urdf with 4 links. I am using simple cylinders for the geometry:
however when I run it, I get the following error:
I am using python 3.7 on macOS 10.15 and just installed
urdfpy
Python
urdf