Look at using a MoveP command.
VT_340
Are there any more informations about how to load a SCRIPT program via TCP and how to play it?
VT_340
Can you help me with the syntax a bit? I tried the following:
servoj(get_inverse_kin(-0.028682, -0.467049, 0.05000001, -3.14159274, 0.00000000, 0.00000000), t = 0.05)
This lines results in a a popup-error claiming this:
"TypeError: get_inverse_kin() takes at most 4 arguments (6given)"
Seems lik a bug or something, a pose consists of 6 floats .. no?
Thanks in advance!
VT
matthewd92
Anytime, glad it's working. Post up a video when you get it all working, curious to see it in action
Tom
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 ?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?
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
Thanks, I'll try it.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.
nedaes
Hi VT_340,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?
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 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 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
Thanks for your prompt reply!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.
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.
Hi!
I want to make the UR5 make draw random lines, arcs and circles on a piece of paper. My approach for that so far was to generate the geometry in Processing (Java for creatives..) and send points via TCP as moveP commands. The problem is that for example I was not able to make a smooth motion, even with a small blend radius and high "solution" up to 50 points per arc. Any idea how this problem is solved? Would also use ROS or other solutions asI am in a early project-phase and just want to collect potential ways how to do it.
Thanks in advance.