参考官方教程,过程如下:
-
Ensure you have some required installation dependencies
sudo apt install -qqy lsb-release curl
-
Register the authentication certificate of robotpkg:
sudo mkdir -p /etc/apt/keyrings curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc \ | sudo tee /etc/apt/keyrings/robotpkg.asc
-
Add robotpkg as source repository to apt:
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
-
You need to run at least once apt update to fetch the package descriptions:
sudo apt update
安装 Pinocchio
-
The installation of Pinocchio and its dependencies is made through the line:(此处需要安装python2.7版本)
sudo apt install -qqy robotpkg-py2*-pinocchio
注意:这个过程中可能会出现一些库的冲突,根据提示sudo apt install安装对应的库版本即可。
配置环境变量
把以下内容加入到 $HOME/.bashrc
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/python2.7/site-packages:$PYTHONPATH # Adapt your desired python version here
export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH
All the packages will be installed in the /opt/openrobots
directory.