Robot.from_t0cf_to_tcf

Robot.from_t0cf_to_tcf(frames_t0cf)[source]

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

Parameters

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

Returns

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

Raises

Exception – If the robot has no attached tool defined.

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_t0cf = [Frame((-0.363, 0.003, -0.147), (0.388, -0.351, -0.852), (0.276, 0.926, -0.256))]
>>> robot.from_t0cf_to_tcf(frames_t0cf)
[Frame(Point(-0.309, -0.046, -0.266), Vector(0.276, 0.926, -0.256), Vector(0.879, -0.136, 0.456))]