Skip to content

Commit 1c4bdf3

Browse files
committed
Merge branch 'future' of github.com:petercorke/robotics-toolbox-python into future
2 parents fe3946d + 1ca9d9c commit 1c4bdf3

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

roboticstoolbox/backends/PyPlot/EllipsePlot.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
class 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

5554
class 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:

roboticstoolbox/robot/BaseRobot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,13 +2336,13 @@ def plot(
23362336
env.add(self, readonly=True, **kwargs)
23372337

23382338
if vellipse:
2339-
vell = self.vellipse(q, centre="ee")
2339+
vell = self.vellipse(q[0], centre="ee")
23402340
env.add(vell)
23412341
else:
23422342
vell = None
23432343

23442344
if fellipse:
2345-
fell = self.fellipse(q, centre="ee")
2345+
fell = self.fellipse(q[0], centre="ee")
23462346
env.add(fell)
23472347
else:
23482348
fell = None

roboticstoolbox/robot/IK.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def solve(
241241
if isinstance(Tep, SE3):
242242
Tep: np.ndarray = Tep.A
243243

244+
if Tep.shape != (4, 4):
245+
raise ValueError("Tep must be a 4x4 SE3 matrix")
246+
244247
# Iteration count
245248
i = 0
246249
total_i = 0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy