pub struct SpatialMotion(pub Matrix<f64, Const<6>, Const<1>, ArrayStorage<f64, 6, 1>>);Expand description
Spatial motion vector, combining linear and angular velocity components.
The first three elements represent linear velocity, and the last three represent angular velocity.
Tuple Fields§
§0: Matrix<f64, Const<6>, Const<1>, ArrayStorage<f64, 6, 1>>Implementations§
Source§impl SpatialMotion
impl SpatialMotion
Sourcepub fn from_rotational_axis(axis: &Vector3D) -> SpatialMotion
pub fn from_rotational_axis(axis: &Vector3D) -> SpatialMotion
Creates a new SpatialMotion from a 3D rotational axis (for revolute and continuous joints).
Sourcepub fn from_translational_axis(axis: &Vector3D) -> SpatialMotion
pub fn from_translational_axis(axis: &Vector3D) -> SpatialMotion
Creates a new SpatialMotion from a 3D translational axis (for prismatic joints).
Sourcepub fn rotation(&self) -> Vector3D
pub fn rotation(&self) -> Vector3D
Extracts the rotation (angular velocity) component of the spatial motion.
Sourcepub fn translation(&self) -> Vector3D
pub fn translation(&self) -> Vector3D
Extracts the translation (linear velocity) component of the spatial motion.
Sourcepub fn zero() -> SpatialMotion
pub fn zero() -> SpatialMotion
Zero spatial motion (no motion).
Sourcepub fn from_parts(linear: Vector3D, angular: Vector3D) -> SpatialMotion
pub fn from_parts(linear: Vector3D, angular: Vector3D) -> SpatialMotion
Creates a SpatialMotion from linear and angular components.
§Arguments
linear- The linear velocity component (3D vector).angular- The angular velocity component (3D vector).
Sourcepub fn from_vector6d(v: Vector6D) -> SpatialMotion
pub fn from_vector6d(v: Vector6D) -> SpatialMotion
Creates a SpatialMotion from a 6D vector.
§Arguments
v- The 6D vector representing spatial motion; the first three elements are linear, the last three are angular.
Sourcepub fn cross(&self, other: &SpatialMotion) -> SpatialMotion
pub fn cross(&self, other: &SpatialMotion) -> SpatialMotion
Sourcepub fn cross_force(&self, other: &SpatialForce) -> SpatialForce
pub fn cross_force(&self, other: &SpatialForce) -> SpatialForce
Sourcepub fn cross_star(&self, other: &SpatialMotion) -> SpatialMotion
pub fn cross_star(&self, other: &SpatialMotion) -> SpatialMotion
Sourcepub fn inner(&self, other: &SpatialMotion) -> f64
pub fn inner(&self, other: &SpatialMotion) -> f64
Computes the inner product of two spatial motion vectors.
Trait Implementations§
Source§impl ActSE3 for SpatialMotion
impl ActSE3 for SpatialMotion
Source§fn act(&self, se3: &SE3) -> SpatialMotion
fn act(&self, se3: &SE3) -> SpatialMotion
Applies the SE(3) transformation to the object.
Source§fn act_inv(&self, se3: &SE3) -> SpatialMotion
fn act_inv(&self, se3: &SE3) -> SpatialMotion
Applies the inverse SE(3) transformation to the object.
Source§impl Add<&SpatialMotion> for SpatialMotion
impl Add<&SpatialMotion> for SpatialMotion
Source§type Output = SpatialMotion
type Output = SpatialMotion
The resulting type after applying the
+ operator.Source§fn add(
self,
rhs: &SpatialMotion,
) -> <SpatialMotion as Add<&SpatialMotion>>::Output
fn add( self, rhs: &SpatialMotion, ) -> <SpatialMotion as Add<&SpatialMotion>>::Output
Performs the
+ operation. Read moreSource§impl Add<SpatialMotion> for &SpatialMotion
impl Add<SpatialMotion> for &SpatialMotion
Source§type Output = SpatialMotion
type Output = SpatialMotion
The resulting type after applying the
+ operator.Source§fn add(
self,
rhs: SpatialMotion,
) -> <&SpatialMotion as Add<SpatialMotion>>::Output
fn add( self, rhs: SpatialMotion, ) -> <&SpatialMotion as Add<SpatialMotion>>::Output
Performs the
+ operation. Read moreSource§impl Add for SpatialMotion
impl Add for SpatialMotion
Source§type Output = SpatialMotion
type Output = SpatialMotion
The resulting type after applying the
+ operator.Source§fn add(self, rhs: SpatialMotion) -> <SpatialMotion as Add>::Output
fn add(self, rhs: SpatialMotion) -> <SpatialMotion as Add>::Output
Performs the
+ operation. Read moreSource§impl AddAssign<&SpatialMotion> for SpatialMotion
impl AddAssign<&SpatialMotion> for SpatialMotion
Source§fn add_assign(&mut self, rhs: &SpatialMotion)
fn add_assign(&mut self, rhs: &SpatialMotion)
Performs the
+= operation. Read moreSource§impl AddAssign for SpatialMotion
impl AddAssign for SpatialMotion
Source§fn add_assign(&mut self, rhs: SpatialMotion)
fn add_assign(&mut self, rhs: SpatialMotion)
Performs the
+= operation. Read moreSource§impl Clone for SpatialMotion
impl Clone for SpatialMotion
Source§fn clone(&self) -> SpatialMotion
fn clone(&self) -> SpatialMotion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpatialMotion
impl Debug for SpatialMotion
Source§impl Default for SpatialMotion
impl Default for SpatialMotion
Source§fn default() -> SpatialMotion
fn default() -> SpatialMotion
Returns the “default value” for a type. Read more
Source§impl Display for SpatialMotion
impl Display for SpatialMotion
Source§impl Mul<f64> for &SpatialMotion
impl Mul<f64> for &SpatialMotion
Source§impl Mul<f64> for SpatialMotion
impl Mul<f64> for SpatialMotion
Source§impl PartialEq for SpatialMotion
impl PartialEq for SpatialMotion
impl StructuralPartialEq for SpatialMotion
Auto Trait Implementations§
impl Freeze for SpatialMotion
impl RefUnwindSafe for SpatialMotion
impl Send for SpatialMotion
impl Sync for SpatialMotion
impl Unpin for SpatialMotion
impl UnsafeUnpin for SpatialMotion
impl UnwindSafe for SpatialMotion
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
Mutably borrows from an owned value. Read more
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.