pub struct SO2 { /* private fields */ }Expand description
SO(2) group element representing rotations in 2D.
Internally represented using nalgebra’s UnitComplex
Implementations§
Source§impl SO2
impl SO2
Sourcepub const DIM: usize = 2
pub const DIM: usize = 2
Space dimension - dimension of the ambient space that the group acts on
Sourcepub fn identity() -> SO2
pub fn identity() -> SO2
Get the identity element of the group.
Returns the neutral element e such that e ∘ g = g ∘ e = g for any group element g.
Sourcepub fn jacobian_identity() -> Matrix<f64, Const<1>, Const<1>, ArrayStorage<f64, 1, 1>>
pub fn jacobian_identity() -> Matrix<f64, Const<1>, Const<1>, ArrayStorage<f64, 1, 1>>
Get the identity matrix for Jacobians.
Returns the identity matrix in the appropriate dimension for Jacobian computations.
Sourcepub fn new(complex: Unit<Complex<f64>>) -> SO2
pub fn new(complex: Unit<Complex<f64>>) -> SO2
Create a new SO(2) element from a unit complex number.
§Arguments
complex- Unit complex number representing rotation
Sourcepub fn from_angle(angle: f64) -> SO2
pub fn from_angle(angle: f64) -> SO2
Sourcepub fn rotation_matrix(
&self,
) -> Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>
pub fn rotation_matrix( &self, ) -> Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>
Get the rotation matrix (2x2).
Trait Implementations§
Source§impl LieGroup for SO2
impl LieGroup for SO2
Source§fn compose(
&self,
other: &SO2,
jacobian_self: Option<&mut <SO2 as LieGroup>::JacobianMatrix>,
jacobian_other: Option<&mut <SO2 as LieGroup>::JacobianMatrix>,
) -> SO2
fn compose( &self, other: &SO2, jacobian_self: Option<&mut <SO2 as LieGroup>::JacobianMatrix>, jacobian_other: Option<&mut <SO2 as LieGroup>::JacobianMatrix>, ) -> SO2
Source§fn log(
&self,
jacobian: Option<&mut <SO2 as LieGroup>::JacobianMatrix>,
) -> <SO2 as LieGroup>::TangentVector
fn log( &self, jacobian: Option<&mut <SO2 as LieGroup>::JacobianMatrix>, ) -> <SO2 as LieGroup>::TangentVector
Source§fn act(
&self,
vector: &Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>,
_jacobian_self: Option<&mut <SO2 as LieGroup>::JacobianMatrix>,
_jacobian_vector: Option<&mut Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>>,
) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
fn act( &self, vector: &Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, _jacobian_self: Option<&mut <SO2 as LieGroup>::JacobianMatrix>, _jacobian_vector: Option<&mut Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>>, ) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>
Rotation action on a 3-vector.
§Arguments
v- A 3-vector.jacobian_self- Optional Jacobian of the new object wrt this.jacobian_vector- Optional Jacobian of the new object wrt input object.
§Returns
The rotated 3-vector.
§Notes
This is a convenience function that treats the 3D vector as a 2D vector and ignores the z component.
Source§fn vee(&self) -> <SO2 as LieGroup>::TangentVector
fn vee(&self) -> <SO2 as LieGroup>::TangentVector
Vee operator: log(g)^∨.
Maps a group element g ∈ G to its tangent vector log(g)^∨ ∈ 𝔤. For SO(2), this is the same as log().
Source§fn is_approx(&self, other: &SO2, tolerance: f64) -> bool
fn is_approx(&self, other: &SO2, tolerance: f64) -> bool
Check if the element is approximately equal to another element.
§Arguments
other- The other element to compare withtolerance- The tolerance for the comparison
Source§type TangentVector = SO2Tangent
type TangentVector = SO2Tangent
Source§type JacobianMatrix = Matrix<f64, Const<1>, Const<1>, ArrayStorage<f64, 1, 1>>
type JacobianMatrix = Matrix<f64, Const<1>, Const<1>, ArrayStorage<f64, 1, 1>>
Source§type LieAlgebra = Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>
type LieAlgebra = Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>
Source§fn jacobian_identity() -> <SO2 as LieGroup>::JacobianMatrix
fn jacobian_identity() -> <SO2 as LieGroup>::JacobianMatrix
Source§fn zero_jacobian() -> <SO2 as LieGroup>::JacobianMatrix
fn zero_jacobian() -> <SO2 as LieGroup>::JacobianMatrix
Source§fn right_plus(
&self,
tangent: &Self::TangentVector,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
) -> Self
fn right_plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn right_minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn right_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn left_plus(
&self,
tangent: &Self::TangentVector,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
jacobian_self: Option<&mut Self::JacobianMatrix>,
) -> Self
fn left_plus( &self, tangent: &Self::TangentVector, jacobian_tangent: Option<&mut Self::JacobianMatrix>, jacobian_self: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn left_minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn left_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn plus(
&self,
tangent: &Self::TangentVector,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_tangent: Option<&mut Self::JacobianMatrix>,
) -> Self
fn plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn minus(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self::TangentVector
fn minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector
Source§fn between(
&self,
other: &Self,
jacobian_self: Option<&mut Self::JacobianMatrix>,
jacobian_other: Option<&mut Self::JacobianMatrix>,
) -> Self
fn between( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self
Source§fn tangent_dim(&self) -> usize
fn tangent_dim(&self) -> usize
Source§impl Tangent<SO2> for SO2Tangent
impl Tangent<SO2> for SO2Tangent
Source§fn exp(&self, jacobian: Option<&mut <SO2 as LieGroup>::JacobianMatrix>) -> SO2
fn exp(&self, jacobian: Option<&mut <SO2 as LieGroup>::JacobianMatrix>) -> SO2
SO2 exponential map.
§Arguments
tangent- Tangent vector (angle)jacobian- Optional Jacobian matrix of the SE(3) element wrt this.
Source§fn right_jacobian(&self) -> <SO2 as LieGroup>::JacobianMatrix
fn right_jacobian(&self) -> <SO2 as LieGroup>::JacobianMatrix
Right Jacobian for SO(2) is identity.
Source§fn left_jacobian(&self) -> <SO2 as LieGroup>::JacobianMatrix
fn left_jacobian(&self) -> <SO2 as LieGroup>::JacobianMatrix
Left Jacobian for SO(2) is identity.
Source§fn right_jacobian_inv(&self) -> <SO2 as LieGroup>::JacobianMatrix
fn right_jacobian_inv(&self) -> <SO2 as LieGroup>::JacobianMatrix
Inverse of right Jacobian for SO(2) is identity.
Source§fn left_jacobian_inv(&self) -> <SO2 as LieGroup>::JacobianMatrix
fn left_jacobian_inv(&self) -> <SO2 as LieGroup>::JacobianMatrix
Inverse of left Jacobian for SO(2) is identity.
Source§fn hat(&self) -> <SO2 as LieGroup>::LieAlgebra
fn hat(&self) -> <SO2 as LieGroup>::LieAlgebra
Hat operator: θ^∧ (scalar to skew-symmetric matrix).
Source§fn zero() -> SO2Tangent
fn zero() -> SO2Tangent
Zero tangent vector for SO2
Source§fn random() -> SO2Tangent
fn random() -> SO2Tangent
Random tangent vector for SO2
Source§fn normalized(&self) -> SO2Tangent
fn normalized(&self) -> SO2Tangent
Return a unit tangent vector in the same direction.
Source§fn small_adj(&self) -> <SO2 as LieGroup>::JacobianMatrix
fn small_adj(&self) -> <SO2 as LieGroup>::JacobianMatrix
Small adjoint matrix for SO(2).
For SO(2), the small adjoint is zero (since it’s commutative).
Source§fn lie_bracket(&self, _other: &SO2Tangent) -> <SO2 as LieGroup>::TangentVector
fn lie_bracket(&self, _other: &SO2Tangent) -> <SO2 as LieGroup>::TangentVector
Lie bracket for SO(2).
For SO(2), the Lie bracket is always zero since it’s commutative.
Source§fn is_approx(&self, other: &SO2Tangent, tolerance: f64) -> bool
fn is_approx(&self, other: &SO2Tangent, tolerance: f64) -> bool
Check if this tangent vector is approximately equal to another.
§Arguments
other- The other tangent vector to compare withtolerance- The tolerance for the comparison
Source§fn is_dynamic() -> bool
fn is_dynamic() -> bool
impl StructuralPartialEq for SO2
Auto Trait Implementations§
impl Freeze for SO2
impl RefUnwindSafe for SO2
impl Send for SO2
impl Sync for SO2
impl Unpin for SO2
impl UnsafeUnpin for SO2
impl UnwindSafe for SO2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.