Skip to content

Commit 06ae253

Browse files
committed
fix bug with vellipse/fellipse for 2D robot
1 parent 1c4bdf3 commit 06ae253

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roboticstoolbox/backends/PyPlot/EllipsePlot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def make_ellipsoid2(self):
192192
# A = np.linalg.inv(A)
193193
# except:
194194
# A = np.zeros((2,2))
195+
if self.vell:
196+
# Do the extra step for the velocity ellipse
197+
A = np.linalg.inv(A)
195198

196199
if isinstance(self.centre, str) and self.centre == "ee":
197200
centre = self.robot.fkine(self.q).A[:3, -1]
@@ -204,7 +207,7 @@ def make_ellipsoid2(self):
204207
# RVC2 p 602
205208
# x = sp.linalg.sqrtm(A) @ y
206209

207-
x, y = base.ellipse(A, inverted=True, centre=centre[:2], scale=self.scale)
210+
x, y = base.ellipse(A, inverted=False, centre=centre[:2], scale=self.scale)
208211
self.x = x
209212
self.y = y
210213
# = x[0,:] * self.scale + centre[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