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.

trans

Input parameter (fSourcePos) based on the ref coordinate is translated/rotated as fOffset based on the same coordinate and this function returns the result that is converted to the value based on the eTargetRef.

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

LPROBOT_POSE trans(
    float fSourcePos[NUM_TASK],
    float fOffset[NUM_TASK],
    COORDINATE_SYSTEM eSourceRef = COORDINATE_SYSTEM_BASE,
    COORDINATE_SYSTEM eTargetRef = COORDINATE_SYSTEM_BASE
) {
    return _trans(_rbtCtrl, fSourcePos, fOffset, eSourceRef, eTargetRef);
};

Parameter

Parameter Name

Data Type

Default Value

Description

fSourcePos

float[6]

Target joint or task position for six axes (x, y, z, Rx, Ry, Rz)

fOffset

float[6]

Offset information for six axes (translation/rotation delta)

eSourceRef

COORDINATE_SYSTEM

COORDINATE_SYSTEM_BASE

Source coordinate system reference.

eTargetRef

COORDINATE_SYSTEM

COORDINATE_SYSTEM_BASE

Target coordinate system reference.

Return

Value

Description

ROBOT_POSE

Returns the transformed position and orientation result (pose)
calculated by applying fOffset to fSourcePos and converting
the result into the eTargetRef coordinate system.

Example

float point[6]  = { 30, 30, 30, 30, 30, 30 };
float offset[6] = { 100, 100, 100, 100, 100, 100 };
LPROBOT_POSE res = drfl.trans(point, offset);
for (int i = 0; i < 6; i++)
    cout << res->_fPosition[i] << endl;

In this example, the function calculates the translated pose of the tool by applying a 100 mm translation and 100° rotation offset to the original pose. This function is useful for computing relative motion targets, such as incremental path planning, tool offset compensation, or dynamic coordinate conversion.