Installation:OpenRAVE/ja
From OpenRAVE
Contents |
ダウンロード
ソースコードは [sourceforge]でダウンロード出来ます.
svn co https://openrave.svn.sourceforge.net/svnroot/openrave/trunk openrave
Windows (現在はXPのみサポートしています.)
OpenRAVEはcmakeを使って、いろいろなVisual StudioまたはCygwinのファイルを作ることができます。boost 1.39などの第3者のライブラリはOpenRAVEのソースコードにすでに入っています。
- OpenRAVEのソースをスペースを含まないフォルダーパスにSVNからチェックアウトしてください。(例: C:\openrave)
- Install CMake
- Install Python 2.6, numpy superpack, and Python Imaging Library (PIL) for openravepy python bindings. (Note that openravepy will not compile in Debug mode unless the python debug libraries are also installed.)
- If you are using Octave, make sure to add the path to mkoctfile to the PATH environment variable. If you are using Matlab, make sure that the path to mex is in the PATH environment variable (ie, typing mex on the command line gives the MATLAB compiler). On Windows Mik-Tex overwrites the mex program with its own version, so any matlab paths have to be declared before Mik-Tex in the PATH variable. You can check if the paths are set correctly by starting up the command prompt and typing mkoctfile or mex.
- Run runcmake_win.bat, which will auto-detect your compiler system. This will extract msvc_files.tgz, create a build and inside of it you can find openrave.sln. Open the solution file, select the Release or RelWithDebInfo configuration, and build everything. Once done, build the INSTALL project. This should install everything in C:\Program Files\openrave. The installation directory can be changed by manually calling cmake with -DCMAKE_INSTALL_PREFIX="my/new/install/dir".
- Before running anything, have to modify the following environment variables:
- To PYTHONPATH - add C:\Program Files\openrave\share\openrave
- To Path - add C:\Program Files\openrave\bin to the front. Be very careful when putting it in the back since several uses have had problems with different Qt libraries conflicting!
Currently bullet is not setup to compile with OpenRAVE, so don't try to get it working. OpenRAVE will run just fine without it.
Updating Subversion
Whenever updating subversion, it should just be sufficient to run runcmake_win.bat again and then open the solution file build all the projects, and then manually build the INSTALL project. If an update to libraries or programs happens (for example Octave/MATLAB/python was installed/uninstalled), it is recommended to clear the cmake cache by first removing build/CMakeCache.txt before running runcmake_win.bat.
Linux/Mac OSX
OpenRAVEはqt4でのみ動作します.SoQtまたはOpenRAVEをコンパイルする前に,qt3-dev-tools,libqt3-headersのような全てのqt3に関係するパッケージが削除されていることを確認してください.
もし手順どおりにコンパイルを行ってもエラーが発生した場合,gccのバージョンが低いためかもしれません.Version 4.1かそれ以上のバージョンのgccを使用してください.あなたのPC環境におけるgcc(もしくはg++)のバージョンはgcc --versionで確認できます.
Ubuntuユーザーのためのパッケージ群 (オプション)
OpenRAVEにはいくつかの標準パッケージが必要です.必要なパッケージはあなたが使用しているUbuntuのバージョンによって少し異なるので,以下を参考に必要なパッケージをインストールしてください.
Ubuntu 8.04もしくはそれ以前:
sudo apt-get install g++ cmake libqt4-dev qt4-dev-tools ffmpeg libavcodec-dev libavformat-dev libxvidcore-dev libx264-dev libfaac-dev libogg-dev libvorbis-dev libdc1394-dev liblame-dev libgsm1-dev libboost-dev libboost-regex-dev libxml2-dev libglew-dev libboost-graph-dev libboost-wave-dev libboost-serialization-dev libboost-filesystem-dev libpcre3-dev libboost-thread-dev
Ubuntu 8.10:
sudo apt-get install g++ cmake libqt4-dev qt4-dev-tools ffmpeg libavcodec-dev libavformat-dev libxvidcore4-dev libx264-dev libfaac-dev libogg-dev libvorbis-dev libdc1394-22-dev libgsm1-dev libboost-dev libboost-regex-dev libxml2-dev libglew1.5-dev libsoqt4-dev libboost-graph-dev libode0-dev libboost-wave-dev libboost-serialization-dev libboost-filesystem-dev libpcre3-dev libboost-thread-dev
For Ubuntu 9.04:
sudo apt-get install g++ cmake libqt4-dev qt4-dev-tools ffmpeg libavcodec-dev libavformat-dev libxvidcore4-dev libx264-dev libfaac-dev libogg-dev libvorbis-dev libdc1394-22-dev libgsm1-dev libboost-dev libboost-regex-dev libxml2-dev libglew1.5-dev libsoqt4-dev libboost-graph-dev libode0-dev libboost-wave-dev libboost-serialization-dev libboost-filesystem-dev libpcre3-dev libboost-thread-dev libswscale-dev
OpenRAVEでのビデオ録画の注意:OpenRAVEはシミュレーション画面を動画で保存する機能を持っています.しかしUbuntu 8.10以降,avcodecライブラリは法律上の問題から全てのmpegエンコーダーを削除しました.これはOpenRAVEで録画する際には,常にcodec not foundというエラーメッセージが発生する事を意味しています.録画を正常に行うため,libavformat-unstripped-52とlibavcodec-unstripped-51のパッケージをインストールして下さい.残念ながら,これらのパッケージは開発パッケージと共存することができません.そのため,はじめにOpenRAVEを通常のlibavcodec-devとlibavformat-devパッケージとともにコンパイルし,その後録画の際には,それぞれのunstrippedバージョンに切り変える必要があります.
Fedora Core Users
You might need to add the livna yum repository for ffmpeg. To install the necessary packages type
sudo yum install qt4-devel Coin2-devel glew-devel gsm-devel x264 x264-devel ffmpeg-devel libdc1394-devel libtheora-devel libmp4v2-devel ode-devel boost-devel cmake
Be careful if installing soqt-devel from the package manager, it may be compiled with the wrong version of Qt.
If compiling SoQt, check QTDIR and make sure it points to the correct version.
Max OS X
- First install these libraries:
sudo port install cmake boost libxml2 glew octave
- Qt - download the installer. Can also use port install qt4-mac, but this will take an hour or two.
- Coin3D - download the installer
- SoQt - downoad the latest source from here. Might ask you to set QTDIR to the correct directory.
- ffmpeg and other video recording codecs
Necessary libraries (Only install from sources if not in package manager)
- boost - get from package manager.
- Coin3d - usually package managers have it, but in case they don't: download and install from http://www.coin3d.org.
- SoQt - If installing from package manager, make sure that it is compiled with qt4! Otherwise, download the latest snapshot from here (do not download the official SoQt 1.4.1 code)
- For x86-64 users: SoQt might give a compilation error in SoQtComponent.cpp. To fix it, go into src/Inventor/Qt/SoQtComponent.cpp and on line 103 replace 'unsigned long key' with 'SbDict::Key key'.
Collision Checkers/Physics Simulators
Although OpenRAVE is not tied to any particular collision checker, it requires you install at least one to get things working.
- ODE Collision/Physics - install from sources 0.8-0.10.1 tested to work. It is possible to compile ODE with double precision.
- For 0.10.1, configuring with--enable-new-trimesh option will randomly crash openrave, so use at your own risk.
- If not using enable-new-trimesh, disabling asserts (via --disable-asserts) is necessary due to some weird bug in normalization.
- For 0.10+. If you are installing on x86-64 distro, you have to configure ODE with --enable-shared.
- To compile OpenRAVE with double precision, ODE must be compiled with double precision (via --enable-double-precision)
- Bullet Collision (use v2.74 or greater) - Need to install to a system directory so OpenRAVE can find it using pkg-config. If using autotools' configure, need to remove install-sh before running autogen.sh. The command lines become:
rm install-sh ./autogen.sh ./configure make make install
OpenRAVE will detect bullet when pkg-config --libs bullet outputs the installed libraries.
- PQP Collision - source code separate inside pqprave plugin.
Building OpenRAVE
OpenRAVEと全てのプラグインをインストールするため,端末でOpenRAVEをダウンロードしたルートフォルダに移動し以下を入力して下さい.
make
このコマンドは全てのファイルをコンパイルします.その後,そのファイルをインストールするため端末で以下を入力して下さい.
make install
デフォルトのインストールディレクトリは${OPENRAVE_SOURCE_DIR}/localinstallです. デフォルトと異なるディレクトリにインストールしたい場合は,makeの際に以下のオプションを追加して実行してください.
make prefix=/usr/local
OpenRAVEの最初のインストールの後ライブラリが追加された場合,OpenRAVEを再コンパイルする前にbuild/CMakeCache.txtファイルは削除しなければなりません.さもなければ,新しいシステムの変化点は検知されないでしょう.
Python
In order to use the python bindings through the openravepy module, install python numpy, boost python, and python-dev before compiling openrave (If these packages are installed openrave has been compiled, first remove build/CMakeCache.txt). To setup the python path in bash add the following line:
export PYTHONPATH=$PYTHONPATH:`openrave-config --prefix`/share/openrave
Some demos also require the python scipy and python imaging tk libraries. The Ubuntu Linux command line for all python packages would be:
sudo apt-get install libboost-python-dev python python-numpy python-scipy python-imaging-tk
Octave/Matlab
Both Octave and Matlab are supported and the OpenRAVE build system automatically detects and compiles the mex files for each (call 'make' OpenRAVE after the scripting environments have been installed).
- For Octave users. Make sure mkoctfile is in your path. For Linux users installing octave from the package managers, you have to also install the octave headers package. All the octave functions are stored in ${OPENRAVE_INSTALL_DIR}/share/openrave/octave.
- For matlab users, make sure mex is in your path and is the MATLAB mex function. All the matlab functions are stored in ${OPENRAVE_INSTALL_DIR}/share/openrave/matlab.
For linux, the default install dir is /usr/local. For windows, the default OPENRAVE_INSTALL_DIR is c:\Program Files\openrave. In order to use these functions, call addpath on the appropriate directory inside the Octave/Matlab commands windows. Then savepath to save the settings.
For Windows users using Octave:
- If you are having problems with the JVM, try installing octave using gnuplot (rather than jhandles).
- Compiling mex files should use the same compiler as was used to build the Octave package. As of October 2008, the official Octave binaries are compiled with Visual Studio 2005 (freely available).
For users using Matlab:
- Make sure that mex actually points to the Matlab mex function
Miscellaneous CMake Options
There are many cmake options that control how OpenRAVE is built. Once OpenRAVE is built, most of them can be set by executing
ccmake build
in the root folder. For example, to disable ffmpeg video recording, find the ENABLE_VIDEORECORDING option and turn it to OFF.
You can also set these options during the cmake build time by executing cmake yourself (if you notice all the Makefiles do is wrap calls to cmake), and adding command line arguments like '-DENABLE_VIDEORECORDING=OFF'
Double precision
To compile OpenRAVE with double precision support (ie all dReal types become doubles), set DOUBLE_PRECISION to ON during cmake. For example:
cmake -DDOUBLE_PRECISION=ON ...
Global Plugins and Data Directories
OpenRAVE can be configured to look for plugins and data files like robots and geometry models by two environment variables:
- OPENRAVE_PLUGINS - Use ':' to separate each directory (';' for Windows). At startup, OpenRAVE searches for every shared object/dll plugin in these directories and loads them. If not set, gets defaulted to ${OPENRAVE_INSTALL_DIR}/share/openrave/plugins
- OPENRAVE_DATA - Use ':' to separate each directory (';' for Windows). Everytime OpenRAVE loads a file, it will search it in these directories. If not set, gets defaulted to ${OPENRAVE_INSTALL_DIR}/share/openrave
- OPENRAVE_HOME - Used to set the directory where all openrave specific cached data is stored (like inverse kinematics solvers, robot pre-processed data, etc). The default is ~/.openrave.
OpenRAVE Home Directory
The cache/home directory specified in OPENRAVE_HOME holds various options/settings for OpenRAVE along with cached robot information.

