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.
matthewd92

@Tim_Smith sorry about this being so late, I forgot to upload it before.  Here is a URscript that we wrote to do an Euclidean Spiral on the robot


def spiral(angleToStep, startRadius, stepSize=.001, maxAngle=100000, maxRadius=100000, v=0.25, a=1.2): global r = startRadius global x = 0 global z= 0 global y =0 global pos = p[0,0,0,0,0,0] global startPos = get_actual_tcp_pose() if maxAngle == 100000 and maxRadius == 100000: popup("Must specify either a max radius or a max angle") halt end global phi = angleToStep while phi < maxAngle and r < maxRadius: phi=phi+angleToStep x=cos(d2r(phi))*r y=sin(d2r(phi))*r pos[0]=pos[0]+x pos[1]=pos[1]+y r=r+stepSize if phi>= maxAngle or r>=maxRadius: movep(pose_trans(startPos,pos), a=a, v=v, r=0.0 ) else: movep(pose_trans(startPos,pos), a=a, v=v, r=.00001) end sync() end #popup("Spiral has finished") end

To call this from the robot, you would simply add a script node to the program preceded by the starting waypoint in a move, this is where it will start the spiral from.  There are a number of optional parameters in the method call including maxRadius, maxAngle, stepSize, acceleration (a) and velocity (v).  To call any of those just follow the example below.  One of either the maxRadius or maxAngle must be called, if not a pop-up will come up telling you what to do

I tried to load the file on there but it keeps saying the file type is not allowed....

The script line in the robot is: spiral(45, .025, Base, stepSize=.005, maxRadius=.15)

So calculate the spiral every 45 degrees with a starting radius of 25 mm, a step size of 5 mm at each of the step angles and a max radius of 150 mm.  Generally we are using this in a very fine way with step sizes in the 0.1 mm range and a starting radius of 0 or .1 mm.  It is just really hard to see that on the screen.  Useful inside of a force node to find a hole for instance for inserting a pin into a hole when the exact location may change slightly.  We have also written a similar one that calculates a z dimension so that it doesn't spiral in a plane, it spirals in cylindrical fashion, this was very useful for sliding a part over a pin.  In that one we rewrote it some so that the spiral didn't grow in the x,y plane but rather was a helix in the z axis.

It also uses the TCP to calculate the plane that the spiral is in, so its in the x,y plane of the tool flange.  This allows the robot to change positions and still perform the spiral.

Here is a short clip of the script running in the simulator.
zoomal is i

Hope this was helpful

lakshmip001

ok thanks alot .

matthewd92

You're welcome

lakshmip001

@matthewd92,

I am new to testing a robotiq vision with a feeder.First I am gonna test without a feeder. Can I know what are things to be known for testing a feeder?

Thanking you in advance.

Warm Regards,
Lakshmi Prasanna. 

lakshmip001
lakshmip001

Thanks a lot.