Breadcrumbs

CDRFLEx.check_orientation_condition(eForceAxis, fTargetMin, fTargetMax, fTargetPos, eForceReference)

Features

This function checks the difference between the current pose and the rotating angle range of the robot end effector. It returns the difference (in rad) between the current pose and the rotating angle range 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 be used to set the rotating angle range to min and max at any reference position, and then determine the orientation limit by checking if the difference from the current position is + or -. 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

image2022-1-10_16-18-24.png

Range of rotating angle: This means the relative angle range (min, max) based on the specified axis from a given position based on the ref coordinate.

Parameter

Parameter Name

Data Type

Default Value

Description

eForceAxis

enum.FORCE_AXIS

-

Refer to the Definition of Constant and Enumeration Type

fTargetMin

float

-

Minimum value

fTargetMax

float

-

Maximum value

fTargetPos

float[6]

-

Target task location for six axes

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

C++
float posx1[6] = {400, 500, 800, 0, 180, 30};
bool con1 = Drfl.check_orientation_condition(FORCE_AXIS_C, 0, 5, posx1);