Polyscope 1.8 Call Functions from ..script file is not working

Hey there,

im doing my Masterthesis and got an Ur10 with an old CB 1.8 control unit.
My main problem is, I cannot call functions defined in scripts. Im getting this error all the time, no matter how I set my functions up or the robot code.

This screenshots are from the actual machine. At the machine it says the function is not defined. I dont understand it.

Please someone help me, im really frustrated.

Thank you alot!
BR,
Darko

EDIT: This is not correct, see below.

you can not define functions in one script file and then reference them in another script command.
They are not in the same scope automatically it seems.
What exactly are you trying to accomplish?

Actually you can, the documentation shows it. I already figured it out. I think the function from the .script was not loaded properly otherwise I dont have any idea why it is acutally working right now. Somehow PS did not recognize the add Function. Im trying to do a eye to hand calibration and I need some fast code development.
The programming development on the PS 1.8 is not good. Neither the newer ones are better. The script import is the fastest solution to develop a lot of code.


add function from the .script file.

br
Darko

1 Like

Its funny, I ran into the same problem as you when I just tested it, leading me to believe it is genuinely not possible.
It works after I had saved the file and the script another time.

Thought it was a limitation with CB2 Robots, as I know its possible in later versions. But as you pointed out, its just a weird issue with the dev environment on the pendant.

If you want a fast dev environment I would recommend using FTP and load the files remotely via VScode or similar.

Is it possible to connect VSCode to the Machine? ATM Im using SCP to transfer my files, which I create in VSCode.

It is quite interessting. But the debugging is horror. I had a lot of syntax error yesterday and you dont get any feedback from the machine what the problem is.

Do you have any idea if it is possible to get the homogeneous Transformation Matrix TCP to Base from an actual pose or joint angles?

br

You can use the VsCode plugin “ftp-simple” to Edit the files as if they were on your computer, but its probably not very different from using scp. There is some code completion for URScript in VsCode but not debugging tools.
I agree developing for UR-robots (especially CB2/CB3) is frustrating and not very convenient.

Ok THX, i will try it out. I found an excel sheet with the UR Kinematics, thats quite nice.

It might be better for you to do the calculations on an external device and send coordinates to the robot via modbus. (Or RTDE with a CB3 Robot). Depending on complexity you might get to the limits of whats possible with URscript.