Closed scognito closed 2 years ago
Hi Scognito
The way I work with python and mrl is using rpyc to send messages from a python "def" section in MRL and control the robot through it's REST api. This allows also to run MRL and the python task on different machines. Take care to use the same python version (2.x, 3.x) and architecture (32/64 bits) on both machines.
I use the free Visual Studio 2017 on my desktop windows machine and run MRL on a laptop mounted on my InMoov cart. Of course that python task can also run on the laptop once you are happy with it.
If you are interested in more details of the setup drop me a note.
Juerg
2018-03-02 23:55 GMT+01:00 scognito notifications@github.com:
Hi, thanks for the awesome work with MRL. I noticed that that the python tab freezes often, so my development process is very slow and stressful. Also the lack of some basic functions like find/replace, and the prompt for overwriting exisiting file on save make it even more difficult.
Is there a chance to run python scripts without using myrobotlab? Maybe importing libraries and such. Would be awesome, then I can use myrobotlab when my code is stable enough.
Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MyRobotLab/myrobotlab/issues/166, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0_CKwzepmgHzKOc0Wv2UsZIV_SSaIKks5tac3dgaJpZM4SanXI .
-- Jürg Maier Trungerstrasse 33 9543 St. Margarethen Schweiz juerg.maier@pobox.ch
Yes I'm interested, even if my tablet is 32 bit and my pc is 64. I'll find a solution (VM?). Can you share some information?
Give this a try:
on your pc (64 bit) you can run vs 2017 and select in the project plane the python environment to use. Microsoft has a nice tutorial how to change the python version in the project. I use Anaconda as it comes with lots of libs preinstalled.
for making rpyc available to MRL download the zip from https://pypi.python.org/pypi/rpyc/3.2.3, unzip it and copy the whole rpyc folder into my MRL "pythonModules" folder. RESTART MRL to make it see it!
In MRL:
def callRemotePythonMethod():
import rpyc
connRemote = rpyc.connect("localhost", 20001)
orientation = connRemote.root.getOrientation()
In Python task:
import rpyc
CART_PORT = 20001
class cartCommands(rpyc.Service):
def exposed_getOrientation(self):
return 123
if name == 'main':
from rpyc.utils.server import ThreadedServer
t = ThreadedServer(cartCommands, port=CART_PORT)
t.start()
2018-03-03 10:21 GMT+01:00 scognito notifications@github.com:
Yes I'm interested, even if my tablet is 32 bit and my pc is 64. I'll find a solution (VM?). Can you share some information?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MyRobotLab/myrobotlab/issues/166#issuecomment-370133476, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0_CH2nfz-mCRX4p4ca51c30xr1iTCHks5tamCUgaJpZM4SanXI .
-- Jürg Maier Trungerstrasse 33 9543 St. Margarethen Schweiz juerg.maier@pobox.ch
swing ui no longer supported - webgui has asynchronous updates, so long scripts should not freeze ui
Hi, thanks for the awesome work with MRL. I noticed that that the python tab freezes often, so my development process is very slow and stressful. Also the lack of some basic functions like find/replace, and the prompt for overwriting exisiting file on save make it even more difficult.
Is there a chance to run python scripts without using myrobotlab? Maybe importing libraries and such. Would be awesome, then I can use myrobotlab when my code is stable enough.
Thanks