Home › Programming
Discussion
Back to discussions page
Universal Robots servoj acceleration and velocity control 
74 views

Answered  
/ Most recent by cmackin
in Programming

2 comments 
cmackin
Posts: 4 Apprentice
in Programming
You have to provide the acceleration and deceleration at the start and end of the motion by dictating how far it’s moving in the next clock cycle.
Ok, so I have to tell it how far to move in the next clock cycle. Let's say that I have two waypoints 100 mm apart. How do I tell the servoj that I want to accelerate at 5 mm /s^2 to a velocity of 50 mm/s? Can I get the robot to calculate the changing distance at a given acceleration and then take the distance/0.002 s as the constant velocity? Then if I assume that I can calculate these values, how do I chop up the 100 mm span between my desired waypoints into distance/0.002 s segments?
What I am actually trying to do is draw a circle with .1 m radius. I am using x=rcos(theta), y=rsin(theta) to convert polar to cartesian. Then I calculate 360/theta to determine how many waypoints I need to complete a full circle. servoj works nicely to get a smooth rotation around the circle but as per my question, I have no control over the acceleration and velocity.
By your logic it seems that I need to calculate the distance the robot moves in 0.002 s while traveling at 50 mm/s which is 0.0001 m but the resolution of the robot is larger than 0.0001 m. How will the robot behave? Theta = ATAN (.0001 m /.1 m) = .06 degrees.
If I place .06 degrees back into x=rcos(theta), y=rsin(theta) to convert to cartesian coordinates to send the servoj to, the robot moves way slower than 50 mm/s. I have to put 5 degrees into theta to get reasonable speed at .1 m radius. The good news is that I can control speed but it feels like a black box because placing 5 degrees in for theta doesn't makes any sense. Moreover, I am stumped as to how to write an equation to calculate the changing distance/0.002 s while we accelerate to constant velocity.
I have attached the UR10e URP file to show what I am doing if that helps.