Struct k::node::JointRefGuard

source ·
pub struct JointRefGuard<'a, T>
where T: RealField,
{ /* private fields */ }

Methods from Deref<Target = Joint<T>>§

source

pub fn joint_position(&self) -> Option<T>

Returns the position (angle)

source

pub fn origin(&self) -> &Isometry3<T>

source

pub fn joint_velocity(&self) -> Option<T>

Returns the velocity

source

pub fn local_transform(&self) -> Isometry3<T>

Calculate and returns the transform of the end of this joint

§Examples
use nalgebra as na;

// Create linear joint with X-axis
let mut lin = k::Joint::<f64>::new("l0", k::JointType::Linear { axis: na::Vector3::x_axis() });
assert_eq!(lin.local_transform().translation.vector.x, 0.0);
lin.set_joint_position(-1.0).unwrap();
assert_eq!(lin.local_transform().translation.vector.x, -1.0);
source

pub fn world_transform(&self) -> Option<Isometry3<T>>

Get the result of forward kinematics

The value is updated by Chain::update_transforms

source

pub fn world_velocity(&self) -> Option<Velocity<T>>

source

pub fn is_movable(&self) -> bool

source

pub fn clear_caches(&self)

Clear caches defined in the world coordinate

Trait Implementations§

source§

impl<'a, T> Debug for JointRefGuard<'a, T>
where T: RealField + Debug,

source§

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

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

impl<T> Deref for JointRefGuard<'_, T>
where T: RealField,

source§

type Target = Joint<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'a, T> Freeze for JointRefGuard<'a, T>

§

impl<'a, T> RefUnwindSafe for JointRefGuard<'a, T>

§

impl<'a, T> !Send for JointRefGuard<'a, T>

§

impl<'a, T> !Sync for JointRefGuard<'a, T>

§

impl<'a, T> Unpin for JointRefGuard<'a, T>

§

impl<'a, T> UnwindSafe for JointRefGuard<'a, T>

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> 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> 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, 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<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