Using PTPCmd and passig x,y,z coordinate but dobot magician moving in Joints (J1, J2, J3) mode


#1

Hi There, I am using Dobot Magician, I am trying to move it on particular coordinates, And I am using PTPCmd, I am paasing coordinates but its moves joints, Please help me on this. my code is something like below.

void movePTP(float x, float y, float z, float r)
{
PTPCmd ptpCmd;
ptpCmd.ptpMode = PTPJUMPANGLEMode;
qDebug()<<" in move ptp::::\n" ;
ptpCmd.x = x;
ptpCmd.y = y;
ptpCmd.z = z;
ptpCmd.r = r;
SetPTPCmd(&ptpCmd, true, NULL);
}