AttachedCollisionMesh¶
-
class
compas_fab.robots.
AttachedCollisionMesh
(collision_mesh, link_name, touch_links=None, weight=1.0)[source]¶ Bases:
object
Represents a collision mesh that is attached to a
Robot
’sLink
.- Parameters
collision_mesh (
compas_fab.robots.CollisionMesh
) – The collision mesh to be attached to the robot model.link_name (
str
) – The name of theLink
the collision mesh will be attached to.touch_links (
list
ofstr
, optional) – The list of link names the collision mesh is allowed to touch. Defaults to the link it is attached to.weight (
float
, optional) – The weight of the attached object in kg. Defaults to1.0
.
- Attributes
collision_mesh (
compas_fab.robots.CollisionMesh
) – The collision mesh we want to attach.link_name (
str
) – The name of theLink
the collision mesh will be attached to.touch_links (
list
ofstr
) – The list of link names the collision mesh is allowed to touch. Defaults to the link it is attached to.weight (
float
) – The weight of the attached object in kg.
Examples
>>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/cone.stl')) >>> cm = CollisionMesh(mesh, 'tip') >>> ee_link_name = 'ee_link' >>> touch_links = ['wrist_3_link', 'ee_link'] >>> acm = AttachedCollisionMesh(cm, ee_link_name, touch_links)
Methods
__init__
(collision_mesh, link_name[, …])Initialize self.
from_data
(data)Construct an attached collision mesh from its data representation.
to_data
()Get the data dictionary that represents the attached collision mesh.
Attributes
data
The data representing the attached collision mesh.