Hallo,
I hvae a doubt. I have a programm in .txt file andd wanted to convert it into .urp file. Is there a technique to copy into robot or i need create a new programm into polyscope and edit every step.
Thanks in advance
Hallo,
I hvae a doubt. I have a programm in .txt file andd wanted to convert it into .urp file. Is there a technique to copy into robot or i need create a new programm into polyscope and edit every step.
Thanks in advance
*.urp programs are basically compressed XML files so this is indeed possible. You might take a look at its uncompressed structure and rebuild it with a nice XML writer e.g. the ElementTree API for Python
@ameyakarnik93
When a (defined) program in PolyScope is saved, this generates 3 files.
Say your program is named “MyProgram”, this would yield the following files:
The actual file, that you can import into PolyScope is the URP file.
This contains all the data about waypoints, relations between variables etc.
This is the file you want to import into PolyScope.
The TXT file is just for reference / documentation.
If opened in a text editor, it shows the textual representation of the program:
RobotProgram
MoveJ
Waypoint_1
Waypoint_2
This file contains no information about i.e. positions of waypoints etc. So this file cannot be converted into a loadable program, since you are literally lacking all information.
The SCRIPT file contains the URScript output of all nodes in order.
Hence, the result of any nodes generateScript
call.
this is old; but… why couldnt a txt file get imported as an undefined program?
Its not much different that the technique of dropping undefined logic structure when first designing a program and coming back to define it later.
maybe all program nodes would need to be ‘touched’ … but this functionality could provide a nice templating layer for polyscope. Users could share entire program structure without environment-specific data such as precise waypoints; the end user would have to fully re-define the program with their own waypoints, etc (or make their own custom structure changes from there)