lbr-stack / pyfri

KUKA Fast Robot Interface Python SDK.
https://lbr-stack.readthedocs.io/en/latest/pyfri/doc/pyfri.html
Apache License 2.0
21 stars 3 forks source link

Support for asynchronous execution #8

Open cmower opened 1 year ago

cmower commented 1 year ago

Currently, the library only allows for synchronous execution, i.e.

  1. KUKA controller sends a message to the LBR client
  2. Depending on the session state the monitor, onStateChange, waitForCommand, or command methods are called
  3. A response message is encoded and sent back to the controller.

It would be great to implement a way so that you can run a loop on the python side at what ever frequency you like, and have another thread execute in parallel that does the communication with the KUKA controller at the frequency specified on the pad (or in the Java).

cmower commented 1 year ago

We can probably merge the async support in #9 (we can add the additional examples as todos later - there is one there that works and demonstrates how to implement an async app, so good enough for now) - @mhubii, before we should double check that the async example and updates work, were you able to test the latest changes on the robot?

Then we can work on merging #10 asap so pyFRI is properly incorporated with the lbr-stack.

mhubii commented 1 year ago

Sorry just saw this, will have a look at it this week