pub struct PluckerTransform {
pub rotation: PlukerRotation,
pub translation: Vec3,
}Expand description
A spatial transform using Plücker coordinates.
Fields§
§rotation: PlukerRotationThe rotation component of the spatial transform (E).
This is a 3×3 rotation matrix that transforms angular components from the parent/reference frame to the child/local frame.
translation: Vec3The translation component of the spatial transform (r).
This is a 3D vector representing the position of the child frame origin relative to the parent frame origin, expressed in parent frame coordinates.
Implementations§
Source§impl PluckerTransform
impl PluckerTransform
Sourcepub fn identity() -> Self
pub fn identity() -> Self
Create an identity PluckerTransform.
Returns a transform with no rotation or translation.
Sourcepub fn from_pose(pose: Pose) -> Self
pub fn from_pose(pose: Pose) -> Self
Create a plucker transform from a pose. The returned transform converts from parent to local.
Sourcepub fn mul_transform(&self, rhs: &PluckerTransform) -> PluckerTransform
pub fn mul_transform(&self, rhs: &PluckerTransform) -> PluckerTransform
Multiply this transform by another transform.
Computes the composition of two transforms: result = self * rhs where rhs is applied first, then self.
The formula is: X1 * X2 = plx(E1E2, r2 + E2^T r1)
Sourcepub fn inverse(&self) -> PluckerTransform
pub fn inverse(&self) -> PluckerTransform
Compute the inverse of the transform.
Returns a transform that undoes this transform when applied.
The formula is: X^-1 = plx(E^T, -Er)
Sourcepub fn transform_motion_vec(
&self,
v: SpatialMotionVector,
) -> SpatialMotionVector
pub fn transform_motion_vec( &self, v: SpatialMotionVector, ) -> SpatialMotionVector
Transform a spatial motion vector from parent frame to child frame.
Transforms a 6D motion vector containing angular and linear velocity components. The formula is: X * v^ = mv(Ew, E(v - r x w))
§Arguments
v- Spatial motion vector in parent frame coordinates
§Returns
Spatial motion vector in child frame coordinates
Sourcepub fn inverse_transform_motion_vec(
&self,
v: SpatialMotionVector,
) -> SpatialMotionVector
pub fn inverse_transform_motion_vec( &self, v: SpatialMotionVector, ) -> SpatialMotionVector
Transform a spatial motion vector from child frame to parent frame.
This is the inverse operation of transform_motion_vec.
The formula is: X^-1 * v^ = mv(E^T w, E^T v + r x E^T w)
§Arguments
v- Spatial motion vector in child frame coordinates
§Returns
Spatial motion vector in parent frame coordinates
Sourcepub fn transform_force_vec(&self, f: SpatialForceVector) -> SpatialForceVector
pub fn transform_force_vec(&self, f: SpatialForceVector) -> SpatialForceVector
Transform a spatial force vector from parent frame to child frame.
Transforms a 6D force vector containing moment (torque) and force components. The formula is: X * f = fv(E(n - r x f), Ef)
§Arguments
f- Spatial force vector in parent frame coordinates
§Returns
Spatial force vector in child frame coordinates
Sourcepub fn inverse_transform_force_vec(
&self,
f: SpatialForceVector,
) -> SpatialForceVector
pub fn inverse_transform_force_vec( &self, f: SpatialForceVector, ) -> SpatialForceVector
Sourcepub fn transform_point(&self, point: Vec3) -> Vec3
pub fn transform_point(&self, point: Vec3) -> Vec3
Transform a point from reference frame to local
Sourcepub fn transform_vec3(&self, vec3: Vec3) -> Vec3
pub fn transform_vec3(&self, vec3: Vec3) -> Vec3
Transform a 3D vector from reference frame to local frame.
Applies only the rotation component of the transform, ignoring translation. This is appropriate for transforming directions and vectors that represent
Sourcepub fn inverse_transform_point(&self, point: Vec3) -> Vec3
pub fn inverse_transform_point(&self, point: Vec3) -> Vec3
Transform a point from local frame to reference frame
Sourcepub fn inverse_transform_vec3(&self, vec3: Vec3) -> Vec3
pub fn inverse_transform_vec3(&self, vec3: Vec3) -> Vec3
Transform a 3D vector from local frame to reference frame.
Applies only the inverse rotation component of the transform, ignoring translation.
This is the inverse operation of transform_vec3.
Sourcepub fn inverse_transform_unitvec3(&self, vec3: UnitVec3) -> UnitVec3
pub fn inverse_transform_unitvec3(&self, vec3: UnitVec3) -> UnitVec3
Transform a unit vector from local frame to reference frame.
Applies only the inverse rotation component of the transform, ignoring translation. The input vector is assumed to be normalized and will remain normalized.
Sourcepub fn transform_articulated_inertia(
&self,
inertia: &ArticulatedBodyInertia,
) -> ArticulatedBodyInertia
pub fn transform_articulated_inertia( &self, inertia: &ArticulatedBodyInertia, ) -> ArticulatedBodyInertia
Transform an articulated body inertia from parent frame to child frame.
Transforms a 6×6 articulated body inertia matrix using the similarity transform:
I_child = X * I_parent * Xᵀ
The formula involves three components:
- Mass matrix: M = E * M * Eᵀ
- Coriolis matrix: H = E * (H - r * M) * Eᵀ
- Rotational inertia: I = E * (I - r×Hᵀ + (H - r×M)r×) * Eᵀ
§Arguments
inertia- Articulated body inertia in parent frame coordinates
§Returns
Articulated body inertia in child frame coordinates
Sourcepub fn matrix(&self) -> SMatrix<6, 6>
pub fn matrix(&self) -> SMatrix<6, 6>
Convert the Plücker transform to a 6×6 matrix representation.
Returns the full 6×6 spatial transform matrix:
| E 0 |
X = | |
| -E×r E |where E is the 3×3 rotation matrix and r is the translation vector. This matrix can be used for direct multiplication with 6D vectors.
Sourcepub fn dual_matrix(&self) -> SMatrix<6, 6>
pub fn dual_matrix(&self) -> SMatrix<6, 6>
Convert the Plücker transform to its dual matrix representation.
Returns the dual transform matrix where the translation component appears in the top-right block instead of the bottom-left block:
| E -E×r |
X* = | |
| 0 E |The dual matrix is the transpose inverse of the regular matrix. This representation is useful for transforming certain spatial quantities.
Sourcepub fn is_near_identity(&self, epsilon: Real) -> bool
pub fn is_near_identity(&self, epsilon: Real) -> bool
Check whether the transform is close to identity. Check whether the transform is close to identity.
Returns true if both the rotation angle and translation magnitude are below the given epsilon threshold.
§Arguments
epsilon- Maximum allowed deviation from identity
§Returns
True if the transform is approximately identity
Source§impl PluckerTransform
impl PluckerTransform
Sourcepub fn pose(&self) -> Pose
pub fn pose(&self) -> Pose
Convert the Plücker transform to a pose.
Returns a pose that represents the same transformation but with the rotation component inverted to match pose conventions. This is because poses typically represent the transformation from local to world space, while Plücker transforms represent the transformation from parent to child frame.
Trait Implementations§
Source§impl Clone for PluckerTransform
impl Clone for PluckerTransform
Source§fn clone(&self) -> PluckerTransform
fn clone(&self) -> PluckerTransform
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluckerTransform
impl Debug for PluckerTransform
Source§impl Default for PluckerTransform
impl Default for PluckerTransform
Source§impl From<Pose> for PluckerTransform
impl From<Pose> for PluckerTransform
Source§impl Mul<&ArticulatedBodyInertia> for PluckerTransform
impl Mul<&ArticulatedBodyInertia> for PluckerTransform
Source§type Output = ArticulatedBodyInertia
type Output = ArticulatedBodyInertia
* operator.Source§fn mul(self, rhs: &ArticulatedBodyInertia) -> ArticulatedBodyInertia
fn mul(self, rhs: &ArticulatedBodyInertia) -> ArticulatedBodyInertia
* operation. Read moreSource§impl Mul<SpatialVector<Force>> for PluckerTransform
impl Mul<SpatialVector<Force>> for PluckerTransform
Source§type Output = SpatialVector<Force>
type Output = SpatialVector<Force>
* operator.Source§fn mul(self, rhs: SpatialForceVector) -> SpatialForceVector
fn mul(self, rhs: SpatialForceVector) -> SpatialForceVector
* operation. Read moreSource§impl Mul<SpatialVector<Motion>> for PluckerTransform
impl Mul<SpatialVector<Motion>> for PluckerTransform
Source§type Output = SpatialVector<Motion>
type Output = SpatialVector<Motion>
* operator.Source§fn mul(self, rhs: SpatialMotionVector) -> SpatialMotionVector
fn mul(self, rhs: SpatialMotionVector) -> SpatialMotionVector
* operation. Read moreSource§impl Mul for PluckerTransform
impl Mul for PluckerTransform
Source§impl PartialEq for PluckerTransform
impl PartialEq for PluckerTransform
impl Copy for PluckerTransform
impl StructuralPartialEq for PluckerTransform
Auto Trait Implementations§
impl Freeze for PluckerTransform
impl RefUnwindSafe for PluckerTransform
impl Send for PluckerTransform
impl Sync for PluckerTransform
impl Unpin for PluckerTransform
impl UnwindSafe for PluckerTransform
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<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.