Closed alexandre-blanc closed 2 years ago
You can see that you are using Python 3.8 while your default system is 3.6. It seems your system is a bit messy. Could you rather use conda, unset the env variables and everything will go fine.
Could you show the content of /opt/openrobots/lib and /opt/openrobots/lib64?
I'd rather not use conda if an alternative exists. I typically use virtualenv and pip instead.
As you can see in the initial report, the import fails with python 3.6 as well (first promp, python3
). I'll update with the contents of the lib and lib64 folders as soon as possible.
Hi @alexandre-blanc ,
I just tested an installation and use of robotpkg-py36-pinocchio on ubuntu 18.04, and it works for me:
FROM ubuntu:bionic
# Setup Robotpkg apt binary repository
ADD http://robotpkg.openrobots.org/packages/debian/robotpkg.key /
RUN --mount=type=cache,sharing=locked,target=/var/cache/apt --mount=type=cache,sharing=locked,target=/var/lib/apt \
apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -qqy gnupg2 \
&& apt-key add /robotpkg.key \
&& echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub bionic robotpkg" \
>> /etc/apt/sources.list.d/robotpkg.list
# Install Pinocchio
RUN --mount=type=cache,sharing=locked,target=/var/cache/apt --mount=type=cache,sharing=locked,target=/var/lib/apt \
apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
robotpkg-py36-pinocchio
# Configure python path ; this is equivalent to your PYTHONPATH=…
RUN echo "/opt/openrobots/lib/python3.6/site-packages" >> /usr/lib/python3/dist-packages/robotpkg.pth
# Test everything
RUN python3 -c "import pinocchio"
Can you check apt update && apt upgrade && apt install robotpkg-py36-robotpkg
? Maybe something went wrong during your installation.
You should have a /opt/openrobots/lib/libpinocchio.so.2.6.9
file from the robotpkg-pinocchio
package which is a dependency of robotpkg-py36-pinocchio
.
I'd rather not use conda if an alternative exists. I typically use virtualenv and pip instead.
Honestly, I do think conda is much more suited, simpler and compatible with pip.
Could you show the content of /opt/openrobots/lib and /opt/openrobots/lib64?
There is no directory named lib64 :
➜ ~ ls /opt/openrobots/lib
cmake libgepetto-viewer.so libomniORB4.so.2 libOpenThreads.so.21 libosgManipulator.so.161 libosgSim.so.161 libosgUtil.so.161
gepetto-gui-plugins libomniCodeSets4.a libomniORB4.so.2.4 libOpenThreads.so.3.3.1 libosgManipulator.so.3.6.5 libosgSim.so.3.6.5 libosgUtil.so.3.6.5
libcollada-dom2.4-dp.so libomniCodeSets4.so libomnithread.a libosgAnimation.so libosgParticle.so libosg.so libosgViewer.so
libcollada-dom2.4-dp.so.0 libomniCodeSets4.so.2 libomnithread.so libosgAnimation.so.161 libosgParticle.so.161 libosg.so.161 libosgViewer.so.161
libcollada-dom2.4-dp.so.2.4.0 libomniCodeSets4.so.2.4 libomnithread.so.4 libosgAnimation.so.3.6.5 libosgParticle.so.3.6.5 libosg.so.3.6.5 libosgViewer.so.3.6.5
libCOS4.a libomniConnectionMgmt4.a libomnithread.so.4.1 libosgDB.so libosgPresentation.so libosgTerrain.so libosgVolume.so
libCOS4.so libomniConnectionMgmt4.so libomniZIOP4.a libosgDB.so.161 libosgPresentation.so.161 libosgTerrain.so.161 libosgVolume.so.161
libCOS4.so.2 libomniConnectionMgmt4.so.2 libomniZIOP4.so libosgDB.so.3.6.5 libosgPresentation.so.3.6.5 libosgTerrain.so.3.6.5 libosgVolume.so.3.6.5
libCOS4.so.2.4 libomniConnectionMgmt4.so.2.4 libomniZIOP4.so.2 libosgFX.so libosgQt5.so libosgText.so libosgWidget.so
libCOSDynamic4.a libomniDynamic4.a libomniZIOP4.so.2.4 libosgFX.so.161 libosgQt5.so.145 libosgText.so.161 libosgWidget.so.161
libCOSDynamic4.so libomniDynamic4.so libomniZIOPDynamic4.a libosgFX.so.3.6.5 libosgQt5.so.3.5.7 libosgText.so.3.6.5 libosgWidget.so.3.6.5
libCOSDynamic4.so.2 libomniDynamic4.so.2 libomniZIOPDynamic4.so libosgGA.so libosgShadow.so libosgUI.so omniidl
libCOSDynamic4.so.2.4 libomniDynamic4.so.2.4 libomniZIOPDynamic4.so.2 libosgGA.so.161 libosgShadow.so.161 libosgUI.so.161 osgPlugins-3.6.5
libeigenpy.so libomniORB4.a libomniZIOPDynamic4.so.2.4 libosgGA.so.3.6.5 libosgShadow.so.3.6.5 libosgUI.so.3.6.5 pkgconfig
libgepetto-viewer-corba.so libomniORB4.so libOpenThreads.so libosgManipulator.so libosgSim.so libosgUtil.so python3.6
➜ ~ ls /opt/openrobots/lib64
ls: cannot access '/opt/openrobots/lib64': No such file or directory
You should have a /opt/openrobots/lib/libpinocchio.so.2.6.9 file from the robotpkg-pinocchio package which is a dependency of robotpkg-py36-pinocchio.
As you can see, the library is not present.
Can you check apt update && apt upgrade && apt install robotpkg-py36-robotpkg ? Maybe something went wrong during your installation.
I'll try right now. If it does not work, I'll try uninstalling all the robotpkg packages and reinstalling from scratch.
Thanks for your help !
Can you check apt update && apt upgrade && apt install robotpkg-py36-robotpkg ? Maybe something went wrong during your installation. I assume you meant
apt install robotpkg-py36-pinocchio
, the packagerobotpkg-py36-robotpkg
does not seem to exit. Without copying the whole output, here is the result :Reading package lists... Done Building dependency tree Reading state information... Done robotpkg-py36-pinocchio is already the newest version (2.6.9). 0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Time to restart the installation !
Honestly, I do think conda is much more suited, simpler and compatible with pip.
I actually managed to get pinocchio
to run with pip
, but could not link it to gepetto-gui
, which made following the tutorial difficult. I assumed this difficulty was due to the fact that I did not install pinocchio
from the robotpkg
repository.
Donc mix pip and robotpkg, this is not really possible due to pip. Use meshcat instead of gepetto-viewer if you absolutely need a viewer.
I will close this issue as it seems to be solved.
PS: you should force reinstall with apt.
I ended up solving the issue by :
All of this seems to work so far. I cannot make it work with python 3.8 however, but at this point I give up and will go with 3.6 since I do not really care.
not actually requesting an answer to these, just food for thought : Does it mean that there is no support for python 3.8 ? Or that the preferred installation methods now are pip and conda ? What about the tutorials in the documentation ? They still mention the use of robotpkg or assets installed through it such as the UR5 URDF.
Thank you for your availability !
APT only supports the official Python version provided by the Ubuntu version We do support all the python versions, and if you need a more recent one, you SHOULD switch to conda.
We should update the doc accordingly, but no time yet. @alexandre-blanc Could you help us by making a PR to update the doc? Your contribution will be nice for the whole community.
but no time yet
Understandable !
Could you help us by making a PR to update the doc?
I want to say yes, but cannot make any promises...
Use meshcat instead of gepetto-viewer if you absolutely need a viewer.
My issue with gepetto-gui was that I was trying follow the tutorial in a jupyter notebook, like all the cool kids. It works fine when following the tutorial from a python prompt.
You'll get python 3.8 with robotpkg by upgrading your ubuntu 18.04 to ubuntu 20.04, since this is the version provided by the system :)
Hi, I seem to be facing an issue similar to #625, maybe also related to #1528.
I already described the issue in a comment in #625 but decided to file a new issue instead for visibility/traceability and also because the problem seem to be different.
I run ubuntu 18.04 (bionic) and primarily use python 3.8.
I installed pinocchio from robotpkg following the instructions on the stack-of-tasks website. I selected the py36 version. I set up the environment variables accordingly in my .zshrc :
Then, I tried to import the pinocchio package from python 3.6 and python 3.8 interpreters, with the following result :
I checked the paths and the presence of the pinocchio_pywrap file :
I also tried to look for a
libpinocchio.so.2.6.9
file to no avail :My installation seems fairly clean to me and I don't see any obvious problems. I am not fluent in the build/linking process used to develop python bindings, and I can't figure out what my next step could be. Any help would be much appreciated.