Open severin-lemaignan opened 7 years ago
Hi,
Unfortunately, I don't have any solution to offer you right now. This is an issue we encountered many times internally and we are now used to the fact that using naoqi python SDK must be done without a ROS workspace sourced. Sadly, open-sourcing our SDK is not a decision I can make, and AFAIK it is not foreseeable in the next future.. Splitting your launch files might be the easiest option here..
@suryaambrose well, that kind of the answer I expected :-) but thanks for confirming.
One possible (and relatively easy) solution would be to provide a statically linked version of _qi.so
.
Another option (but probably not as easy) would be to provide a Python SDK recompiled for each release of libqi.so
.
Just to add to the discussion: currently our nao_bringup
launch files always try to start some Python nodes.
Due the this issue, this can not work (the Python modules will always fail to start).
Hi again Severin,
There MIGHT be a solution to your problem (but not tested, not very clean either so... up to you, if you want to give it a try).
python -c "import naoqi"
first import naoqi.py in your Python SDK, which in turn import the _qi.so library with its dependencies (basically).
The problem here is that _qi.so is expecting to get libqi 2.1, and receives libqi 2.5 from your ROS package. What you could do is use the open source project here to recompile the python bindings of the libqi library, fitting libqi2.5, and replace the bindings in your SDK by those you compiled.
1) You will probably need to use qibuild, so if you never did, that's quite an overhead. 2) This solution should work, but it might lead to other API problems between libqi and the rest of the SDK (which won't be solvable this time) 3) This is clearly an ugly solution since you are hacking your SDK.
So, a lot of buts and ifs !
Haha! I missed the fact that the source for _qi.so
is available! Thanks for pointing it! I'll certainly give it a try.
Nice, good luck !
If you need a hint, _qi.so
is generated from here: https://github.com/aldebaran/libqi-python/blob/master/py2py3/CMakeLists.txt#L66
I did not checked yet in details, but wouldn't it be possible to package the python bindings in ROS alongside libqi
? that would certainly make everybody's life easier (... sudo apt install ros-kinetic-naoqi-python
...)
We might have to deal with a dependency on the C++ SDK, though?
If this solution is proven to be efficient, yes I think we could package libqi-python in a ROS package. That should be doable. I don't think we would need to bother with the C++ SDK though (but I might be wrong)
This would help!
Did anyone ever manage to build libqi-python?
Hi,
I passed a long way to reach this point, I'm new with linux, python, naoqi, qibuild, ros and other friends! but i got the same error, so would you please explain the solution in a more step by step manner, such that me also as a beginner could solve the problem!
I'm running ubuntu 16.04, 64 bit, python 2.7.12, libboost 1.58 and ros Lunar i installed libbbost1.55 from here beside my 1.58 (how can i be sure if it really installed!) and after installation is it necesary to set it as default libboost, if yes how can i do it?
Thanks in advance, Regards.
Any progress on an "official" workaround to this? I would be interested if so.
This is a bit of big news for an issue thread but... The NAOqi Python SDK is now being replaced the Qi Framework in Python. The Qi Framework is the open source core of NAOqi & the communication library to make clients, or extend NAOqi with new services.
It can be installed on most machines using pip
:
$ pip install --user qi
So the best advice for ROS maintainers I could give now is to remove any occurrence of the legacy NAOqi Python SDK, and use the standard practices around Python and pip to package it.
For maintainers, please have a look at libqi-python's GitHub (the most advanced branch is the release-2.9 currently).
Thank you for your discussion. OMG, 2020 is coming soon! Is there any solution to this problem? I just want to control the Nao with the keyboard by ROS.
Thanks in advance, Regards.
Hi,
I passed a long way to reach this point, I'm new with linux, python, naoqi, qibuild, ros and other friends! but i got the same error, so would you please explain the solution in a more step by step manner, such that me also as a beginner could solve the problem!
I'm running ubuntu 16.04, 64 bit, python 2.7.12, libboost 1.58 and ros Lunar i installed libbbost1.55 from here beside my 1.58 (how can i be sure if it really installed!) and after installation is it necesary to set it as default libboost, if yes how can i do it?
Thanks in advance, Regards.
@elahia if you solved your problem, kindly share with me the details of your procedure. I am exactly at the situation you were 2 years before.
After installing
libqi
from ROS Kinetic and the Aldebaran closed-source NaoQI Python SDK (tested with version 2.1.4.13), importing thenaoqi
Python package fails:The error comes from
_qi.so
(loaded by the Python SDK) incorrectly linking to thelibqi.so
provided by ROS.The 'easy' workaround is to re-export
LD_LIBRARY_PATH
with the Python SDK path first before running any python code. This is inconvenient, and not always possible (for instance, when a ROS launch file starts both C++ and Python nodes).Any ideas? Ideally, Aldebaran could release the Python SDK as open-source, and we could package it along with
libqi.so
...