Struct k::joint::Mimic [−][src]
Information for copying joint state of other joint
For example, Mimic
is used to calculate the position of the gripper(R) from
gripper(L). In that case, the code like below will be used.
let mimic_for_gripper_r = k::joint::Mimic::new(-1.0, 0.0);
output position (mimic_position() is calculated by joint positions = joint[name] * multiplier + origin
Fields
multiplier: T
origin: T
Implementations
impl<T> Mimic<T> where
T: RealField,
[src]
T: RealField,
pub fn new(multiplier: T, origin: T) -> Self
[src]
pub fn mimic_position(&self, from_position: T) -> T
[src]
Calculate the mimic joint position
Examples
let m = k::joint::Mimic::<f64>::new(1.0, 0.5); assert_eq!(m.mimic_position(0.2), 0.7); // 0.2 * 1.0 + 0.5
let m = k::joint::Mimic::<f64>::new(-2.0, -0.4); assert_eq!(m.mimic_position(0.2), -0.8); // 0.2 * -2.0 - 0.4
Trait Implementations
impl<T: Clone + RealField> Clone for Mimic<T>
[src]
impl<T: Debug + RealField> Debug for Mimic<T>
[src]
impl<'a, T> From<&'a Mimic> for Mimic<T> where
T: RealField,
[src]
T: RealField,
Auto Trait Implementations
impl<T> RefUnwindSafe for Mimic<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Mimic<T>
impl<T> Sync for Mimic<T>
impl<T> Unpin for Mimic<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Mimic<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,