Universal Robots+


Hi I cant seem to run this movec command i get this error:

base_frame = p[0.5,0.0,0.1,0.0,0.0,0.0]
movel(pose_trans(base_frame,p[-0.02130552,0.0055485792,-2.54e-05,3.14159265359,0.0,0.0]), a=1.2, v=0.25, t=0, r=0)
movec(pose_trans(base_frame,p[-0.0256325673421,0.00692223997474,-2.54e-05,3.14159265359,0.0,0.0]),pose_trans(base_frame,p[-0.029800042,0.0087229188,-2.54e-05,3.14159265359,0.0,0.0]) ,a=1.2, v=0.25, r=0)

I have calculated the radius to be 4,5 cm which isnt infinite, why doesn’t this movec work?

I believe this topic covers the same topic:

Hi jbm,

Thank you for your quick answer. However, I am not sure that the topic you linked points at the same problem. My points (start position, via point, end point) are approx. 4 mm from each other which is a factor 10 larger than in the topic you linked. I also do not use a blend radius (which seems to be the way to resolve the issue in the linked topic).

Manually changing points is also not an option for me, since we ran in to this problem while programming a URCap that auto-generates robot code from GCode and other formats, so we do not want to manually manipulate points, if possible.

If I calculate the distance between your points, it seems that:
Start to Via is 4,54 cm
Via to End is 4,54 cm
Start to End is 9,08 cm - or exactly the double of the two intermediate distances.
Could it be, that you have placed all your points on a line?
In this case a circular motion would be mathematically impossible, as radius would be infinite.

I just tried another example, also with 0 radius.
Where I calculated two new via and end points in a 90 deg. angle towards the start-via vector.


This executes just fine without errors.

A thousand of thanks for answering the question this detailed, looks like we made mistake, when trying to pass some paths.
It would be very good to know, when the error precisely occurs, so we can take it into consideration when passing paths. Could you pinpoint a threshold e.g. for the ratio of sagitta (blue in picture below) to radius, for when it’s estimated too low?
It would be very helpful for us! Thanks.

Right now minimum angle between vectors start->via and via->end it is defined ε=0.02 rad. You can calculate x, and y from that.


Cool man thanks alot! :slight_smile:

I have a similar problem, but the value 0.02 rad does not seem to be the deciding value. In this example, the one setup can be executed but the other throws the infinite radius error.

Robot version 3.12
Api Version 1.6


   Transform3D home = new Transform3D();
    Vector3d homeP = new Vector3d(-0.12193655405462664, -0.45370701438403316, 0.12033111214797831);

    Transform3D via = new Transform3D();
    //Vector3d viaP = new Vector3d(-0.1309930980205536, -0.45780298113822937, 0.11925141513347626);  gives error
    Vector3d viaP = new Vector3d(-0.1319930980205536, -0.45780298113822937, 0.11925141513347626); can be executed

    Transform3D end = new Transform3D();
    Vector3d endP = new Vector3d(-0.1397593766450882, -0.4624871611595154, 0.11816758662462234);

    Vector3d a = new Vector3d();
    Vector3d b = new Vector3d();

    double angel = Math.acos((a.dot(b)) / (a.length()*b.length())); 

angle1 = 0.06561831219342687 rad
angle2 = 0.15628254386111293 rad

Has the minimum angle changes?
is it different between API version?
Am I looking at the wrong angle?

Any help would be appreciated