Importing Python libraries into mrl

Hello everyone! How do I add new Python libraries to myrobotlab. So that my Python 3.7.7 scripts can work?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

Hello alexstarter,Myrobotlab

Hello alexstarter,

Myrobotlab uses Jython,  
Jython is still at 2.7 - here is their "roadmap" to Jython 3 -

Myrobotlab creates a directory called pythonModules - if you have non-native 2.7 libraries, you should be able to add them to that directory and they will be accessable

alexstarter's picture

Hello Grog! I didn't

Hello Grog!
I didn't understand everything.
Do I need to update jython? Or should I just install my libraries in the pythonModules folder?
GroG's picture

Myrobotlab only runs 2.7 If

Myrobotlab only runs 2.7
If you have compatable libraries they go into the pythonModules folder.
Hope that makes sense.

alexstarter's picture

Hello Grog! Unfortunately,

Hello Grog!
Unfortunately, I was not able to make my code friends with myrobotlab.
Perhaps there is another way to send data from my Python 3 script (like "Hello") to myrobotlab?

My script works with Yolov5 and recognizes objects by webcam.
I need the robot to say what was recognized (for example, the class number of the object).

Можете ли вы помочь мне на примере? Что писать в mrl и что писать в моем коде?
Может это можно сделать через «WebGui»?


GroG's picture

This is quite easy -

This is quite easy - myrobotlab methods are all accessable through http or ws message requests.
You'd just have your python script uses requests to make the calls

if you have a LocalSpeech service called mouth


You can post a websocket message which is more effecient.

More documentation is here -

One person even made a python lib for it - (although this is not supported - and have no idea if it still works) 

AutonomicPerfectionist's picture

It's been quite a while since

It's been quite a while since I've had the time to update mrlpy, as I recall basic commands should still work if Nixie's HTTP API is still compatible with Manticore's, however I know for a fact that more advanced features like compatibility mode and python-based services do not work in Nixie. So mrlcommand should work, everything else probably not.

I would really like to get back into developing it but unfortunately college has sucked up all my available time.

alexstarter's picture

Hi GroG! I figured out why

Hi GroG!
I figured out why it didn't work for me. I needed to enter:
http: // localhost: 8888 / api / service / i01.mouth / speak / hello

But, in this way, I can send one word at a time.
Spaces between words are replaced with% 20

Is there a way to send a whole proposal?
For instance: 'Hi GroG how are you'

I've got one more question.
Can I open a separate * .py file from myrobotlab and pass arguments to it.
python --img 416 --weights C: /yolov5/runs/train/exp11/weights/ --conf 0.60 --source 0
alexstarter's picture

Hi GroG! Is there a way to

Hi GroG!

Is there a way to send a whole proposal?

For instance: 'Hi GroG how are you'