Python Scripting
Last updated
Last updated
All the Python programming features provided by PyCharm IDE are included with Robpod Studio.
Python scripting can be useful to develop client applications that control the robot or exchange data externally. In this scenario Robpod Studio can be used as an integrated platform to develop both native robot programs and external Python scripts, and test them in the same environment.
To create a new Python file:
Right click on project folder -> New -> Python File.
Enter the name of your script file.
You can work now with both robot native program and external Python scripts. If you want you could also display the two scripts side by side and work on them at the same time. To display a script in side by side mode:
Right click on script name, then select Open in Right Split.
To test the scripts you can run both of them at the same time:
In this example TCP socket comunication is used to share motion data between the robot program and a client Python script. In this way is possible to control the robot form an external application.
Robot Program
External Client Script
To execute the robot script, click on the robot program name and selectRun On Robot
To execute the Python script: click on the python script name and select Run.