CDRFLEx.set_desired_force
Features
This function defines the target force, direction, translation time, and mode for force control based on the global coordinate(refer to set_ref_coord).
Parameter
Parameter Name | Data Type | Default Value | Description |
fTargetForce | float[6] | - | Three translational target forces Three rotational target moments |
iTargetDirection | unsigned char[6] | - | Force control in the corresponding direction if 1 Compliance control in the corresponding direction if 0 |
eForceReference | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |
fTargetTime | float | 0 | Transition time of target force to take effect [sec] Range: 0 - 1.0 |
eForceMode | enum.FORCE_MODE | FORCE_MODE_ABSOLUTE | Refer to the Definition of Constant and Enumeration Type |
Return
Value | Description |
0 | Failed |
1 | Success |
Example
Drfl.set_ref_coord(COORDINATE_SYSTEM_TOOL);
float x0[6] = {0, 0, 90, 0, 90, 0};
Drfl.movej(x0, 60, 30);
float stx[6] = {500, 500, 500, 100, 100, 100};
Drfl.task_compliance_ctrl(stx);
float fd[6] = {0, 0, 0, 0, 0, 10};
unsigned char fctrl_dir[6] = {0, 0 ,1, 0, 0, 1};
Drfl.set_desired_force(fd, fctrl_dir);