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.
For information on the latest version, please have a look at 1.33.5.
get_current_tool_flange_posx
This function returns the tool flange pose of the robot. The pose is always expressed in the BASE coordinate system.
Definition
DRFLEx.h within class CDRFLEx, public section
LPROBOT_POSE get_current_tool_flange_posx() {
return _get_current_tool_flange_posx(_rbtCtrl);
};
Parameter
None
Return
Value |
Description |
|---|---|
Refer to the Definition of Structure |
Example
// Retrieve current flange pose relative to the base coordinate system
LPROBOT_POSE lpCurrentFlange = drfl.get_current_tool_flange_posx();
if (lpCurrentFlange) {
printf("Current Flange Pose (Base Frame):\n");
printf(" X: %.1f, Y: %.1f, Z: %.1f\n", lpCurrentFlange->_fPosition[0], lpCurrentFlange->_fPosition[1], lpCurrentFlange->_fPosition[2]);
printf(" Rx: %.1f, Ry: %.1f, Rz: %.1f\n", lpCurrentFlange->_fPosition[3], lpCurrentFlange->_fPosition[4], lpCurrentFlange->_fPosition[5]);
} else {
printf("Failed to retrieve flange pose data.\n");
}
In this example, the current flange pose is obtained in the base coordinate frame. The pose includes Cartesian position (X, Y, Z) and orientation (Rx, Ry, Rz) of the tool flange, independent of the TCP set on the robot.