欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

TOPPRA 时间优化算法的轨迹规划安装记录

程序员文章站 2022-07-11 15:37:35
...

参考链接:

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 aaa@qq.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遇到的坑

如果一直报错则需要

aaa@qq.com:~/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 ..

即可,如果

TOPPRA 时间优化算法的轨迹规划安装记录

 

则说明没有安装生成C++版本的pybind11,需要下载pybind11的源码编译安装

 

然后重新编译toppra

TOPPRA 时间优化算法的轨迹规划安装记录

 

TOPPRA 时间优化算法的轨迹规划安装记录

运行测试程序

TOPPRA 时间优化算法的轨迹规划安装记录

 

注意如果安装pybind11遇到如下则:

TOPPRA 时间优化算法的轨迹规划安装记录

最后附上我的~/.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

 

相关标签: 轨迹规划