Tool

class compas_fab.robots.Tool[source]

Bases: Data

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

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)
Attributes:
visualcompas.datastructures.Mesh

The visual mesh of the tool.

frame_in_tool0_framecompas.geometry.Frame

The frame of the tool in tool0 frame.

collisioncompas.datastructures.Mesh

The collision mesh representation of the tool.

namestr

The name of the Tool. Defaults to ‘attached_tool’.

connected_tostr

The name of the Link to which the tool is attached. Defaults to None.

Methods

from_t0cf_to_tcf

Converts frames at the robot's flange (tool0 frame) to frames at the robot's tool tip (tcf frame).

from_tcf_to_t0cf

Converts a list of frames at the robot's tool tip (tcf frame) to frames at the robot's flange (tool0 frame).

from_tool_model

update_touch_links

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.