CDRFLEx.alter_motion
Features
This function applies altering amount of motion trajectory when the alter function is activated. The meaning of the input values is defined from enable_alter_motion().
This function is only available in M2.4 version or higher.
Caution
- alter_motion can be executed only in user thread.
Note
- alter_motion can be excuted only in user thread
- Alter motion can be adjusted through setting value fLimitDpos or fLimitDposPer in enable_alter_motion function
- Orientation of Input pose follows fixed XYZ notation.
Parameter
Parameter Name | Data Type | Default Value | Description |
pos | float[6] | - | position list |
Return
Value | Description |
0 | Failed |
1 | Success |
Example
DWORD WINAPI ThreadFunc(void *arg){
while(true){
float pos[6] = {10, 0, 0, 10, 0, 0};
Drfl.alter_motion(pos);
}
}
…
int _tmain (int argc, _TCHAR* argv[]){
HANDLE hThread;
DWORD dwThreadID;
hThread = CreateThread(NULL, 0, ThreadFunc, NULL, 0, &dwThreadID);
if (hThread == 0) {
printf("Thread Error\n");
return 0;
}
float limit_dPOS[2] = {50, 90};
float limit_dPOS_per[2] = {50, 50};
Drfl.enable_alter_motion(5, PATH_MODE_DPOS, COORDINATE_SYSTEM_BASE, limit_dPOS, limit_dPOS_per);
}