Skip to main content
Skip table of contents

coord_transform(pose_in, ref_in, ref_out, ori_type_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
ori_type_outintNone

orientation type

  • None: Follows the orientation type of pos_in input parameter

  • DR_ELR_ZYZ: Euler Angles(z-y'-z'', in degrees)

  • DR_ELR_ZYX: Euler Angles(z-y'-x'', in degrees)

  • DR_ELR_XYZ: Euler Angles(x-y'-z'', in degrees)

  • DR_FIX_XYZ: Fixed Angles(x-y-z, in degrees)

  • DR_ROTVEC: 3D vector consisting of the unit axis multiplied by the angle in degrees

  • DR_QUAT: unit quaternion(x, y, z, w)

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

tool_pos_zyx = coord_transform(base_pos, DR_BASE, DR_TOOL, DR_ELR_ZYX)
# Orientation type of tool_pos_zyx: euler zyx

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.