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.py

Advanced: 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:

  1. [openRAVE](https://github.com/rdiankov/openrave)

  2. [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:

  1. [openRAVE](https://github.com/rdiankov/openrave)

  2. [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

 

  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值