AttachedCollisionMesh

class compas_fab.robots.AttachedCollisionMesh[source]

Bases: Data

Represents a collision mesh that is attached to a Robot’s compas_robots.model.Link.

Parameters:
collision_meshcompas_fab.robots.CollisionMesh

The collision mesh to be attached to the robot model.

link_namestr

The name of the compas_robots.model.Link the collision mesh will be attached to.

touch_linkslist of str, optional

The list of link names the collision mesh is allowed to touch. Defaults to the link it is attached to.

weightfloat, optional

The weight of the attached object in kg. Defaults to 1.0.

Examples

>>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/cone.stl'))
>>> cm = CollisionMesh(mesh, 'tip')
>>> end_effector_link_name = 'tool0'
>>> touch_links = ['wrist_3_link', 'tool0']
>>> acm = AttachedCollisionMesh(cm, end_effector_link_name, touch_links)
Attributes:
collision_meshcompas_fab.robots.CollisionMesh

The collision mesh we want to attach.

link_namestr

The name of the compas_robots.model.Link the collision mesh will be attached to.

touch_linkslist of str

The list of link names the collision mesh is allowed to touch. Defaults to the link it is attached to.

weightfloat

The weight of the attached object in kg.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.