Struct robot_description_builder::link_data::Collision
source · pub struct Collision { /* private fields */ }
Expand description
A Collision
geometry for a Link
.
This struct holds one of (the many) Colliders for the associated Link
.
It can be constructed via the CollisionBuilder
(accessable via the builder
method) and added while building the Link
.
It contains the following data:
geometry
: The geometry used for collision checking1.transform
(Optional): The transform from theLink
frame to thegeometry
.name
(Optional): The identifiers/names of this collision element. For practical purposes, it is recommended to use unique identifiers/names.
WARNING: It is not recommended to use high-detail meshes for collision geometries, since this will slow down the collision checking process. Also, keep in mind, that some simulators only support the use of convex meshes for collisions, if at all. ↩
Implementations§
source§impl Collision
impl Collision
sourcepub fn builder(
geometry: impl Into<Box<dyn GeometryInterface + Sync + Send>>
) -> CollisionBuilder
pub fn builder( geometry: impl Into<Box<dyn GeometryInterface + Sync + Send>> ) -> CollisionBuilder
Create a new CollisionBuilder
with the specified Geometry
.
sourcepub fn name(&self) -> Option<&String>
pub fn name(&self) -> Option<&String>
Gets an optional reference to the name
of this Collision
.
sourcepub fn transform(&self) -> Option<&Transform>
pub fn transform(&self) -> Option<&Transform>
Gets an optional reference to the transform
of this Collision
.
sourcepub fn geometry(&self) -> &Box<dyn GeometryInterface + Sync + Send>
pub fn geometry(&self) -> &Box<dyn GeometryInterface + Sync + Send>
Gets a reference to the geometry
of this Collision
.
sourcepub fn rebuild(&self) -> CollisionBuilder
pub fn rebuild(&self) -> CollisionBuilder
Recreates the CollisionBuilder
, which was used to create this Collision
.
Trait Implementations§
source§impl From<CollisionBuilder> for Collision
impl From<CollisionBuilder> for Collision
source§fn from(value: CollisionBuilder) -> Self
fn from(value: CollisionBuilder) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Collision
impl Send for Collision
impl Sync for Collision
impl Unpin for Collision
impl !UnwindSafe for Collision
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<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>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.