pub struct Chain { /* private fields */ }Expand description
Implementation of kinematic chains
segments: a vector with the segments of the chain
num_joints: number of joints (segments with movable joints)
num_ind_joints: Number of joints with independent movement
num_unlocked_joints: Num of enabled/unlocked joints
locked_joints: vector with bools indicating if the joint is locked
coupling_matrix: matrix correlating the joints with their couples\
Implementations§
Source§impl Chain
impl Chain
Sourcepub fn get_num_segments(&self) -> usize
pub fn get_num_segments(&self) -> usize
Returns the total number of segments
Sourcepub fn get_num_joints(&self) -> usize
pub fn get_num_joints(&self) -> usize
Returns the number of segments with moveable joints
Sourcepub fn get_num_ind_joints(&self) -> usize
pub fn get_num_ind_joints(&self) -> usize
Returns the number of Independent moveable joints
Sourcepub fn get_coupling_matrix(&self) -> DMatrix<f64>
pub fn get_coupling_matrix(&self) -> DMatrix<f64>
Returns the coupling matrix
Sourcepub fn add_segment(&mut self, segment: Segment)
pub fn add_segment(&mut self, segment: Segment)
Add a new semgment at the end of the kinematic chain
(Where the end is where the end-effector would be)
Sourcepub fn get_segment(&self, index: usize) -> Segment
pub fn get_segment(&self, index: usize) -> Segment
Get the segment at the index-th position
Sourcepub fn get_locked_joints(&self) -> Vec<bool>
pub fn get_locked_joints(&self) -> Vec<bool>
Get the vector with lock information
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chain
impl<'de> Deserialize<'de> for Chain
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Chain
impl RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl UnsafeUnpin for Chain
impl UnwindSafe for Chain
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.