Skip to content

asyncio #500

@katallen405

Description

@katallen405

I am trying to get robotics toolbox working on an Ubuntu machine running 22.04.05 LTS, (though I also had this issue on an up-to-date MacOS system, the configs below are all from the Ubuntu machine). I have robotics toolbox installed in a venv, and installed via pip (version 1.1.1)
I have asyncio Version: 4.0.0, swift-sim v 1.1.0

The python file I am running is a copy-paste of the Resolved-Rate Motion Control example from https://pypi.org/project/swift-sim/

For anything I run that attempts to call Swift, I get the following asyncio error:

(rtbox_sandbox) kat@ur3e-hub:~/rtbox_sandbox$ python swiftsim-test.py Exception in thread Thread-1 (SwiftSocket): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/kat/rtbox_sandbox/lib/python3.10/site-packages/swift/SwiftRoute.py", line 296, in __init__ start_server = websockets.serve(self.serve, "localhost", port) File "/home/kat/rtbox_sandbox/lib/python3.10/site-packages/websockets/asyncio/server.py", line 743, in __init__ self.server = Server( File "/home/kat/rtbox_sandbox/lib/python3.10/site-packages/websockets/asyncio/server.py", line 284, in __init__ self.loop = asyncio.get_running_loop() RuntimeError: no running event loop

Is there some version issue I need to resolve to get this working? I am writing my own controller and rtb otherwise seems like the perfect way to implement it and test it out.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions