Skip to main content
Skip table of contents

check_orientation_condition(axis, min, max, ref, mod)

Features

This function checks the difference between the current pose and the specified pose of the robot end effector. It returns the difference between the current pose and the specified pose in rad with the algorithm that transforms it to a rotation matrix using the "AngleAxis" technique. It returns True if the difference is positive (+) and False if the difference is negative (-). It is used to check if the difference between the current pose and the rotating angle range is + or -. For example, the function can use the direct teaching position to check if the difference from the current position is + or - and then create the condition for the orientation limit.  This condition can be repeated with the while or if statement

  • Setting Min only: True if the difference is + and False if -
  • Setting Min and Max: True if the difference from min is - while the difference from max is + and False otherwise
  • Setting Max only: True if the maximum difference is + and False otherwise

Parameters

Parameter NameData TypeDefault ValueDescription
axisint-

axis

  • DR_AXIS_A: x-axis rotation
  • DR_AXIS_B: y-axis rotation
  • DR_AXIS_C: z-axis rotation
minposx-

posx or

position list

list (float[6])
maxposx-

posx or

position list

list (float[6])
refintNone

reference coordinate

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

Movement basis

  • DR_MV_MOD_ABS: Absolute

Return

ValueDescription

True

The condition is True.

False

The condition is False.

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
posx1 = posx(400,500,800,0,180,30)
posx2 = posx(400,500,500,0,180,60)

CON1= check_orientation_condition(DR_AXIS_C, min=posx1, max= posx2)   
# If the current task coordinate posxc = posx(400, 500, 500, 0, 180, 40)
# CON1=True since posx1 Rz=30 < posxc Rz=40 < posx2 Rz=60

CON2= check_orientation_condition(DR_AXIS_C, min=posx1)   
# If the current task coordinate posxc = posx(400, 500, 500, 0, 180, 15)
# CON2=False since posx1 Rz=30 > posxc Rz=15

CON3= check_orientation_condition(DR_AXIS_C, max= posx2)   
# If the current task coordinate posxc = posx(400, 500, 500, 0, 180, 75)
# CON2=False since posx1 Rz=75 > posxc Rz=60

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.