Hello, can you please help me to convert MatLab code to URScript to do a Conical helix Movement.
This is similar to "Spiral Movement as URCaps PlugIn" topic.
a = 0.05;
c = 5.0;
t = 0:0.01:varv2pi;
x = (at/2pic).sin(t);
y = (at/2pic).cos(t);
z = t/(2pic);
Your question would be better received if you raised a specific point about why you are struggling to do this yourself, and what you have already tried.
I can’t see any reason why this wouldn’t be very straightforward to implement using standard URScript commands and the examples on the Spiral movement post you linked to.
URScript manual can be found here:
I expect you’ll want to keep the orientation of your tool constant? (rx, ry, rz - final 3 values in the robot pose)
Like for the RG2_Run (with circle.script as liked files) that makes a cicular movement with the Gripper on a single plane, I would like to perform a Conical Helix movement (3d). The RG2 Gripper holds an object that must remain in the same orientation during the Conical Helix movement (as if there was a glass of water at the end of the Gripper).
rg2_run_with_circle.script.zip (628 Bytes)
If you essentially just translate your matlab code into URScript, you can then feed the positions into the servoj command (after converting to joint angles using get_inverse_kin() ) :
You can set the TCP orientation as [0,0,0] for all positions to keep the tool pointing upwards throughout the movement.
Without getting into all the details of what your variables mean the code will look something like this.
You would then call this from within the program by having a single line of script: helix()
Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.
I’m testing the code …
Thank you for the lesson of fishing even if I am vegetarian that does not prevent me to learn.