sym.unit3 module¶
- class Unit3(rot3=None)[source]¶
Bases:
object
Autogenerated Python implementation of
symforce.geo.unit3.Unit3
.Direction in R^3, represented as a
Rot3
that transforms [0, 0, 1] to the desired direction.The storage is therefore a quaternion and the tangent space is 2 dimensional. Most operations are implemented using operations from
Rot3
.Note: an alternative implementation could directly store a unit vector and define its boxplus manifold as described in Appendix B.2 of [Hertzberg 2013]. This can be done by finding the Householder reflector of x and use it to transform the exponential map of delta, which is a small perturbation in the tangent space (R^2). Namely:
x.retract(delta) = x [+] delta = Rx * Exp(delta), where Exp(delta) = [sinc(||delta||) * delta, cos(||delta||)], and Rx = (I - 2 vv^T / (v^Tv))X, v = x - e_z != 0, X is a matrix negating 2nd vector component = I , x = e_z
[Hertzberg 2013] Integrating Generic Sensor Fusion Algorithms with Sound State Representations through Encapsulation of Manifolds
- Parameters:
rot3 (T.Optional[Rot3]) –
- static from_vector(a, epsilon)[source]¶
Return a
Unit3
that points along the direction of vectora
a
does not have to be a unit vector.
- to_unit_vector()[source]¶
This function was autogenerated from a symbolic function. Do not modify by hand.
Symbolic function: to_unit_vector
Args:
- Outputs:
res: Matrix31
- Return type:
- to_rotation()[source]¶
This function was autogenerated from a symbolic function. Do not modify by hand.
Symbolic function: to_rotation
Args:
- Outputs:
res: Rot3
- Return type: