I am learning to use Blockly on [UFACTORY Studio simulation], finding that the codes written in Blockly (as shown in the picture) could be converted to Python in the IDE. What a nice feature!
Currently, I don’t have access to a real Xarm and I have a couple of questions:
Can Python code generated in the IDE from Blockly be run directly in VS code?
if the answer to 1 is yes, to run the codes generated in the Studio Simulation on a physical robot, would it be enough to change the IP written in the scripts (as shown in the picture) to match the
one on the control box?
You can run the python code directly in VS code, and you have to install xarm-python-sdk in your environment first. The command is ‘pip install xarm-python-sdk’.
The IP generated in Studio is already the current controller’s IP.
Thanks for your quick reply. In my case, the same scripts can be run within the IDE integrated in Ufactory Simulation but it couldn’t be run in an external IDE, such as VS code. At the end of the script, it says,
Thanks for your quick reply! Yes, I did run it on a real ram, and I could ping the controller’s IP back then, as I could run the same scripts on the arm with the IDE integrated in Ufactory.
Thanks for your instruction! If I understood correctly, I think this answer was explaining how to run codes on VS code to command the arm in the simulator?
However, I was trying to test if the codes converted from Blockly could be run on VS code too, even though it could run on the Python IDE of UFacotry, but not yet on VS code. Could I refer to this article (【Official】How to use xArm Python SDK---For Python beginners)? Even though it’s meant for PyCharm.