2017年6月4日日曜日

WindowsにROSをインストールする(2017/06バージョン:Default がUbuntu16.04に)

いつなっていたかは調べ中だが、Windows 10  のBashのベースとなっているUbuntuのバージョンが16.04に変わっていた!!

ちょっとBashを入れなおそうとして、Bashを全部消して再インストール。しかしROSがはいらん。あれ、おんなじやり方しているのに。Dependencyの解決のところでErrorがでる。
webkit_dependency: No definition of [python-qt-bindings-webkit] for os version [xenial]

ん?なぜだ?

ってふと思い立ち、OSのVersionを調べると・・・Ubuntu16.04になっているやん。
そういや、XenialってUbuntu16.04のことだった。

Ubuntu14.04の時はIndigoを入れていたが、16.04になったのでKineticを入れないといかん。
当たり前だ。

Indigoの時と同じくソースからインストールしなきゃいけないっぽいので、通常ではなく、
http://wiki.ros.org/kinetic/Installation/Source
のインストラクションに従いましょう。(1部を除いて同じことやるだけなので、ちょっと手を抜きます。)

Installing bootstrap dependencies

$ sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential

Initializing rosdep


$ sudo rosdep init
$ rosdep update

Create a catkin Workspace

$ mkdir ~/ros_catkin_ws
$ cd ~/ros_catkin_ws
Desktop-Full Install: ROS, rqtrviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
$ rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
$ wstool init -j8 src kinetic-desktop-full-wet.rosinstall

Resolving Dependencies

$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
ここからがちょっと違う。上の処理を続けていると、shiboken2 が見つからないと出てくる。custom buildの一部らしいのだが、外し方もわからないので、これの依存関係を入れる。(https://launchpad.net/~thopiekar/+archive/ubuntu/pyside-git)
$ sudo add-apt-repository ppa:thopiekar/pyside-git
$ sudo apt-get update
もう一回、
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y

Building the catkin Workspace

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
ちょー時間かかった。根気よく待つ。・・・・・
Successful!!無事終了しましたー

source ~/ros_catkin_ws/install_isolated/setup.bash
したあとに、
Rosrun
して、問題なければOK!!