pub struct Link { /* private fields */ }
Expand description

TODO: Make Builder For Link

Implementations§

source

pub fn builder(name: impl Into<String>) -> LinkBuilder

source

pub fn get_self(&self) -> Arc<RwLock<Link>>

Gets a (strong) refence to the current Link. (An Arc<RwLock<Link>>)

source

pub fn get_weak_self(&self) -> Weak<RwLock<Link>>

Gets a weak refence to the current Link. (An Weak<RwLock<Link>>)

source

pub fn parent(&self) -> &LinkParent

source

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")
source

pub fn joints(&self) -> &Vec<Arc<RwLock<Joint>>>

Returns a reference to the joints of this Link.

The vector contains all Joints connected to this Link, wrapped in a Arc<RwLock<T>>.

source

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
source

pub fn attach_joint_chain_at( &mut self, joint_chain: Chained<JointBuilder>, transform: Transform ) -> Result<(), AddJointError>

TODO: This is not finalized yet

TODO:
  • DOC
  • Test
  • Doctest
source

pub fn attach_joint_chain( &mut self, joint_chain: Chained<JointBuilder> ) -> Result<(), AddJointError>

Attach a Chained<JointBuilder> to the position set in the root JointBuilder

TODO:
  • Test
  • Doctest
source

pub fn inertial(&self) -> Option<&InertialData>

source

pub fn visuals(&self) -> &Vec<Visual>

source

pub fn colliders(&self) -> &Vec<Collision>

source

pub fn rebuild(&self) -> LinkBuilder

source

pub fn rebuild_branch(&self) -> Chained<LinkBuilder>

TODO: DOCS: TODO: TEST

Trait Implementations§

source§

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

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

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

fn to_urdf( &self, writer: &mut Writer<Cursor<Vec<u8>>>, urdf_config: &URDFConfig ) -> Result<(), Error>

Represents the element as in URDF format.

Auto Trait Implementations§

Blanket Implementations§

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

§

type Output = T

Should always be Self
§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
§

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.
§

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.