normal delay

31 Jan 2017 13:04 #1

i am using fore dimension"drd"library to write the code in visual studio.
i am using two novint falcon haptic devices in the experiment.
the main idea is that i Send the falcon end-effector to a desired cartesian position by generating random point within workspace, and made the second falcon (slave) follow the same motion in the other side.
the problem is that i have delay regarding the slave when it tries to follow the motion,how can i fix it?
here is the important part from my coding

// get workspace limits
for (i=0; i<10; i++) p = -0.04 + i*(0.08/10.0);

if (done > -1) done = 0;
while (done > -1 && done < 10) {

// give the control thread some slack
drdSleep (0.2);

// generate random point within workspace
while (!drdIsMoving ()) {

px = 0.02 + p[rand()%10];
py = p[rand()%10];
pz = p[rand()%10];
drdSetPosMoveParam (1.0, 5.0, 20.0);



if (drdMoveToPos (px, py, pz, false) >= 0) done++;

thank you

Please Log in or Create an account to join the conversation.

31 Jan 2017 17:38 #2

Hi Asmaa,

You only need to call one of drdTrackPos() and drdMoveToPos() - and if you are making a master-slave application, you should use drdTrackPos(). You can take a look at the 'mirror.cpp' source file that comes with the Force Dimension SDK for an example of master-slave control loop.

Please Log in or Create an account to join the conversation.