Coder Social home page Coder Social logo

Unable to run the mate-tool about hulk HOT 6 CLOSED

hulks avatar hulks commented on August 22, 2024 1
Unable to run the mate-tool

from hulk.

Comments (6)

ApocalypseNAO avatar ApocalypseNAO commented on August 22, 2024 1

Hello @schmidma

Thanks a lot for your help: problem solved !
Installing python 3.7 was indeed the key.

from hulk.

ApocalypseNAO avatar ApocalypseNAO commented on August 22, 2024

Hello,

First of all congratulations to the Hulks team for this excellent code framework!

I experience exactly the same issue as @Heodel with the mate tool: I can launch mate but I get exceptions when trying to connect to a real or simulated robot. So far I could not solve it. I tried two different versions of python, namely the 3.5.1 and 3.6.8 on Ubuntu 16.04.

Would you have any suggestion or research axis to solve this issue ?

from hulk.

rkost avatar rkost commented on August 22, 2024

Hey @ApocalypseNAO,

thanks for confirming the issue. I guess there is some dependency missing on your system as I am able to use mate in the version we released in this code release. You can find our dependencies in the top level folder of this repo in a file named pythonRequirements.txt

Can you start mate from the console and post the output? Also: Do you run mate inside a virtual python environment (venv)? If not I would suggest to do so as you won't pollute your global python packages with our requirements. You can then install our requirements using pip install -r pythonRequirements.txt (I highly recommend only executing this command in your venv). Let me know if you need help with that.

from hulk.

ApocalypseNAO avatar ApocalypseNAO commented on August 22, 2024

Hello, thanks for your reactivity !

As suggested I then installed the required packages in a virtual environment (I used which python to be sure). Once done, the command pip install -r pythonRequirements.txt gives the following result:

Requirement already satisfied: pyqt5<=5.10.1,>=5.9.2 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 2)) (5.10.1)
Requirement already satisfied: setproctitle<=1.1.10,>=1.1.8 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 3)) (1.1.10)
Requirement already satisfied: pyqtgraph==0.10.0 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 4)) (0.10.0)  
Requirement already satisfied: opencv-contrib-python in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 5)) (4.1.0.25)  
Requirement already satisfied: transforms3d in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 6)) (0.3.1)  
Requirement already satisfied: scipy in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 7)) (1.3.0)  
Requirement already satisfied: pyyaml<=3.13,>=3.12 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 10)) (3.13)
Requirement already satisfied: netifaces==0.10.6 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 11)) (0.10.6)
Requirement already satisfied: twisted<=18.4.0,>=16.6.0 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 12)) (18.4.0)
Requirement already satisfied: tabulate<=0.8.2,>=0.8.1 in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 15)) (0.8.2)
Requirement already satisfied: termcolor in ./lib/python3.5/site-packages (from -r pythonRequirements.txt (line 18)) (1.1.0)
Requirement already satisfied: sip<4.20,>=4.19.4 in ./lib/python3.5/site-packages (from pyqt5<=5.10.1,>=5.9.2->-r pythonRequirements.txt (line 2)) (4.19.8)
Requirement already satisfied: numpy in ./lib/python3.5/site-packages (from pyqtgraph==0.10.0->-r pythonRequirements.txt (line 4)) (1.16.4)
Requirement already satisfied: incremental>=16.10.1 in ./lib/python3.5/site-packages (from twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (17.5.0)
Requirement already satisfied: constantly>=15.1 in ./lib/python3.5/site-packages (from twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (15.1.0)
Requirement already satisfied: hyperlink>=17.1.1 in ./lib/python3.5/site-packages (from twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (19.0.0)
Requirement already satisfied: zope.interface>=4.4.2 in ./lib/python3.5/site-packages (from twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (4.6.0)
Requirement already satisfied: Automat>=0.3.0 in ./lib/python3.5/site-packages (from twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (0.7.0)
Requirement already satisfied: idna>=2.5 in ./lib/python3.5/site-packages (from hyperlink>=17.1.1->twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (2.8)
Requirement already satisfied: setuptools in ./lib/python3.5/site-packages (from zope.interface>=4.4.2->twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (20.7.0)
Requirement already satisfied: six in ./lib/python3.5/site-packages (from Automat>=0.3.0->twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (1.12.0)
Requirement already satisfied: attrs>=16.1.0 in ./lib/python3.5/site-packages (from Automat>=0.3.0->twisted<=18.4.0,>=16.6.0->-r pythonRequirements.txt (line 12)) (19.1.0)

It seems that all the dependencies are satisfied. I can run mate (after un-setting the PYTHONPATH to avoid messing with opencv) but get the same bug as before when trying to connect to a simulated robot:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/quentin/Documents/git/lectures/HRC/HULKsCodeRelease/tools/mate/mate/net/nao.py", line 39, in <lambda>
    self.debug_thread = threading.Thread(target=lambda: asyncio.new_event_loop().run_until_complete(self.__connect_debug()))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/quentin/Documents/git/lectures/HRC/HULKsCodeRelease/tools/mate/mate/net/nao.py", line 45, in __connect_debug
    self.debug_loop = asyncio.get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 632, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 578, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-3'.
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/quentin/Documents/git/lectures/HRC/HULKsCodeRelease/tools/mate/mate/net/nao.py", line 41, in <lambda>
    self.config_thread = threading.Thread(target=lambda: asyncio.new_event_loop().run_until_complete(self.__connect_config()))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/quentin/Documents/git/lectures/HRC/HULKsCodeRelease/tools/mate/mate/net/nao.py", line 64, in __connect_config
    self.config_loop = asyncio.get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 632, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.5/asyncio/events.py", line 578, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-4'.`

from hulk.

d2r2c3po avatar d2r2c3po commented on August 22, 2024

Hello!
In fact, I have exactly the same problem as @ApocalypseNAO and @Heodel, and I am really unable to find a solution by myself as well.
Can somebody help me, please?
It is a shame not to be able to use all the potential of your code because of that...

from hulk.

schmidma avatar schmidma commented on August 22, 2024

Hey @ApocalypseNAO thanks for providing this log,
if i read your log correctly you are using python in version 3.5 or at least the asyncio python library is based on version 3.5.
MATE as released in our 2018 CodeRelease needs a minimum 3.7 (possibly 3.6) as there are major changes in the use of asyncio library. Please try to use MATE with a newer version. If you encounter further problem please let us know.

from hulk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.