Tool
- class compas_fab.robots.Tool[source]
Bases:
Data
Represents a tool to be attached to the robot’s flange.
- Parameters:
- visual
compas.datastructures.Mesh
The visual mesh of the tool.
- frame_in_tool0_frame
compas.geometry.Frame
The tool coordinate frame (TCF) of the tool relative to the tool0 frame (T0CF).
- collision
compas.datastructures.Mesh
The collision mesh representation of the tool.
- name
str
The name of the Tool. Defaults to ‘attached_tool’.
- connected_to
str
The name of the Link to which the tool is attached. Defaults to
None
.
- visual
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:
- tool_model
compas_robots.ToolModel
The tool model.
- attached_collision_meshes
list
ofcompas_fab.robots.AttachedCollisionMesh
, read-only The collision meshes of the tool.
- name
str
, read-only The name of the Tool.
- connected_to
str
The name of the Link to which the tool is attached.
- frame
compas.geometry.Frame
The tool coordinate frame (TCF) of the tool relative to the tool0 frame (T0CF).
- tool_model
Methods
Converts frames at the robot's flange (tool0 frame) to frames at the robot's tool tip (tcf frame).
Converts a list of frames at the robot's tool tip (tcf frame) to frames at the robot's flange (tool0 frame).
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Validate the data against the object's data schema.