Open WLucky opened 1 year ago
Hi @WLucky,
I looked into it, it seems to only apply for the python API. I opened a bug internally and it will be fixed in an upcoming release.
I will leave this issue opened until it is fixed.
In the meantime, you can either use the C++ API or apply the modification you suggested directly in your local python package (somewhere in home/user/.local/lib/pythonX.X/site-packages/kortex_api/RouterClient.py)
I assume you already did the second option since you posted the fix as well. I assume your system is running now.
Thank you very much for sharing this bug, Felix
Hi @WLucky,
I looked into it, it seems to only apply for the python API. I opened a bug internally and it will be fixed in an upcoming release.
I will leave this issue opened until it is fixed.
In the meantime, you can either use the C++ API or apply the modification you suggested directly in your local python package (somewhere in home/user/.local/lib/pythonX.X/site-packages/kortex_api/RouterClient.py)
I assume you already did the second option since you posted the fix as well. I assume your system is running now.
Thank you very much for sharing this bug, Felix
Thank you for your reply. I am glad that I could contribute to this project.
Description
When creating two routers in the same code using the Python API, and operating both arms in collaboration using multi-threading, an error "No callback list instantiated" is raised, and one of the arms times out waiting for a response.
Version
At a minimum, provide the Kortex API and Kortex-enabled device versions.
KortexAPI : kortex_api-2.5.0.post6-py3-none-any.whl
Kortex Device : kinova gen3
Steps to reproduce
Code example
Expected behavior
Describe the expected behavior (in regard to the bug described above).
I hope both arms can receive the returned message after completing their respective actions, such as completion notification, and then perform the corresponding processing.
Any other information
Any other information you believe the developers need to know.
The reason for the error is that the notificationService in RouterClient is unique to the class, rather than unique to the instance. As a result, when registering the notification callback, the subsequent router will overwrite the callback function of the previous instance, leading to an error.
fixed: