I’m new into URScript. Would like some guidance or assistance on how can I approach on creating my own GUI button which will perform specific task on the robot.
For example : Would like to write a script that would create a GUI Button that will allow the Robot arm to move from position A to position B and back.
There is no way to create UI Elements with URScript except popup Message boxes.
Just check out the URCaps SDK. You can implement your desired Feature using the UserInteraction Interface. Note that using the RequestUserToMoveRobot Function always calls a MoveJ so if you like to use a MoveP or MoveL you might wanna use this example which u can use to send a movel or movep script command
The feature you are looking for, which @m.birkholz describes above, is not available in URScript, to have a program node with your own UI, have a look at the URCaps starter package, by clicking “Getting Started” at the top of this page, and then “Develop a URCap”. A URCap is java-based plugin for a UR, and allows you to write custom functionality for your robot.
Is there any sample that I can refer to in order to achieve the functionality. Currently what I’m trying to do is implement a Pick and Place using Eclipse and then use the URSim to simulate the functionality. All this I’m currently doing using Virtual Box. Is there any tutorial (pdf) for the Pick and Place or for something similar. I need to get an idea about how can I set waypoints.
And also I’m trying to add/ deploy the generated UrCap file to the URSim(which is available in the starters pack). But I’m not having success doing it, would like some guidance on how can I achieve it?(I’ve a URSim in the virtual box).
For the deploying part to the URSim you can do it in different ways:
- From the starter package (in virtual machine) go to the path of the URSim something like the following - it depends on which robot you want to test (E-series or CB3). This path is for testing of the e-series : /home/ur/ursim/ursim-18.104.22.168181/programs.UR5
so in here you can paste your .urcap file.
Then you power up your URSim (the one where you placed your urcap - 22.214.171.124181) :
From here you should be able to find your urcap using the “plus” symbol to add the urcap.
Another way (automatic deployment) can be done using the configuration in the pom.xml file of your project.
Here is the video demonstrating the deployment:
Hope it helped !
In case you are still after a sample, or for anyone looking through this thread in the future, there is a sample cap that you should find helpful here
I was trying to run the run my code and also the existing code that is available in the Starter Package. Upon trying to run that on the URSim using the pom.xml approach, when I try to to execute “./start-ursim.sh”(by going to the right URSim folder, I’ve previously successfully complied my code using mvn install and mvn install -P ursim by going to folder were my workspace exist) it throws “Not connected to Controller,trying to send string: stop program”. I’m not sure how can I resolve this issue.