ロボット全身の制御用ライブラリ、OpenSoTのインストール方法

# OpenSoTとは
イタリア工科大学（Istituto italiano di tecnologia）発の、ロボットの全身制御用のライブラリ。 「エンドエフェクタの位置を制御するタスク」、「重心を支持領域内に収めるタスク」など、ロボットの制御に必要な支持を「タスク」として与えてやることができる。それぞれのタスクには重要度を割り当てることができる。 DARPA Robotics Challengeでのイタリアチーム(Walk-manロボットを使用)のソフトウェアにも使われていた模様。
## 資料
* [WALK-MAN Team Built Brand New, Highly Custom Robot for DRC Finals- IEEE Spectrum](https://spectrum.ieee.org/automaton/robotics/humanoids/walkman-humanoid-robot-iit)
* [OpenSoT: A whole-body control library for the compliant humanoid robot COMAN (OpenSoTについての論文)](https://ieeexplore.ieee.org/document/7140076/)
* [Walk-man page](http://www.walk-man.eu/)
* [Walk-man videos](http://www.walk-man.eu/results/videos)
* [GitHub](https://github.com/robotology/OpenSoT)

# インストール
GitHubの[OpenSoT-superbuild](https://github.com/EnricoMingo/OpenSoT-superbuild)の指示に大体したがっていけばよいが、makeすると、途中で

```
[ 30%] Performing configure step for 'RDC2018'
Not searching for unused variables given on the command line.
loading initial cache file /home/yasu/GitHub/OpenSoT-superbuild/build/external/RDC2018/CMakeFiles/YCMTmp/RDC2018-cache.cmake
-- Using CATKIN_DEVEL_PREFIX: /home/yasu/GitHub/OpenSoT-superbuild/build/external/RDC2018/devel
-- Using CMAKE_PREFIX_PATH: /home/yasu/GitHub/Mini-Mobile-Manipulator/catkin_ws/devel;/opt/ros/kinetic;/home/yasu/GitHub/OpenSoT-superbuild/build/install
-- This workspace overlays: /opt/ros/kinetic;/home/yasu/GitHub/OpenSoT-superbuild/build/install
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/yasu/GitHub/OpenSoT-superbuild/build/external/RDC2018/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:17 (message):
  

  Assertion failed: check for file existence, but filename
  (RT_LIBRARY-NOTFOUND) unset.  Message: RT Library

Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:147 (include)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/yasu/GitHub/OpenSoT-superbuild/build/external/RDC2018/CMakeFiles/CMakeOutput.log".
See also "/home/yasu/GitHub/OpenSoT-superbuild/build/external/RDC2018/CMakeFiles/CMakeError.log".
projects/CMakeFiles/RDC2018.dir/build.make:101: recipe for target 'external/RDC2018/CMakeFiles/YCMStamp/RDC2018-configure' failed
make[2]: *** [external/RDC2018/CMakeFiles/YCMStamp/RDC2018-configure] Error 1
CMakeFiles/Makefile2:1338: recipe for target 'projects/CMakeFiles/RDC2018.dir/all' failed
make[1]: *** [projects/CMakeFiles/RDC2018.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
```

とエラーが出てコンパイルができない問題があった。`RT_LIBRARY`が曲者っぽかたのでググってたら[見つけたQ&A](https://answers.ros.org/question/297453/rt_library-notfound-unset-message-rt-library/)を参考に、*/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake*内の、RT_LIBRARYについてのチェックするコードを消してみたらうまく行った。

```cmake
if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID))
  if (${CMAKE_VERSION} VERSION_LESS 2.8.4)
    # cmake later than 2.8.0 appears to have a better find_library
    # that knows about the ABI of the compiler.  For lucid we just
    # depend on the linker to find it for us.
    set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for cmake < 2.8.4")
  #else()
  #  find_library(RT_LIBRARY rt)
  #  assert_file_exists(${RT_LIBRARY} "RT Library")
  endif()
  #message(STATUS "RT_LIBRARY: ${RT_LIBRARY}")
endif()

```

これで、`make`も`sudo make install`も通るようになった。