Dobot Magician taking pause when moving between two points


#1

Hey There, I am using dobot magician, I need to move dobot on certain coordinates without any pause, so i passed 6 set of coordinates, and its moving but taking big pause in between one coordinate to another. So how can i eliminate that pause because i need track something thatswhy i need smooth motion.

Thanks


Dobot Magician Not moving
#2

Which tool do you use? Teach &playback or script? Could you give me some details to check it? or give the file for me to run it.


#3

I am very new in dobot magician, I downloaded Dobot demo v2.0 source code and start working on dobot example using QT.
void MainWindow::onTrackBtnClicked()
{
//SetQueuedCmdClear();
//SetQueuedCmdStartExec();

Pose pose;
int r = GetPose(&pose);
qDebug()<<"poseX: "<< pose.jointAngle[0] << "," << pose.jointAngle[1] << "," << pose.jointAngle[1];
if(pose.x != 0 && pose.y !=0 && pose.z != 0)
{
 movePTP(0,0,0,0);
}


if(pose.x != 50 && pose.y !=50 && pose.z != 50)
{
 movePTP(50,50,50,0);
}

  if(pose.x != 60 && pose.y !=40 && pose.z != 50)
  {
   movePTP(60,40,50,0);
  }

if(pose.x != 70 && pose.y !=30 && pose.z != 50)
{
 movePTP(70,30,50,0);
}

if(pose.x != 75 && pose.y !=25 && pose.z != 50)
{
  movePTP(75,25,50,0);
}
if(pose.x != 0 && pose.y !=0 && pose.z != 0)
{
 movePTP(0,0,0,0);
}

}

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


#4

This is the code, I inserted in MainWindow.cpp class, I need to click on a track button and I need to move dobot on a certian coordinates.


#5

I downloaded source code (Dobot Demo V2.0) from here


#7

I am not finding way to share my whole class


#8

You need to use CP point, not PTP mode.


#9

Thanks, Let me try it, I will let you know.


#10

CPParams cpParams;
cpParams.acc = 50;
cpParams.juncitionVel = 300;
cpParams.period = 50;
cpParams.planAcc = 50;
cpParams.realTimeTrack = 50;
SetCPParams(&cpParams, false, NULL);

CPCmd cpCmd;
cpCmd.cpMode = CPRelativeMode;
cpCmd.x = x;
cpCmd.y = y;
cpCmd.z = z;
cpCmd.velocity = 100;
SetCPCmd(&cpCmd, true, NULL);

but its not working as I need, I think I am doing something wrong, please correct me.
one more thing I need to control gripper also which is r but in CPParams there is no option for gripper, I mean there is x,y,z but no r.


#11

What do you mean by saying “its not working as I need” ? CP mode not working or what?


#12

Yes I changed it to CPparams and cpCmd as I pasted code above. but its move and got stuck. I think I am doing something wrong. And what about gripper controlling ??


#13

R axis is not supported under CP mode. And Dobot can not move to those points you listed above, they are in the limited position. For the working range, you can refer to the annular zone of the write&draw map here:


#14

Thanks for the answer. But i need to move R also for tracking real life things. So what is the alternate solution for my problem ?


#15

I think you need to insert a PTP command to control R axis after the CP command is over.


#16

going to try this way also


#17

will you please tell me what is the range of x,y and z for cp command, I inserted 0, 50, 70, 100 for x and same for y but it got stuck


#18

As the picture shows, about 170 to 315mm. Also you can move dobot around and check which point is available here:


#19

Thank you Eric for your great help.


#20

Hey Eric, I passed these value in CPParams

 CPParams cpParams;
  cpParams.acc = 200;
  cpParams.juncitionVel = 200;
  cpParams.period = 100; // for nice smoothness
  cpParams.realTimeTrack = false;
  SetCPParams(&cpParams, false, NULL);

and these in CPCmd

void moveCP(float x, float y, float z, float r)
{
CPCmd cpCmd;
cpCmd.cpMode = CPAbsoluteMode;
cpCmd.velocity = 200;
cpCmd.x = x;
cpCmd.y = y;
cpCmd.z = z;
SetCPCmd(&cpCmd, true, NULL);
}

and passing these coordinates to move on

void MainWindow::on_cpButton_clicked()
{
moveCP(210,70,0,0);
moveCP(300,100,50,0);
moveCP(200,150,15,0);
moveCP(150,200,15,0);
moveCP(200,150,15,0);

}

it move smoothly but when i insert more coordinates sometime it take little pause between one point to other. is there any other value I should pass in CPParams or CPCmd ?


Using CPCmd and PTPCmd for axis and Gripper movement in dobot magician problem
#21

Hi Eric, Issue is still there, sometime its move smoothly and sometime got stuck, i dont know why, I set all CPParams value and it worked fine but now it still taking pause. is there any other way to control it ??