PyKDL 运动学动力学库-安装(源码编译方式)
视频讲解:PyKDL 运动学动力学库-安装(源码编译方式)_哔哩哔哩_bilibili
https://github.com/orocos/orocos_kinematics_dynamics
pip3 install PyKDL的方式会失败
dar@dar:~/MuJoCoBin/mujoco-learning$ pip install PyKDL
Defaulting to user installation because normal site-packages is not writeable
Collecting PyKDL
Using cached PyKDL-1.4.0.tar.gz (1.5 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-v_i1ib0_/PyKDL.egg-info
writing /tmp/pip-pip-egg-info-v_i1ib0_/PyKDL.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-v_i1ib0_/PyKDL.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-v_i1ib0_/PyKDL.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-v_i1ib0_/PyKDL.egg-info/SOURCES.txt'
error: package directory 'PyKDL' does not exist
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
使用源码编译的形式
git clone https://github.com/orocos/orocos_kinematics_dynamics.git
参考
https://github.com/orocos/orocos_kinematics_dynamics/blob/master/orocos_kdl/INSTALL.md
sudo apt-get install libeigen3-dev libcppunit-dev
cd orocos_kdl
mkdir build
cd build
cmake ..
make -j32
sudo make install
安装
cd python_orocos_kdl
mkdir build
cd build
cmake ..
make -j32
添加ldd路径到bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo ldconfig
python3 tests/PyKDLtest.py