Skip to main content

SE3

Struct SE3 

Source
pub struct SE3 { /* private fields */ }
Expand description

SE(3) group element representing rigid body transformations in 3D.

Represented as a combination of SO(3) rotation and Vector3 translation.

Implementations§

Source§

impl SE3

Source

pub const DIM: usize = 3

Space dimension - dimension of the ambient space that the group acts on

Source

pub const DOF: usize = 6

Degrees of freedom - dimension of the tangent space

Source

pub const REP_SIZE: usize = 7

Representation size - size of the underlying data representation

Source

pub fn identity() -> SE3

Get the identity element of the group.

Returns the neutral element e such that e ∘ g = g ∘ e = g for any group element g.

Source

pub fn jacobian_identity() -> Matrix<f64, Const<6>, Const<6>, ArrayStorage<f64, 6, 6>>

Get the identity matrix for Jacobians.

Returns the identity matrix in the appropriate dimension for Jacobian computations.

Source

pub fn new( translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, rotation: Unit<Quaternion<f64>>, ) -> SE3

Create a new SE3 element from translation and rotation.

§Arguments
  • translation - Translation vector [x, y, z]
  • rotation - Unit quaternion representing rotation
Source

pub fn from_translation_quaternion( translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, quaternion: Quaternion<f64>, ) -> SE3

Create SE3 from translation components and Euler angles.

Source

pub fn from_translation_euler( x: f64, y: f64, z: f64, roll: f64, pitch: f64, yaw: f64, ) -> SE3

Create SE3 from translation components and Euler angles.

Source

pub fn from_isometry(isometry: Isometry<f64, Unit<Quaternion<f64>>, 3>) -> SE3

Create SE3 directly from an Isometry3.

Source

pub fn from_translation_so3( translation: Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, rotation: SO3, ) -> SE3

Create SE3 from SO3 and Vector3 components.

Source

pub fn translation( &self, ) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>

Get the translation part as a Vector3.

Source

pub fn rotation_so3(&self) -> SO3

Get the rotation part as SO3.

Source

pub fn rotation_quaternion(&self) -> Unit<Quaternion<f64>>

Get the rotation part as a UnitQuaternion.

Source

pub fn isometry(&self) -> Isometry<f64, Unit<Quaternion<f64>>, 3>

Get as an Isometry3 (convenience method).

Source

pub fn matrix(&self) -> Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>

Get the transformation matrix (4x4 homogeneous matrix).

Source

pub fn x(&self) -> f64

Get the x component of translation.

Source

pub fn y(&self) -> f64

Get the y component of translation.

Source

pub fn z(&self) -> f64

Get the z component of translation.

Source

pub fn coeffs(&self) -> [f64; 7]

Get coefficients as array [tx, ty, tz, qw, qx, qy, qz].

Trait Implementations§

Source§

impl Clone for SE3

Source§

fn clone(&self) -> SE3

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for SE3

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>> for SE3

Source§

fn from(data: Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>) -> SE3

Converts to this type from the input type.
Source§

impl LieGroup for SE3

Source§

fn inverse( &self, jacobian: Option<&mut <SE3 as LieGroup>::JacobianMatrix>, ) -> SE3

Get the inverse.

§Arguments
  • jacobian - Optional Jacobian matrix of the inverse wrt this.
§Notes
§Equation 170: Inverse of SE(3) matrix

M⁻¹ = [ Rᵀ -Rᵀt ] [ 0 1 ]

§Equation 176: Jacobian of inverse operation

J_M⁻¹_M = - [ R [t]ₓ R ] [ 0 R ]

Source§

fn compose( &self, other: &SE3, jacobian_self: Option<&mut <SE3 as LieGroup>::JacobianMatrix>, jacobian_other: Option<&mut <SE3 as LieGroup>::JacobianMatrix>, ) -> SE3

Composition of this and another SE3 element.

§Arguments
  • other - Another SE3 element.
  • jacobian_self - Optional Jacobian matrix of the composition wrt this.
  • jacobian_other - Optional Jacobian matrix of the composition wrt other.
§Notes
§Equation 171: Composition of SE(3) matrices

M_a M_b = [ R_aR_b R_at_b + t_a ] [ 0 1 ]

§Equation 177: Jacobian of the composition wrt self.

J_MaMb_Ma = [ R_bᵀ -R_bᵀ*[t_b]ₓ ] [ 0 R_bᵀ ]

§Equation 178: Jacobian of the composition wrt other.

J_MaMb_Mb = I_6

Source§

fn log( &self, jacobian: Option<&mut <SE3 as LieGroup>::JacobianMatrix>, ) -> <SE3 as LieGroup>::TangentVector

Get the SE3 corresponding Lie algebra element in vector form.

§Arguments
  • jacobian - Optional Jacobian matrix of the tangent wrt to this.
§Notes
§Equation 173: SE(3) logarithmic map

τ = log(M) = [ V⁻¹(θ) t ] [ Log(R) ]

§Equation 174: V(θ) function for SE(3) Log/Exp maps

V(θ) = I + (1 - cos θ)/θ² [θ]ₓ + (θ - sin θ)/θ³ [θ]ₓ²

Source§

fn vee(&self) -> <SE3 as LieGroup>::TangentVector

Vee operator: log(g)^∨.

Maps a group element g ∈ G to its tangent vector log(g)^∨ ∈ 𝔤. For SE(3), this is the same as log().

Source§

fn is_approx(&self, other: &SE3, tolerance: f64) -> bool

Check if the element is approximately equal to another element.

§Arguments
  • other - The other element to compare with
  • tolerance - The tolerance for the comparison
Source§

type TangentVector = SE3Tangent

The tangent space vector type
Source§

type JacobianMatrix = Matrix<f64, Const<6>, Const<6>, ArrayStorage<f64, 6, 6>>

The Jacobian matrix type
Source§

type LieAlgebra = Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>

Associated Lie algebra type
Source§

fn act( &self, vector: &Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>, jacobian_self: Option<&mut <SE3 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>>

Act on a vector v: g ⊙ v. Read more
Source§

fn adjoint(&self) -> <SE3 as LieGroup>::JacobianMatrix

Adjoint matrix Ad(g). Read more
Source§

fn random() -> SE3

Generate a random element (useful for testing and initialization).
Source§

fn jacobian_identity() -> <SE3 as LieGroup>::JacobianMatrix

Get the identity matrix for Jacobians. Read more
Source§

fn zero_jacobian() -> <SE3 as LieGroup>::JacobianMatrix

Get a zero Jacobian matrix. Read more
Source§

fn normalize(&mut self)

Normalize/project the element to the manifold. Read more
Source§

fn is_valid(&self, tolerance: f64) -> bool

Check if the element is approximately on the manifold.
Source§

fn right_plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self

Right plus operation: g ⊞ φ = g ∘ exp(φ^∧). Read more
Source§

fn right_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector

Right minus operation: g₁ ⊟ g₂ = log(g₂⁻¹ ∘ g₁)^∨. Read more
Source§

fn left_plus( &self, tangent: &Self::TangentVector, jacobian_tangent: Option<&mut Self::JacobianMatrix>, jacobian_self: Option<&mut Self::JacobianMatrix>, ) -> Self

Left plus operation: φ ⊞ g = exp(φ^∧) ∘ g. Read more
Source§

fn left_minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector

Left minus operation: g₁ ⊟ g₂ = log(g₁ ∘ g₂⁻¹)^∨. Read more
Source§

fn plus( &self, tangent: &Self::TangentVector, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_tangent: Option<&mut Self::JacobianMatrix>, ) -> Self

Convenience method for right_plus. Equivalent to g ⊞ φ.
Source§

fn minus( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self::TangentVector

Convenience method for right_minus. Equivalent to g₁ ⊟ g₂.
Source§

fn between( &self, other: &Self, jacobian_self: Option<&mut Self::JacobianMatrix>, jacobian_other: Option<&mut Self::JacobianMatrix>, ) -> Self

Compute g₁⁻¹ ∘ g₂ (relative transformation). Read more
Source§

fn tangent_dim(&self) -> usize

Get the dimension of the tangent space for this manifold element. Read more
Source§

impl PartialEq for SE3

Source§

fn eq(&self, other: &SE3) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Tangent<SE3> for SE3Tangent

Source§

const DIM: usize = 6

Dimension of the tangent space

Source§

fn exp(&self, jacobian: Option<&mut <SE3 as LieGroup>::JacobianMatrix>) -> SE3

Get the SE3 element.

§Arguments
  • tangent - Tangent vector [rho, theta]
  • jacobian - Optional Jacobian matrix of the SE3 element wrt this.
§Notes
§Equation 172: SE(3) exponential map

M = exp(τ) = [ R(θ) t(ρ) ] [ 0 1 ]

Source§

fn right_jacobian(&self) -> <SE3 as LieGroup>::JacobianMatrix

Right Jacobian Jr.

Computes the right Jacobian matrix such that for small δφ: exp((φ + δφ)^∧) ≈ exp(φ^∧) ∘ exp((Jr δφ)^∧)

For SE(3), this involves computing Jacobians for both translation and rotation parts.

§Returns

The right Jacobian matrix (6x6)

Source§

fn left_jacobian(&self) -> <SE3 as LieGroup>::JacobianMatrix

Left Jacobian Jl.

Computes the left Jacobian matrix such that for small δφ: exp((φ + δφ)^∧) ≈ exp((Jl δφ)^∧) ∘ exp(φ^∧)

Following manif conventions for SE(3) left Jacobian computation.

§Returns

The left Jacobian matrix (6x6)

Source§

fn right_jacobian_inv(&self) -> <SE3 as LieGroup>::JacobianMatrix

Inverse of right Jacobian Jr⁻¹.

Computes the inverse of the right Jacobian. This is used for computing perturbations and derivatives.

§Numerical Conditioning Warning

This 6×6 Jacobian inverse inherits SO(3) conditioning issues plus scale effects.

Sources of numerical error:

  • Embedded SO(3) rotation: (1 + cos θ) / (2θ sin θ) singularity
  • Q-block coupling: rotation errors propagate to translation
  • Scale amplification: large translations increase absolute error

Expected Precision:

  • Small rotations (θ < 0.01): Jr * Jr⁻¹ ≈ I within ~1e-6
  • Moderate rotations (θ < 0.1): Jr * Jr⁻¹ ≈ I within ~1e-4
  • Larger rotations: Jr * Jr⁻¹ ≈ I within ~0.01

This is a fundamental mathematical limitation consistent with production SLAM libraries. See module documentation for references.

§Returns

The inverse right Jacobian matrix (6x6)

Source§

fn left_jacobian_inv(&self) -> <SE3 as LieGroup>::JacobianMatrix

Inverse of left Jacobian Jl⁻¹.

Computes the inverse of the left Jacobian following manif conventions.

§Numerical Conditioning Warning

This 6×6 Jacobian inverse has the same conditioning issues as the right Jacobian inverse.

Sources of numerical error:

  • Embedded SO(3) rotation: (1 + cos θ) / (2θ sin θ) singularity
  • Q-block coupling: rotation errors propagate to translation
  • Scale amplification: large translations increase absolute error

Expected Precision: Same as right Jacobian inverse (see above).

This is a fundamental mathematical limitation consistent with production SLAM libraries. See module documentation for references.

§Returns

The inverse left Jacobian matrix (6x6)

Source§

fn hat(&self) -> <SE3 as LieGroup>::LieAlgebra

Hat operator: φ^∧ (vector to matrix).

Converts the SE(3) tangent vector to its 4x4 matrix representation in the Lie algebra. Following manif conventions, the structure is: [ theta_× rho ] [ 0 0 ] where theta_× is the skew-symmetric matrix of the rotational part.

§Returns

The 4x4 matrix representation in the SE(3) Lie algebra

Source§

fn zero() -> <SE3 as LieGroup>::TangentVector

Zero tangent vector.

Returns the zero element of the SE(3) tangent space.

§Returns

A 6-dimensional zero vector

Source§

fn random() -> <SE3 as LieGroup>::TangentVector

Random tangent vector (useful for testing).

Generates a random tangent vector with reasonable bounds. Translation components are in [-1, 1] and rotation components in [-0.1, 0.1].

§Returns

A random 6-dimensional tangent vector

Source§

fn is_zero(&self, tolerance: f64) -> bool

Check if the tangent vector is approximately zero.

Compares the norm of the tangent vector to the given tolerance.

§Arguments
  • tolerance - Tolerance for zero comparison
§Returns

True if the norm is below the tolerance

Source§

fn normalize(&mut self)

Normalize the tangent vector to unit norm.

Modifies this tangent vector to have unit norm. If the vector is near zero, it remains unchanged.

Source§

fn normalized(&self) -> <SE3 as LieGroup>::TangentVector

Return a unit tangent vector in the same direction.

Returns a new tangent vector with unit norm in the same direction. If the original vector is near zero, returns zero.

§Returns

A normalized copy of the tangent vector

Source§

fn small_adj(&self) -> <SE3 as LieGroup>::JacobianMatrix

Small adjoint matrix for SE(3).

For SE(3), the small adjoint matrix has the structure: [ Omega V ] [ 0 Omega ] where Omega is the skew-symmetric matrix of the angular part and V is the skew-symmetric matrix of the linear part.

Source§

fn lie_bracket(&self, other: &SE3Tangent) -> <SE3 as LieGroup>::TangentVector

Lie bracket for SE(3).

Computes the Lie bracket [this, other] = this.small_adj() * other.

Source§

fn is_approx(&self, other: &SE3Tangent, tolerance: f64) -> bool

Check if this tangent vector is approximately equal to another.

§Arguments
  • other - The other tangent vector to compare with
  • tolerance - The tolerance for the comparison
Source§

fn generator(&self, i: usize) -> <SE3 as LieGroup>::LieAlgebra

Get the ith generator of the SE(3) Lie algebra.

§Arguments
  • i - Index of the generator (0-5 for SE(3))
§Returns

The generator matrix

Source§

fn is_dynamic() -> bool

Whether this tangent type has dynamic (runtime-determined) dimension. Read more
Source§

impl StructuralPartialEq for SE3

Auto Trait Implementations§

§

impl Freeze for SE3

§

impl RefUnwindSafe for SE3

§

impl Send for SE3

§

impl Sync for SE3

§

impl Unpin for SE3

§

impl UnsafeUnpin for SE3

§

impl UnwindSafe for SE3

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more