-
Bug descriptionI am trying to build pinocchio from source because I am trying to use it with IsaacSim python, which is required to be python3.10. It seems that the pinocchio version available on conda that supports python3.10 does not have casadi support built-in. My requirements are:
I am using Ubuntu Jammy 22.04.3 echo "Building CasADi..."
git clone https://github.com/casadi/casadi.git -b main /casadi
cd /casadi
mkdir -p build
cd build
cmake ..
make -j4
make install
echo "Installing EigenPy..."
# Create keyrings directory if it doesn't exist
sudo mkdir -p /etc/apt/keyrings
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc \
| sudo tee /etc/apt/keyrings/robotpkg.asc
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/robotpkg.asc] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" \
| sudo tee /etc/apt/sources.list.d/robotpkg.list
apt-get update
apt install robotpkg-py310-eigenpy
export PATH=/opt/openrobots/bin:$PATH
export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/openrobots/lib/python3.10/site-packages:$PYTHONPATH
export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH
echo "Building Pinocchio..."
git clone --recursive https://github.com/stack-of-tasks/pinocchio /pinocchio
cd /pinocchio && mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON_EXECUTABLE=/usr/bin/python3.10 -DBUILD_WITH_CASADI_SUPPORT=on
make -j4
make install The above build works without issues. However, once pinocchio is installed, I get the following error: $ python3.10 -c 'import pinocchio.casadi'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/pinocchio/casadi/__init__.py", line 11, in <module>
from ..pinocchio_pywrap_casadi import *
SystemError: initialization of pinocchio_pywrap_casadi raised unreported exception
I am stuck here. It would be great if you could suggest a path forward, either with fixing this build issue or another way of installing Pinocchio. Related question: Is there a plan to support the latest versions of pinocchio (with casadi support) on pypi.org? This would basically solve my problem. If there's something I can do to help, i'd be glad to. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not what you do in I mean, either (i) you can use /usr/bin/python3.10 provided by ubuntu jammy, and in this case you can directly use robotpkg-py310-pinocchio, which has casadi support enabled, or (ii) you can't use /usr/bin/python3.10 provided by ubuntu jammy, and in this case you can't use robotpkg-py310-eigenpy, and you need to compile that too |
Beta Was this translation helpful? Give feedback.
This is not what you do in
-DPYTHON_EXECUTABLE=/usr/bin/python3.10
, is it ?I mean, either (i) you can use /usr/bin/python3.10 provided by ubuntu jammy, and in this case you can directly use robotpkg-py310-pinocchio, which has casadi support enabled, or (ii) you can't use /usr/bin/python3.10 provided by ubuntu jammy, and in this case you can't use robotpkg-py310-eigenpy, and you need to compile that too