Sub Modules
With Robpod Studio you can use DRL scripts as common python modules and use the import statment to make code in one module available in another.
This way, you don’t have to put all your code into a single script—you can organize your robot application using libraries.
In order to setup a project with multiple modules:
Put your module files in the project folder.
Use the import statement to load the code of a module inside another.
Synchronize all the module files.
Inside task editor add a Robpod Script command and in its properties specify the main entry point of the application.
Modules Cache
The robot uses a caching mechanism that imports and loads modules only once, storing them for later use. Because of this, if you modify a submodule after the application has already run, the changes won’t take effect immediately. To apply the updates, a robot restart is required.
To avoid this inconvenience, you can add a Robpod Script command for each of your modules at the beginning of the program and enable the Load as Module option. This forces the robot to reload the module, allowing you to test your changes without restarting the robot.
Last updated