Home› Programming
Discussion
Back to discussions page
toto290
Posts: 2 Recruit
Programming basics for URscript |
451 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
4 comments |

in Programming
Hello,
I am working on a project with an UR5e right now and I have diffculties with the URScript basics. The Documentation seems to lack any hints regarding the very basic commands and classes.
For example, te URScript documentation gives you a function to measure the length of a list but does not contain explanations regarding the list-class.
How do I add elements to a list dynamically? (.add / .apend / ...), how does the Pose class look like? etc etc etc
How do I add elements to a list dynamically? (.add / .apend / ...), how does the Pose class look like? etc etc etc
Am I missing something here? Is URScript based on another script language and I have to use that documentation?
I'm looking forward to your replies since I am really stuck right now.
I'm looking forward to your replies since I am really stuck right now.
Greetings,
Tom
Tagged:
The thing you have to know about UR is they have static typing including list length. The first time you define a list you will need to define the length you want it to be with the initial assignment. Then to access elements within the list you will use bracket notation to either retrieve or set a list element
A pose is a special type of list and is used for storing a 6D pose of the robot position in x,y,z and rx,ry,rz
it looks like p[0,0,0,0,0,0]. They can only contain 6 elements, position in meters and rotations in radians. You can access the elements in a pose the same way you would in a list.