pub enum CuCollisionModelSpec<const M: usize> {
Preset(CuRobotPreset),
Inline {
shapes: [CuLinkShape; M],
params: CuCollisionModelParams,
},
}Expand description
Source of a robot collision model in RON: a preset name or an inline model.
"collision_model": "igus_rebel"
"collision_model": {
"shapes": [
{"shape": {"capsule": {"a": [0.0, 0.0, 0.0], "b": [0.0, 0.0, 0.2], "radius": 0.05}}, "frame": 0},
{"shape": {"sphere": {"center": [0.0, 0.0, 0.02], "radius": 0.03}}, "frame": 1},
],
"safety_margin": 0.005, // optional, default 0.0
"skip_adjacent_links": true, // optional, default true
}An inline model lists exactly M shapes; omit frame for a base-frame shape. Use
CuRobotCollisionModel::new for fewer than M shapes.
Variants§
Preset(CuRobotPreset)
A named preset; its shape and joint counts are checked by Self::resolve.
Inline
Explicit shapes and parameters.
Fields
§
shapes: [CuLinkShape; M]One shape per model slot.
§
params: CuCollisionModelParamsModel parameters.
Implementations§
Source§impl<const M: usize> CuCollisionModelSpec<M>
impl<const M: usize> CuCollisionModelSpec<M>
Sourcepub fn resolve<const N: usize>(&self) -> CuResult<CuRobotCollisionModel<N, M>>
pub fn resolve<const N: usize>(&self) -> CuResult<CuRobotCollisionModel<N, M>>
Builds and validates the model for an N-joint chain.
Trait Implementations§
Source§impl<const M: usize> Clone for CuCollisionModelSpec<M>
impl<const M: usize> Clone for CuCollisionModelSpec<M>
Source§fn clone(&self) -> CuCollisionModelSpec<M>
fn clone(&self) -> CuCollisionModelSpec<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const M: usize> Copy for CuCollisionModelSpec<M>
Source§impl<const M: usize> Debug for CuCollisionModelSpec<M>
impl<const M: usize> Debug for CuCollisionModelSpec<M>
Source§impl<'de, const M: usize> Deserialize<'de> for CuCollisionModelSpec<M>
impl<'de, const M: usize> Deserialize<'de> for CuCollisionModelSpec<M>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const M: usize> From<CuRobotPreset> for CuCollisionModelSpec<M>
impl<const M: usize> From<CuRobotPreset> for CuCollisionModelSpec<M>
Source§fn from(preset: CuRobotPreset) -> Self
fn from(preset: CuRobotPreset) -> Self
Converts to this type from the input type.
Source§impl<const M: usize> PartialEq for CuCollisionModelSpec<M>
impl<const M: usize> PartialEq for CuCollisionModelSpec<M>
Source§impl<const M: usize> Serialize for CuCollisionModelSpec<M>
impl<const M: usize> Serialize for CuCollisionModelSpec<M>
impl<const M: usize> StructuralPartialEq for CuCollisionModelSpec<M>
Auto Trait Implementations§
impl<const M: usize> Freeze for CuCollisionModelSpec<M>
impl<const M: usize> RefUnwindSafe for CuCollisionModelSpec<M>
impl<const M: usize> Send for CuCollisionModelSpec<M>
impl<const M: usize> Sync for CuCollisionModelSpec<M>
impl<const M: usize> Unpin for CuCollisionModelSpec<M>
impl<const M: usize> UnsafeUnpin for CuCollisionModelSpec<M>
impl<const M: usize> UnwindSafe for CuCollisionModelSpec<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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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