Tool

class compas_fab.robots.Tool(visual, frame_in_tool0_frame, collision=None, name='attached_tool')[source]

Bases: object

Represents a tool to be attached to the robot’s flange.

Attributes

Examples

>>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/cone.stl'))
>>> frame = Frame([0.14, 0, 0], [0, 1, 0], [0, 0, 1])
>>> tool = Tool(mesh, frame)

Methods

__init__(visual, frame_in_tool0_frame[, …])

Initialize self.

from_data(data)

Construct a Tool from its data representation.

from_json(filepath)

Construct a Tool from the data contained in a JSON file.

to_json(filepath)

Serialise the data dictionary representing the tool to JSON and store in a file.

Attributes

collision

The collision mesh representation of the tool.

collision_mesh

Returns the collision mesh of the tool.

data

Returns the data dictionary that represents the tool.