You're reading the documentation for an older, but still supported version (GL013300).
For information on the latest version, please have a look at GL013301.

get_current_rotm

This is a function to check the rotation matrix of the current tool corresponding to the input reference coordinate system (eTargetRef).

Definition
DRFLEx.h within class CDRFLEx, public section (line 712)

float (*get_current_rotm(COORDINATE_SYSTEM eTargetRef = COORDINATE_SYSTEM_BASE))[3] {
    return _get_current_rotm(_rbtCtrl, eTargetRef);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eTargetRef

COORDINATE_SYSTEM

COORDINATE_SYSTEM_BASE

Reference coordinate system for which the rotation matrix is calculated.

Return

Value

Description

float[3][3]

3×3 Rotation matrix representing the tool’s current orientation relative to the specified coordinate frame.

Example

float (*result)[3] = drfl.get_current_rotm();
for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
        cout << result[i][j] << " ";
    }
    cout << endl;
}

In this example, the rotation matrix of the tool is printed. Each element result[i][j] represents the orientation component of the tool flange with respect to the selected reference frame (e.g., base or tool coordinate system). This is especially useful for applications requiring orientation control, such as force alignment, compliance, or visual servoing.