Universal Robots Forum

Use speedl, speedj at the same time

Hi, I’m trying to move whole “arm” by using speedl and it works fine, then I wanted to move single joints and I used speedj/movej it’s also working fine. Now i want to mix these two types of movements, but it’s not working

I tried by using them like this
if(digitalInput[6]=TRUE)
speedl([0.005,0,0,0,0,0],0.5,10)
speedj([0,0,0,0,0,0.005],0.5,10)

and it just make the first movement (speedl).
I also tried using threads, but when I mix the movement an alert says that another thread is already controlling the robot

Might want to look into stopl(a) and stopj(a) URscript commands. The warning for the other thread controlling the robot is for the speed() command as this one needs to stop before you can issue a move command and vice versa the move command has to complete or stop to use speed. Or at least I think this is how it works. If you are trying to have continuous movement from one to the other this will need some wizardry or someone else in the URcommunity to explain. Anyways hope that helps and best of luck!

Hi,
The response to this question depends on whether you are attempting to run this as a program.script file under Polyscope or whether you are attempting to stream these commands to a client interface. My advice is do not try to stream commands via the client interfaces (it requires more programming expertise than most people have to do it properly).

Also, take a look at the script manual comments on speedl :
Accelerate linearly in Cartesian space and continue with constant tool speed. The time t is optional;
if provided the function will return after time t, regardless of the target speed has been reached. If
the time t is not provided, the function will return when the target speed is reached.