CDRFLEx.check_orientation_condition(eForceAxis, fTargetMin, fTargetMax, eForceReference)
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 if the opposite.
- Setting Max only: True if the maximum difference is + and False otherwise

Parameter
Parameter Name | Data Type | Default Value | Description |
eForceAxis | enum.FORCE_AXIS | - | Refer to the Definition of Constant and Enumeration Type |
fTargetMin | float[6] | - | Minimum value |
fTargetMax | float[6] | - | Maximum value |
eForceReference | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |
Return
Value | Description |
1 | The condition is True |
0 | The condition is False |
Example
float posx1[6] = {400, 500, 800, 0, 180, 30};
float posx2[6] = {400, 500, 500, 0, 180, 60};
bool con1 = Drfl.check_orientation_condition(FORCE_AXIS_C, posx1, posx2);