Skip to content

Commit

Permalink
Merge pull request #6 from JorenVDL/master
Browse files Browse the repository at this point in the history
fixed Cylinder meshes creation
  • Loading branch information
mmatl authored Mar 16, 2022
2 parents cf8720c + 6682eee commit 5466842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions urdfpy/urdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class Cylinder(URDFType):
def __init__(self, radius, length):
self.radius = radius
self.length = length
self._meshes = None
self._meshes = []

@property
def radius(self):
Expand All @@ -377,7 +377,7 @@ def radius(self):
@radius.setter
def radius(self, value):
self._radius = float(value)
self._meshes = None
self._meshes = []

@property
def length(self):
Expand All @@ -388,7 +388,7 @@ def length(self):
@length.setter
def length(self, value):
self._length = float(value)
self._meshes = None
self._meshes = []

@property
def meshes(self):
Expand All @@ -399,7 +399,7 @@ def meshes(self):
self._meshes = [trimesh.creation.cylinder(
radius=self.radius, height=self.length
)]
return self._mesh
return self._meshes

def copy(self, prefix='', scale=None):
"""Create a deep copy with the prefix applied to all names.
Expand Down

0 comments on commit 5466842

Please sign in to comment.