Robot.from_tcf_to_t0cf

Robot.from_tcf_to_t0cf(frames_tcf)[source]

Convert a list of frames at the robot’s tool tip (tcf frame) to frames at the robot’s flange (tool0 frame) using the attached tool.

Parameters

frames_tcf (list of compas.geometry.Frame) – Frames (in WCF) at the robot’s tool tip (tcf).

Returns

list of compas.geometry.Frame – Frames (in WCF) at the robot’s flange (tool0).

Raises

Exception – If the attached tool is not set.

Examples

>>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/cone.stl'))
>>> frame = Frame([0.14, 0, 0], [0, 1, 0], [0, 0, 1])
>>> robot.attach_tool(Tool(mesh, frame))
>>> frames_tcf = [Frame((-0.309, -0.046, -0.266), (0.276, 0.926, -0.256), (0.879, -0.136, 0.456))]
>>> robot.from_tcf_to_t0cf(frames_tcf)
[Frame(Point(-0.363, 0.003, -0.147), Vector(0.388, -0.351, -0.852), Vector(0.276, 0.926, -0.256))]