We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7d35d0 commit 2c027ffCopy full SHA for 2c027ff
robot/transform.py
@@ -14,6 +14,26 @@
14
from numpy.linalg import norm
15
import robot.Quaternion as Q
16
17
+def se2(a, b=0, c=0, varargin="rad"):
18
+ """
19
+ P 22
20
+ which represents a translation of (a, b) and a rotation of c.
21
22
+ if isinstance(a,(list,ndarray)) and len(a) == 3:
23
+ x,y,th = a
24
+ else:
25
+ x,y,th = a,b,c
26
+
27
+ if varargin == "deg": th = deg2rad(th)
28
+ cth = cos(th)
29
+ sth = sin(th)
30
+ R = mat([[cth,-sth],
31
+ [sth,cth]])
32
+ t = eye(3)
33
+ t[:2,:2] = R
34
+ t[:2,2] = [x, y]
35
+ return t
36
37
def rotx(theta):
38
"""
39
Rotation about X-axis
0 commit comments