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’s Link.

Parameters
  • collision_mesh (compas_fab.robots.CollisionMesh) – The collision mesh to be attached to the robot model.

  • link_name (str) – The name of the Link the collision mesh will be attached to.

  • touch_links (list of str, 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 to 1.0.

Attributes
  • collision_mesh (compas_fab.robots.CollisionMesh) – The collision mesh we want to attach.

  • link_name (str) – The name of the Link the collision mesh will be attached to.

  • touch_links (list of str) – 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

from_data

Construct an attached collision mesh from its data representation.

to_data

Get the data dictionary that represents the attached collision mesh.