You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spatialmath/base/README.md
+10-17
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ import spatialmath as sm
21
21
22
22
R = sm.SO3.Rx(30, 'deg')
23
23
print(R)
24
-
1 0 0
25
-
0 0.866025 -0.5
26
-
0 0.5 0.866025
24
+
1 0 0
25
+
0 0.866025 -0.5
26
+
0 0.5 0.866025
27
27
```
28
28
which constructs a rotation about the x-axis by 30 degrees.
29
29
@@ -45,7 +45,7 @@ array([[ 1. , 0. , 0. ],
45
45
[ 0. , 0.29552021, 0.95533649]])
46
46
47
47
>>> rotx(30, unit='deg')
48
-
Out[438]:
48
+
Out[438]:
49
49
array([[ 1. , 0. , 0. ],
50
50
[ 0. , 0.8660254, -0.5 ],
51
51
[ 0. , 0.5 , 0.8660254]])
@@ -64,7 +64,7 @@ We also support multiple ways of passing vector information to functions that re
64
64
65
65
```
66
66
transl2(1, 2)
67
-
Out[442]:
67
+
Out[442]:
68
68
array([[1., 0., 1.],
69
69
[0., 1., 2.],
70
70
[0., 0., 1.]])
@@ -74,13 +74,13 @@ array([[1., 0., 1.],
74
74
75
75
```
76
76
transl2( [1,2] )
77
-
Out[443]:
77
+
Out[443]:
78
78
array([[1., 0., 1.],
79
79
[0., 1., 2.],
80
80
[0., 0., 1.]])
81
81
82
82
transl2( (1,2) )
83
-
Out[444]:
83
+
Out[444]:
84
84
array([[1., 0., 1.],
85
85
[0., 1., 2.],
86
86
[0., 0., 1.]])
@@ -90,7 +90,7 @@ array([[1., 0., 1.],
90
90
91
91
```
92
92
transl2( np.array([1,2]) )
93
-
Out[445]:
93
+
Out[445]:
94
94
array([[1., 0., 1.],
95
95
[0., 1., 2.],
96
96
[0., 0., 1.]])
@@ -129,7 +129,7 @@ Using classes ensures type safety, for example it stops us mixing a 2D homogeneo
129
129
These classes are all derived from two parent classes:
130
130
131
131
*`RTBPose` which provides common functionality for all
132
-
*`UserList` which provdides the ability to act like a list
132
+
*`UserList` which provdides the ability to act like a list
133
133
134
134
The latter is important because frequnetly in robotics we want a sequence, a trajectory, of rotation matrices or poses. However a list of these items has the type `list` and the elements are not enforced to be homogeneous, ie. a list could contain a mixture of classes.
135
135
@@ -178,7 +178,7 @@ Out[259]: int
178
178
179
179
a = T[1,1]
180
180
a
181
-
Out[256]:
181
+
Out[256]:
182
182
cos(theta)
183
183
type(a)
184
184
Out[255]: cos
@@ -226,10 +226,3 @@ TypeError: can't convert expression to float
0 commit comments