DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
Tom

VT_340 said:
Hi! Yes I managed that you can see here:

https://www.instagram.com/p/BZMmrJdhLIV/

Do you need realtime change of your path? Or is it OK to once generate your trajectory and then just give the robot a go to perform a certain movement?
Hi, VT, I encountered a new problem,I want to change my path realtime, but when I used function(servoj()) to update the former motion instructions (servoj()),the UR5 came to a hold, how can I do to make UR5 move without any hold ?
the former motion function:
def trajPlan():
  servoj(get_inverse_kin(p[0.38767,0.03974,0.23083,-0.99513,1.27173,-0.84444]),t=2)
  servoj(get_inverse_kin(p[0.43628,0.04444,0.23922,-0.99513,1.27173,-0.84444]),t=2)
end

the latter motion function:
def trajPlan():
  servoj(get_inverse_kin(p[0.48489,0.04914,0.24760,-0.99513,1.27173,-0.84444]),t=2)
  servoj(get_inverse_kin(p[0.53202,0.04915,0.24760,-0.99516,1.27173,-0.84446]),t=2)
end



Tom

VT_340 said:
Maybe you want to use the ROS driver for your problem. You do not need to get into ROS completely but you can use the driver for a proper communication between your code and the robot.
Thanks, I'll try it.

nedaes

VT_340 said:
Hi! Yes I managed that you can see here:

https://www.instagram.com/p/BZMmrJdhLIV/

Do you need realtime change of your path? Or is it OK to once generate your trajectory and then just give the robot a go to perform a certain movement?
Hi VT_340,
I had the same problem as you but I couldn't fix it. I am trying to publish a path including many points for UR5 and execute them by using Servoj.
In this regard, I defined a talker to translate a gcode file to robot positions and publish them one by one. But I still have jerks in each point (the same as using Move commands). As I read in UR5 document, the main shape of servoj command is as below:
< servoj(q, a, v, t=0.008, lookahead_time=0.1, gain=300) >
I think my problem is related to calculating time. Why did you choose t=0.05 sec? And how should I define it to prevent unwanted stopping or jerky movements for each point?
 

matthewd92

nedaes said:
I had the same problem as you but I couldn't fix it. I am trying to publish a path including many points for UR5 and execute them by using Servoj.
In this regard, I defined a talker to translate a gcode file to robot positions and publish them one by one. But I still have jerks in each point (the same as using Move commands). 
@nedaes how fast are you translating your points for the robot?  The servoj is expecting to receive time slice data, preferably at 125 Hz, if you are just taking the points from G-code and converting them into positions for the robot that could be leading to your jerkiness that you are seeing as you are not giving it the same distance to be covered in the same time slice.  My understanding of the "t" parameter is that is telling the robot how long the command you just sent should take to execute.  So if you are giving it t=0.008 and not actually giving it the distance you want to cover in 8 ms than you are going to see jerky motion as the speed of the robot is not staying consistent.  At least that has been my observation with using the servoj functionality.

nedaes

VT_340 said:
Hi!

I think there is a reason why ROS controls the UR robot in the way it does: It uploads a URScript program to the robot which opens a port for sending data to AND is solving the jerk issue by using threads. I never really understood how it works, but it works. Check it out on Github. I don't know if there are other ways to solve the problem, but in general the UR-Robots are made for Pick-And-Place tasks.. if you want to go beyond that, it is possible, but not well documented and it can become tricky.
Thanks for your prompt reply!
 I tested different times and I chose t = 0.1 as a candidate. It produces less fluctuation for movements. I hope that I can find out the logic behind this.

nedaes

@ matthewd92:
Thanks for your explanation and your help. I translate the Gcode, create servoj command and publish them with 10 HZ. It works well!

George1969

VT_340 said:
Hi! Yes I managed that you can see here:

https://www.instagram.com/p/BZMmrJdhLIV/

Do you need realtime change of your path? Or is it OK to once generate your trajectory and then just give the robot a go to perform a certain movement?
Could you tell me how did you write the program for UR to draw spline? I'm beginner in robots, but I think is very interesting. Sorry for my poor English, I hope you understand me.

Thanks in advance.