Get Realtime position for whole movement


#1

Hey Guys,
I am Controlling the Dobot magician via Matlab 2016a.
I would like to get the whole position for the time running the robot arm. With the GetPose command I just get the end position of the machine.
Is there another method? Our goal is to plot the whole movement of the joint angle J3 (position and velocity) in a diagram.

Best Regards,
Kei


#2

I had the exact same problem! Have you solved it?


#3

Ok, I solved this problem like this.

uint64_t queuedCmdIndex;
uint64_t executedCmdIndex = 0;
bool isQueued = true;

PTPJointParams ptpJointParams={{200, 200, 200, 200}, {200, 200, 200, 200}};
PTPCommonParams ptpCommonParams={100, 100};
PTPCmd ptpCmd1={PTPMOVLXYZMode, 200, 0, 70, 0};
PTPCmd ptpCmd2={PTPMOVLXYZMode, 200, 50, 70, 0};

SetQueuedCmdStartExec();
SetPTPJointParams(&ptpJointParams, isQueued, &queuedCmdIndex);
SetPTPCommonParams(&ptpCommonParams, isQueued, &queuedCmdIndex);
SetPTPCmd(&ptpCmd1, isQueued, &queuedCmdIndex);
SetPTPCmd(&ptpCmd2, isQueued, &queuedCmdIndex);

while (executedCmdIndex < queuedCmdIndex)
{
   GetQueuedCmdCurrentIndex(&executedCmdIndex);
   GetPose(&pose);
}

SetQueuedCmdStopExec();

As a result, the position information can be displayed while the robot arm is moving.