<
10000
button class="Button Button--iconOnly Button--invisible ExpandableHunkHeaderDiffLine-module__expand-button-line--wZKjF ExpandableHunkHeaderDiffLine-module__expand-button-unified--Eae6C" aria-label="Expand file up from line 12" data-direction="up" aria-hidden="true" tabindex="-1">
@@ -12,7 +12,6 @@
12
12
13
13
class ShapePlot :
14
14
def __init__ (self , shape , wireframe = True , ** kwargs ):
15
-
16
15
self .shape = shape # reference to the spatialgeom shape
17
16
self .wireframe = wireframe
18
17
self .args = kwargs
@@ -54,7 +53,6 @@ def make(self):
54
53
55
54
class EllipsePlot :
56
55
def __init__ (self , robot , q , etype , opt = "trans" , centre = [0 , 0 , 0 ], scale = 1.0 ):
57
-
58
56
super (EllipsePlot , self ).__init__ ()
59
57
60
58
try :
@@ -65,7 +63,7 @@ def __init__(self, robot, q, etype, opt="trans", centre=[0, 0, 0], scale=1.0):
65
63
except TypeError :
66
64
if centre != "ee" :
67
65
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"
69
67
)
70
68
71
69
self .ell = None
@@ -91,7 +89,11 @@ def draw(self):
91
89
self .make_ellipsoid ()
92
90
93
91
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)
95
97
96
98
self .ell = self .ax .plot_wireframe (
97
99
self .x , self .y , self .z , rstride = 6 , cstride = 6 , color = "#2980b9" , alpha = 0.2
@@ -181,7 +183,7 @@ def make_ellipsoid2(self):
181
183
A = J @ J .T
182
184
elif self .opt == "rot" :
183
185
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'"
185
187
)
186
188
187
189
# if not self.vell:
0 commit comments