Skip to main content
Skip table of contents

coord_transform(pose_in, ref_in, ref_out)

Features

This function transforms given task position expressed in reference coordinate, ‘ref_in’ to task position expressed in reference coordinate, ‘ref_out’. It returns transformed task position. It supports calculation of coordinate transformation for the following cases.

  • (ref_in) world reference coordinate → (ref_out) world reference coordinate
  • (ref_in) world reference coordinate → (ref_out) base reference coordinate
  • (ref_in) world reference coordinate → (ref_out) tool reference coordinate
  • (ref_in) world reference coordinate → (ref_out) user reference coordinate
  • (ref_in) base reference coordinate → (ref_out) base reference coordinate
  • (ref_in) base reference coordinate → (ref_out) tool reference coordinate
  • (ref_in) base reference coordinate → (ref_out) user reference coordinate
  • (ref_in) tool reference coordinate → (ref_out) world reference coordinate
  • (ref_in) tool reference coordinate → (ref_out) base reference coordinate
  • (ref_in) tool reference coordinate → (ref_out) tool reference coordinate
  • (ref_in) tool reference coordinate → (ref_out) user reference coordinate
  • (ref_in) user reference coordinate → (ref_out) world reference coordinate
  • (ref_in) user reference coordinate → (ref_out) base reference coordinate
  • (ref_in) user reference coordinate → (ref_out) tool reference coordinate
  • (ref_in) user reference coordinate → (ref_out) user reference coordinate

Parameters

Parameter NameData TypeDefault ValueDescription

pose_in

posx

-

posx

ref_in

float

DR_COND_NONE

reference coordinate before transformation

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate: User defined

ref_out

float

DR_COND_NONE

reference coordinate after transformation

  • DR_BASE : base coordinate
  • DR_WORLD  world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate: User defined

Return

ValueDescription

pos

posx

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
base_pos = posx(400,500,800,0,180,15)
# If task position based on base reference coordinate base_pos = posx(400,500,800,0,180,15)

tool_pos = coord_transform(base_pos, DR_BASE, DR_TOOL)
# Transform task position(base_pos) expressed in base reference coordinate to task position expressed in tool reference coordinate
# This command returns task position expressed in tool reference coordinate and the result value is stored in tool_pos

Related commands

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.