Ubuntu16.04 安装ompl库

ompl_1.4.2源代码安装 ubuntu16.04 

1. 下载源代码  http://ompl.kavrakilab.org/download.html 

2. 下载安装文件

3. 修改安装文件权限

chmod u+x install-ompl-ubuntu.sh
  • Next,以下三种安装方式
./install-ompl-ubuntu.sh will install OMPL without Python bindings
./install-ompl-ubuntu.sh --python will install OMPL with Python bindings
./install-ompl-ubuntu.sh --app will install OMPL.app with Python bindings

The script downloads and installs OMPL and all dependencies via apt-get & pip and from source. It will ask for your password to install things. The script has been tested on vanilla installs of Ubuntu 14.04 (Trusty), 15.10 (Wily), 16.04 (Xenial), 17.10 (Artful), and 18.04 (Bionic).

或者按照指导,配置依赖库分别安装

ompl的安装 和 omplapp的安装

Question: pygccxml ImportError导致的问题,查看后是pygccxml和对应的ompl_1.2.1版本不匹配,ubuntu16.04 直接编译最新的ompl_1.4.2就可以了

ubunut 直接安装

apt-get install libompl-dev ompl-demos

 或者下载源代码cmake编译

  • 安装需要的环境
sudo apt-get install libfcl-dev #版本太低,需要下载源码
sudo apt-get install libccd-dev #版本太低,需要下载源码
#python binding sudo apt-get install castxml #建议源码安装,源内版本太老,会导致python_bindings部分出问题
#sudo apt-get install python-flask python-celery sudo -H pip install -vU pygccxml pyplusplus
Git安装方式
mkdir -p build/Release
cd build/Release
cmake ../..
#next step is optional
make -j 4 update_bindings # if you want Python bindings,太消耗虚拟机内存,最好分配4GB以上
make -j 4 # replace "4" with the number of cores on your machine

安装成功之后,/usr/local/lib/python2.7/dist-packages文件夹下面会存在ompl文件夹,为python-bindings生成的一些数据。

如果显示缺少_util _base等信息,可能是安装拷贝的不对,直接从/home/ke/pkgs/omplapp-1.4.2-Source/ompl/py-bindings/ompl拷贝到/usr/local/lib/python2.7/disk-package位置即可,每个文件夹内包含python需要调用的库文件。

错误一:运行ompl_app.py出问题但是运行其他python demos却没问题。

No handlers could be found for logger "OpenGL.arrays.arraydatatype" 
Segmentation fault (core dumped)
如果出现以下错误,解决方式参考此地址 https://bitbucket.org/ompl/ompl/issues/356/no-handlers-could-be-found-for-logger,编译程序之前设置
CMAKE_CXX_FLAGS值为-DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS。重新cmake ../ && make 即可

原文地址:https://www.cnblogs.com/flyinggod/p/12455386.html