Robot.attach_tool

Robot.attach_tool(tool, group=None, touch_links=None)[source]

Attach a tool to the robot independently of the model definition.

Parameters:
toolTool

The tool that should be attached to the robot’s flange.

groupstr, optional

The planning group to attach this tool to. Defaults to the main planning group.

touch_linkslist of str, optional

A list of link names the end-effector is allowed to touch. Defaults to the end-effector link.

Returns:
None

Examples

>>> robot = RobotLibrary.ur5()
>>> 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)
>>> robot.attach_tool(tool)