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

get_current_pose

This function returns the current position of each robot axis in the given coordinate space (joint space or task space).

Definition
DRFLEx.h within class CDRFLEx, public section

LPROBOT_POSE get_current_pose(ROBOT_SPACE eSpaceType = ROBOT_SPACE_JOINT) {
    return _get_current_pose(_rbtCtrl, eSpaceType);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eSpaceType

ROBOT_SPACE

ROBOT_SPACE_JOINT

Space type of the robot position.
(e.g., joint space, task space).

Return

Value

Description

ROBOT_POSE

Refer to the Definition of Structure

Note

Returns the most recent monitoring value. All fields are 0 until monitoring data has been received: after open_connection, after setup_monitoring_version, and after a reconnect. The returned pointer is never NULL. Before using the value, wait for the first monitoring callback after connecting.

Example

LPROBOT_POSE lpPose = drfl.get_current_pose(ROBOT_SPACE_JOINT);
// Displays the current location of the robot in joint space
for (int k = 0; k < NUM_JOINT; k++) {
    printf("%.1f\n", lpPose->_fPosition[k]);
}

This example retrieves the current pose of the robot based on the selected space type. When ROBOT_SPACE_JOINT is used, the returned structure contains joint angles for each axis. If ROBOT_SPACE_TASK is specified, it contains the Cartesian position and orientation (X, Y, Z, Rx, Ry, Rz) of the robot end-effector.