TOPPRA 时间优化算法的轨迹规划安装记录
參考鏈接:
https://hungpham2511.github.io/toppra/installation.html#installation-instructions-for-c-api
https://stack-of-tasks.github.io/pinocchio/download.html
https://github.com/stack-of-tasks/eigenpy/tree/v2.5.0
https://zhuanlan.zhihu.com/p/104717000
https://zhuanlan.zhihu.com/p/142116903
一下載develop版本,內含cpp版
toppra-develop
二.安裝python版
pip install .You can now try a basic example:
python examples/kinematics.pyAdvanced: Other solver backends
The default installation comes with an implementation of the seidel LP solver, specialized for parametrization problem. Other backends are also available.
To install?qpoases?run following command after installing?pyinvoke
invoke install-solvers?
安裝openrae 和Pymanoid
Advanced: OpenRAVE and Pymanoid
In order to run some of the examples, it is necessary to install?openRAVE. A good instruction for installing this library on Ubuntu 16.04 can be found?here.
Note
The humanoid and redundantly-actuated torque examples are not yet included in the current library. See tag?v0.1?if you want to run these examples.
Multi-contact and torque bounds. To use these functionality, the following libraries are needed:
[openRAVE](https://github.com/rdiankov/openrave)
[pymanoid](https://github.com/stephane-caron/pymanoid)
openRAVE?can be tricky to install, a good instruction for installing?openRAVE?on Ubuntu 16.04 can be found [here](https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html).
To install?pymanoid?locally, do the following?`?sh?mkdir?git?&&?cd?git?git?clone?<pymanoid-git-url>?git?checkout?54299cf?export?PYTHONPATH=$PYTHONPATH:$HOME/git/pymanoid?`
Advanced: OpenRAVE and Pymanoid
In order to run some of the examples, it is necessary to install?openRAVE. A good instruction for installing this library on Ubuntu 16.04 can be found?here.
Note
The humanoid and redundantly-actuated torque examples are not yet included in the current library. See tag?v0.1?if you want to run these examples.
Multi-contact and torque bounds. To use these functionality, the following libraries are needed:
[openRAVE](https://github.com/rdiankov/openrave)
[pymanoid](https://github.com/stephane-caron/pymanoid)
openRAVE?can be tricky to install, a good instruction for installing?openRAVE?on Ubuntu 16.04 can be found [here](https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html).
To install?pymanoid?locally, do the following?`?sh?mkdir?git?&&?cd?git?git?clone?<pymanoid-git-url>?git?checkout?54299cf?export?PYTHONPATH=$PYTHONPATH:$HOME/git/pymanoid?`
?
安裝pymanoid
sudo apt-get install cython libglpk-dev python python-dev python-pip python-scipy python-simplejson
```
- Install the LP solver: ``CVXOPT_BUILD_GLPK=1 pip install cvxopt --user``
- Install the QP solver: ``pip install quadprog --user``
- For polyhedral computations (optional): ``pip install pycddlib --user``
Finally, clone this repository and run the setup script:
```
git clone --recursive https://github.com/stephane-caron/pymanoid.git
cd pymanoid
python setup.py build
python setup.py install --user
三安裝cpp版
預先安裝
1.Install Pinocchio 2.5.0
Add robotpkg apt repository
If you have never added robotpkg as a softwares repository, please follow first the instructions from 1 to 4. Otherwise, go directly to instruction 5. Those instructions are similar to the installation procedures presented in http://robotpkg.openrobots.org/debian.html.
Ensure you have some required installation dependencies
?sudo apt install -qqy lsb-release gnupg2 curl
Add robotpkg as source repository to apt:
?echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" | sudo tee /etc/apt/sources.list.d/robotpkg.list
Register the authentication certificate of robotpkg:
?curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
You need to run at least once apt update to fetch the package descriptions:
?sudo apt-get update
Install Pinocchio
The installation of Pinocchio and its dependencies is made through the line:
?sudo apt install -qqy robotpkg-py27-pinocchio ?# Adapt your desired python version here
It will install all the systems and additional required dependences.
Configure environment variables
All the packages will be installed in the /opt/openrobots directory. To make use of installed libraries and programs, you must need to configure your PATH, PKG_CONFIG_PATH, PYTHONPATH and other similar environment variables to point inside this directory. For instance:
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
You may directly add those lines to your $HOME/.bashrc for a persistent configuration.
2. install eigenpy 2.5.0
Ubuntu
You can easily install EigenPy from binairies.
Add robotpkg apt repository
Add robotpkg as source repository to apt:
sudo sh -c "echo 'deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg' >> /etc/apt/sources.list.d/robotpkg.list"
Register the authentication certificate of robotpkg:
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
You need to run at least once apt update to fetch the package descriptions:
sudo apt-get update
Install EigenPy
The installation of EigenPy and its dependencies is made through the line:
For Python 2.7
sudo apt install robotpkg-py27-eigenpy
3. install qpoases
- GLPK: `sudo apt install libglpk-dev`
- qpOASES: `sudo apt install robotpkg-qpoases` (follow http://robotpkg.openrobots.org/debian.html for robotpkg)
- pinocchio: `sudo apt install robotpkg-pinocchio` (follow http://robotpkg.openrobots.org/debian.html for robotpkg)
?
4.pip install pybind11==2.5
$ git clone -b v2.5 git@github.com:pybind/pybind11.git
$ cd pybind11
$ mkdir build
$ cd build
$ cmake ..
$ sudo make install
生成C++版本的pybind11
然后還需要python版本的pybind11,就可以python setup.py install 源碼安裝 或者pip install pybingd11==2.5
安裝pybind11遇到的坑
如果一直報錯則需要
dell1804@dell1804-G3-3590:~/pybind11/build$ unset PYTHONPATH
然后重新 cmake .. 即可
make -j4
sudo make install
然后
進入toppra源碼cpp文件夾
mkdir build && cd build && cmake -DBUILD_WITH_PINOCCHIO=ON -DBUILD_WITH_qpOASES=ON ..
即可,如果
?
則說明沒有安裝生成C++版本的pybind11,需要下載pybind11的源碼編譯安裝
?
然后重新編譯toppra
?
運行測試程序
?
注意如果安裝pybind11遇到如下則:
最后附上我的~/.bashrc供大家參考
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(openrave-config --python-dir)/openravepy/_openravepy_ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_ export PYTHONPATH=$PYTHONPATH:$(openrave-config --python-dir) export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages/openravepy 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?
總結
以上是生活随笔為你收集整理的TOPPRA 时间优化算法的轨迹规划安装记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 18935 贪吃的小Q
- 下一篇: qRT-PCR 注意事项