Struct robot_description_builder::Link
source · pub struct Link { /* private fields */ }
Expand description
TODO: Make Builder For Link
Implementations§
source§impl Link
impl Link
pub fn builder(name: impl Into<String>) -> LinkBuilder
sourcepub fn get_self(&self) -> Arc<RwLock<Link>>
pub fn get_self(&self) -> Arc<RwLock<Link>>
Gets a (strong) refence to the current Link
. (An Arc<RwLock<Link>>
)
sourcepub fn get_weak_self(&self) -> Weak<RwLock<Link>>
pub fn get_weak_self(&self) -> Weak<RwLock<Link>>
Gets a weak refence to the current Link
. (An Weak<RwLock<Link>>
)
pub fn parent(&self) -> &LinkParent
sourcepub fn name(&self) -> &String
pub fn name(&self) -> &String
Gets the reference to the name of the Link
Example
let tree = LinkBuilder::new("my-link").build_tree();
assert_eq!(tree.get_root_link().try_read().unwrap().name(), "my-link")
sourcepub fn try_attach_child<LinkChain>(
&mut self,
link_chain: LinkChain,
joint_builder: impl BuildJoint
) -> Result<(), AddJointError>where
LinkChain: Into<Chained<LinkBuilder>>,
pub fn try_attach_child<LinkChain>( &mut self, link_chain: LinkChain, joint_builder: impl BuildJoint ) -> Result<(), AddJointError>where LinkChain: Into<Chained<LinkBuilder>>,
TODO: DOC TODO: maybe flip arguments, because then it will be Link ( Joint, Link)
DEFINED BEHAVIOR:
- The newest link get transfered from the child tree. TODO: VERIFY
TODO:
- DOC
- Test
- Doctest
sourcepub fn attach_joint_chain_at(
&mut self,
joint_chain: Chained<JointBuilder>,
transform: Transform
) -> Result<(), AddJointError>
pub fn attach_joint_chain_at( &mut self, joint_chain: Chained<JointBuilder>, transform: Transform ) -> Result<(), AddJointError>
sourcepub fn attach_joint_chain(
&mut self,
joint_chain: Chained<JointBuilder>
) -> Result<(), AddJointError>
pub fn attach_joint_chain( &mut self, joint_chain: Chained<JointBuilder> ) -> Result<(), AddJointError>
pub fn inertial(&self) -> Option<&InertialData>
pub fn visuals(&self) -> &Vec<Visual>
pub fn colliders(&self) -> &Vec<Collision>
pub fn rebuild(&self) -> LinkBuilder
sourcepub fn rebuild_branch(&self) -> Chained<LinkBuilder>
pub fn rebuild_branch(&self) -> Chained<LinkBuilder>
TODO: DOCS: TODO: TEST
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl !UnwindSafe for Link
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.