1212
1313class ShapePlot :
1414 def __init__ (self , shape , wireframe = True , ** kwargs ):
15-
1615 self .shape = shape # reference to the spatialgeom shape
1716 self .wireframe = wireframe
1817 self .args = kwargs
@@ -54,7 +53,6 @@ def make(self):
5453
5554class EllipsePlot :
5655 def __init__ (self , robot , q , etype , opt = "trans" , centre = [0 , 0 , 0 ], scale = 1.0 ):
57-
5856 super (EllipsePlot , self ).__init__ ()
5957
6058 try :
@@ -65,7 +63,7 @@ def __init__(self, robot, q, etype, opt="trans", centre=[0, 0, 0], scale=1.0):
6563 except TypeError :
6664 if centre != "ee" :
6765 raise ValueError (
68- "Centre must be a three vector or 'ee' meaning" "end -effector"
66+ "Centre must be a three vector or 'ee' meaningend -effector"
6967 )
7068
7169 self .ell = None
@@ -91,7 +89,11 @@ def draw(self):
9189 self .make_ellipsoid ()
9290
9391 if self .ell is not None :
94- self .ax .collections .remove (self .ell )
92+ self .ell .remove ()
93+ # print(type(self.ell))
94+ # print(type(self.ax))
95+ # assert True == False
96+ # self.ax.collections.remove(self.ell)
9597
9698 self .ell = self .ax .plot_wireframe (
9799 self .x , self .y , self .z , rstride = 6 , cstride = 6 , color = "#2980b9" , alpha = 0.2
@@ -181,7 +183,7 @@ def make_ellipsoid2(self):
181183 A = J @ J .T
182184 elif self .opt == "rot" :
183185 raise ValueError (
184- "Can not do rotational ellipse for a 2d robot plot." " Set opt='trans'"
186+ "Can not do rotational ellipse for a 2d robot plot. Set opt='trans'"
185187 )
186188
187189 # if not self.vell:
0 commit comments