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
This package implements various 3D rotation parameterizations and defines
13
-
conversions between them. At their heart, each rotation parameterization*is*
12
+
This package implements various 3D rotation parametrizations and defines
13
+
conversions between them. At their heart, each rotation parametrization*is*
14
14
a 3×3 unitary (orthogonal) matrix (based on the [StaticArrays.jl package](https://github.com/JuliaArrays/StaticArrays.jl)),
15
15
and acts to rotate a 3-vector about the origin through matrix-vector multiplication.
16
16
17
17
While the `RotMatrix` type is a dense representation of a `3×3` matrix, we also
18
18
have sparse (or computed, rather) representations such as quaternions,
19
-
angle-axis parameterizations, and Euler angles.
19
+
angle-axis parametrizations, and Euler angles.
20
20
21
21
For composing rotations about the origin with other transformations, see
22
22
the [CoordinateTransformations.jl](https://github.com/JuliaGeometry/CoordinateTransformations.jl)
23
23
package.
24
24
25
25
### Interface
26
-
The following operations are supported by all of the implemented rotation parameterizations.
26
+
The following operations are supported by all of the implemented rotation parametrizations.
27
27
28
28
#### Composition
29
29
Any two rotations of the same type can be composed with simple multiplication:
@@ -49,22 +49,22 @@ r = q\r2
49
49
```
50
50
51
51
#### Rotation Angle / Axis
52
-
The rotation angle and axis can be obtained for any rotation parameterization using
52
+
The rotation angle and axis can be obtained for any rotation parametrization using
53
53
```julia
54
54
rotation_axis(r::Rotation)
55
55
rotation_angle(r::Rotation)
56
56
```
57
57
58
58
#### Initialization
59
-
All rotation types support `one(R)` to construct the identity rotation for the desired parameterization. A random rotation, uniformly sampled over the space of rotations, can be sampled using `rand(R)`. For example:
59
+
All rotation types support `one(R)` to construct the identity rotation for the desired parametrization. A random rotation, uniformly sampled over the space of rotations, can be sampled using `rand(R)`. For example:
60
60
```julia
61
61
r =one(QuatRotation) # equivalent to QuatRotation(1.0, 0.0, 0.0, 0.0)
62
62
q =rand(QuatRotation)
63
63
p =rand(MRP{Float32})
64
64
```
65
65
66
66
#### Conversion
67
-
All rotatations can be converted to another parameterization by simply calling the constructor for the desired parameterization. For example:
67
+
All rotations can be converted to another parametrization by simply calling the constructor for the desired parametrization. For example:
A composition of 3 cardinal axis rotations is typically known as a Euler
197
-
angle parameterization of a 3D rotation. The rotations with 3 unique axes,
197
+
angle parametrization of a 3D rotation. The rotations with 3 unique axes,
198
198
such as `RotXYZ`, are said to follow the [**Tait Bryan**](https://en.wikipedia.org/wiki/Euler_angles#Tait.E2.80.93Bryan_angles) angle ordering,
199
199
while those which repeat (e.g. `EulerXYX`) are said to use [**Proper Euler**](https://en.wikipedia.org/wiki/Euler_angles#Conventions) angle ordering.
200
200
201
201
Like the two-angle versions, the order of application to a vector is right-to-left, so that `RotXYZ(x, y, z) * v == RotX(x) * (RotY(y) * (RotZ(z) * v))`. This may be interpreted as an "extrinsic" rotation about the Z, Y, and X axes or as an "intrinsic" rotation about the X, Y, and Z axes. Similarly, `RotZYX(z, y, x)` may be interpreted as an "extrinsic" rotation about the X, Y, and Z axes or an "intrinsic" rotation about the Z, Y, and X axes.
202
202
203
203
### The Rotation Error state and Linearization
204
-
It is often convenient to consider perturbations or errors about a particular 3D rotation, such as applications in state estimation or optimization-based control. Intuitively, we expect these errors to live in three-dimensional space. For globally non-singular parameterizations such as unit quaternions, we need a way to map between the four parameters of the quaternion to this three-dimensional plane tangent to the four-dimensional hypersphere on which quaternions live.
204
+
It is often convenient to consider perturbations or errors about a particular 3D rotation, such as applications in state estimation or optimization-based control. Intuitively, we expect these errors to live in three-dimensional space. For globally non-singular parametrizations such as unit quaternions, we need a way to map between the four parameters of the quaternion to this three-dimensional plane tangent to the four-dimensional hypersphere on which quaternions live.
205
205
206
206
There are several of these maps provided by Rotations.jl:
207
207
*`ExponentialMap`: A very common mapping that uses the quaternion
@@ -210,7 +210,7 @@ converts a 3D rotation vector (i.e. axis-angle vector) to a unit quaternion.
210
210
It tends to be the most computationally expensive mapping.
211
211
212
212
*`CayleyMap`: Represents the differential quaternion using Rodrigues
213
-
parameters. This parameterization goes singular at 180° but does not
213
+
parameters. This parametrization goes singular at 180° but does not
214
214
inherit the sign ambiguities of the unit quaternion. It offers an
215
215
excellent combination of cheap computation and good behavior.
216
216
@@ -221,7 +221,7 @@ differential unit quaternion. This mapping goes singular at 360°.
221
221
differential unit quaternion. This mapping also goes singular at 180° but is
222
222
the computationally cheapest map and often performs well.
223
223
224
-
Rotations.jl provides the `RotationError` type for representing rotation errors, that act just like a `SVector{3}` but carry the nonlinear map used to compute the error, which can also be used to convert the error back to a `QuatRotation` (and, by extention, any other 3D rotation parameterization). The following methods are useful for computing `RotationError`s and adding them back to the nominal rotation:
224
+
Rotations.jl provides the `RotationError` type for representing rotation errors, that act just like a `SVector{3}` but carry the non-linear map used to compute the error, which can also be used to convert the error back to a `QuatRotation` (and, by extension, any other 3D rotation parametrization). The following methods are useful for computing `RotationError`s and adding them back to the nominal rotation:
225
225
```julia
226
226
rotation_error(R1::Rotation, R2::Rotation, error_map::ErrorMap) # compute the error between `R1` and `R2` using `error_map`
227
227
add_error(R::Rotation, err::RotationError) # "adds" the error to `R` by converting back a `UnitQuaterion` and composing with `R`
@@ -246,7 +246,7 @@ respect to the infinitesimal rotation. For unit quaternions, this is a 4x3 matri
246
246
247
247
### Import / Export
248
248
249
-
All parameterizations can be converted to and from (mutable or immutable)
249
+
All parametrizations can be converted to and from (mutable or immutable)
Copy file name to clipboardExpand all lines: docs/src/3d_quaternion.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ using Rotations
5
5
```
6
6
7
7
## `QuatRotation`
8
-
A 3D rotation parameterized by a unit [quaternion](https://en.wikipedia.org/wiki/Quaternion) ([versor](https://en.wikipedia.org/wiki/Versor)).
8
+
A 3D rotation parametrized by a unit [quaternion](https://en.wikipedia.org/wiki/Quaternion) ([versor](https://en.wikipedia.org/wiki/Versor)).
9
9
Note that the constructor will renormalize the quaternion to be a unit quaternion, and that although they follow the same multiplicative *algebra* as quaternions, it is better to think of `QuatRotation` as a ``3 \times 3`` matrix rather than as a quaternion *number*.
Returns the jacobian for transforming from the input rotation parameterization
28
-
to the output parameterization, centered at the value of R.
27
+
Returns the Jacobian for transforming from the input rotation parametrization
28
+
to the output parametrization, centered at the value of R.
29
29
30
30
jacobian(R::rotation_type, X::AbstractVector)
31
31
Returns the jacobian for rotating the vector X by R.
@@ -221,11 +221,11 @@ end
221
221
#
222
222
"""
223
223
1) hessian(::Type{output_param}, R::input_param)
224
-
Returns the 2nd order partial derivatives for transforming from the input rotation parameterization to the output parameterization, centered at the value of R.
225
-
The output is an N vector of DxD matrices, where N and D are the number of parameters in the output and input parameterizations respectively.
224
+
Returns the 2nd order partial derivatives for transforming from the input rotation parametrization to the output parametrization, centered at the value of R.
225
+
The output is an N vector of DxD matrices, where N and D are the number of parameters in the output and input parametrizations respectively.
226
226
2) hessian(R::rotation_type, X::AbstractVector)
227
227
Returns the 2nd order partial derivatives for rotating the vector X by R.
228
-
The output is an 3 vector of DxD matrices, where D is the number of parameters of the rotation parameterization.
228
+
The output is an 3 vector of DxD matrices, where D is the number of parameters of the rotation parametrization.
0 commit comments