pub struct CuRobotDescription<const N: usize, const M: usize> { /* private fields */ }Expand description
A startup robot description for a single base-to-tip serial chain.
N counts movable joints; M bounds collision shapes, including fixed and base links.
Names and semantic state storage allocate only during import and lookup.
The runtime models are read through chain and
collision_model (both Copy), or taken with
into_parts.
Implementations§
Source§impl<const N: usize, const M: usize> CuRobotDescription<N, M>
impl<const N: usize, const M: usize> CuRobotDescription<N, M>
Sourcepub fn from_urdf(xml: &str, import: CuUrdfImport<'_>) -> CuResult<Self>
pub fn from_urdf(xml: &str, import: CuUrdfImport<'_>) -> CuResult<Self>
Imports an explicit URDF base-to-tip path. Other branches are not part of this model. Rejects unsupported selected joints and geometry rather than silently omitting them.
Sourcepub const fn chain(&self) -> &CuKinematicChain<N>
pub const fn chain(&self) -> &CuKinematicChain<N>
Serial kinematic chain from the base link to the tip link.
Sourcepub const fn collision_model(&self) -> &CuRobotCollisionModel<N, M>
pub const fn collision_model(&self) -> &CuRobotCollisionModel<N, M>
Collision model (including SRDF-disabled pairs once applied).
Sourcepub fn into_parts(self) -> (CuKinematicChain<N>, CuRobotCollisionModel<N, M>)
pub fn into_parts(self) -> (CuKinematicChain<N>, CuRobotCollisionModel<N, M>)
Consumes the description and returns the runtime chain and collision model.
Sourcepub fn joint_names(&self) -> &[String; N]
pub fn joint_names(&self) -> &[String; N]
Joint names in the exact order used by runtime payloads.
Sourcepub fn collision_links(&self) -> &[String]
pub fn collision_links(&self) -> &[String]
URDF link name for each active collision shape, in contact-index order.
Sourcepub fn from_urdf_srdf(
urdf: &str,
srdf: &str,
import: CuSrdfImport<'_>,
) -> CuResult<Self>
pub fn from_urdf_srdf( urdf: &str, srdf: &str, import: CuSrdfImport<'_>, ) -> CuResult<Self>
Selects an SRDF group containing exactly one serial base-to-tip chain.
Sourcepub fn apply_srdf(&mut self, xml: &str, group: &str) -> CuResult<()>
pub fn apply_srdf(&mut self, xml: &str, group: &str) -> CuResult<()>
Applies disabled collision pairs and complete named joint states for the selected serial group. Unsupported selected-group semantics fail explicitly; other groups are not imported.
Sourcepub fn write_named_state(
&self,
name: &str,
out: &mut [CuJointPosition; N],
) -> CuResult<()>
pub fn write_named_state( &self, name: &str, out: &mut [CuJointPosition; N], ) -> CuResult<()>
Copies a startup SRDF state into caller-provided typed joint storage.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize, const M: usize> Freeze for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> RefUnwindSafe for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> Send for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> Sync for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> Unpin for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> UnsafeUnpin for CuRobotDescription<N, M>
impl<const N: usize, const M: usize> UnwindSafe for CuRobotDescription<N, M>
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
impl<T> GetTypeRegistration for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more