9.3-ompl2-使用omplapp
【组件】ompl-open motion planning library2-omplapp
前言
- 使用ompl前端工具
目录
参考
CMake issue installing omplapp
no moudule name _util
installing of Py++
Python binding failed
Performance problem in py++
学习记录
安装
- 先安装gcc >=5
- sudo apt-get install gcc-5 g++-5
- 选择gcc-5,g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
- 安装新版本的libboost
- castxml,若没有安装的话
wget -O - https://midas3.kitware.com/midas/download/item/318227/castxml-linux.tar.gz | tar zxf - -C $HOME
export PATH=$HOME/castxml/bin:$PATH
- pygccxml,若没有安装的话
sudo pip install pygccxml
- py++,如果没有安装的话
sudo -H pip install -vU https://bitbucket.org/ompl/pyplusplus/get/1.6.tar.gz
或者亲自下下来源码安装(最好都装吧,我搞怕了)
/usr/bin/wget --no-check-certificate -O - https://bitbucket.org/ompl/pyplusplus/downloads/pyplusplus-r1247.tgz | tar xzf -
cd ../pyplusplus
/usr/bin/python setup.py build
sudo /usr/bin/python setup.py install
16.04的安装
- 对于ubuntu 16.04,有一些注意事项
# for ubuntu 16.04
sudo apt install castxml libfcl-0.5-dev
# 由于自带库版本过老,所以需要源安装
sudo apt remove python-pygccxml python-py++ gccxml
sudo apt remove liboctomap-dev liboctomap1.6v5
# gccxml has been replaced by castxml, which is installed by apt
- 根据shell文档,接下来需要手动安装octomap and pyplusplus-1.6
cd ./ocotomap
mkdir build
cd ./build
cmake ..
make -j4
sudo make install
cd ./pyplusplus
python setup.py build
sudo python setup.py install
- 后来又找到了方便的方式
sudo -H pip install pygccxml
- 发现还要安装一些依赖项
sudo -H pip install Flask
sudo -H pip install Celery
构建
- 参考网页,下好依赖项,代码不赘述,主要注意几点:
- 记得将ompl文件夹(就是核心库文件夹,需要另外下载)放置到omplapp/
- cmake 找不到libccd,是因为找到了ros中的旧版本文件,此时需要对环境变量进行一下设置,以便让pkg_config先查询/usr/local/lib
哎,linux下的包配置真是满满的恶意!
我之所以在之前出错,是因为ompl的版本和omplapp的版本不一致,导致make bindings一直通不过!
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export CXX=g++
export CXX=g++-5
export MAKEFLAGS="-j `nproc`"
cd ./build/Release
cmake -DCMAKE_BUILD_TYPE=Release ../..
make update_bindings -j4
# 注意,如果内存不够大,请不要用-j4,不然会出现未知错误!
make -j4
sudo make install
# 请耐心等待
- make 通不过
运行实例
- 启动前端界面
./ompl_app.py
附件列表