For information on the latest version, please have a look at 1.33.5.
get_desired_posx
This function calculates the target posture of the current tool. The posture is based on eTargetRef.
Definition
DRFLEx.h within class CDRFLEx, public section
LPROBOT_POSE get_desired_posx(COORDINATE_SYSTEM eCoodType = COORDINATE_SYSTEM_BASE) {
return _get_desired_posx(_rbtCtrl, eCoodType);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
eCoodType |
COORDINATE_SYSTEM_BASE |
Target coordinate reference frame |
Return
Value |
Description |
|---|---|
Refer to the Definition of Structure |
Note
This call waits for the controller to answer.
The returned pointer refers to storage in the CDRFLEx object that other DRFL calls and every reconnect reuse; copy the structure before making another DRFL call. The 3-argument ikin returns its result in storage shared by all CDRFLEx objects in the process instead; see ikin. Except for get_user_home, the pointer is never NULL; do not use a NULL check to detect failure.
Example
LPROBOT_POSE result = drfl.get_desired_posx();
for (int i = 0; i < NUM_TASK; i++) {
printf("%.1f\n", result->_fPosition[i]);
}
This example retrieves the target pose (position and orientation) of the robot’s tool in the specified coordinate system (COORDINATE_SYSTEM_BASE). The returned ROBOT_POSE structure contains the desired Cartesian coordinates and rotation values that the controller is currently commanding the robot to reach.