AttachedCollisionMesh
- class compas_fab.robots.AttachedCollisionMesh(collision_mesh, link_name, touch_links=None, weight=1.0)[source]
Bases:
Data
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
Construct an attached collision mesh from its data representation.
Get the data dictionary that represents the attached collision mesh.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema.
Validate the object's data against its json schema.