-
Notifications
You must be signed in to change notification settings - Fork 30
how_to_install_simulator_trusty
Ubuntu 14.04 および ROS Indigoのサポートは終了しています。
以下のドキュメントの更新も終了しているため掲載されている情報は古い可能性があります。
GazeboでRaspberry Pi Mouseをシミュレーションするためのセットアップ方法
Ubuntu 16.04を使用している場合はRaspberry Pi Mouse Simulatorのインストール方法(Ubuntu Xenial)をご覧ください。
Gazebo上でRaspberry Pi Mouseをシミュレートできるようにするため、以下のソフトウェアをインストールします。
- ROS Indigo
- Gazebo 2.x (ROSとともにインストール)
- rt-net/raspimouse_sim
- Ubuntu Desktop 14.04 LTS 64bit
以下の手順でインストール作業を進めていきます。
- ROSをインストール
-
catkin_ws
を準備 - rt-net/raspimouse_simをインストール
必要なコマンドをまとめると、以下のようになります。
sudo apt-get update
sudo apt-get install -y curl
bash -c "$(curl -SsfL https://git.io/ros-indigo-desktop)"
source ~/.bashrc
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_init_workspace src
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
catkin_make && source ~/catkin_ws/devel/setup.bash
bash -exv -c "$(curl -SsfL https://git.io/raspimouse-sim-installer)"
source ~/.bashrc
今回はROSのインストールにryuichiueda/ros_setup_scripts_Ubuntu14.04_serverを改良したTiryoh/ros_setup_scripts_Ubuntu14.04_desktopを使用します。
インストーラを使用するに当たり、まずは以下のコマンドでパッケージマネージャ(apt)のパッケージリストを最新版にし、curlをインストールします。1行ずつ実行してください。
sudo apt-get update
sudo apt-get install -y curl
次にインストーラを実行します。
bash -c "$(curl -SsfL https://git.io/ros-indigo-desktop)"
最終的に以下のログが出ていればインストール成功です。
***INSTRUCTION*****************
* do the following command *
* $ source ~/.bashrc *
* after that, try *
* $ LANG=C roscore *
*******************************
ROSのインストールについて詳しく調べたい場合はROS Wikiをご覧ください。
このインストーラを使ってapt-getでインストールするパッケージは以下の通りです。
- ros-indigo-desktop-full
- ros-indigo-gazebo-ros-control
- ros-indigo-ros-controllers
ROSのパッケージを保存するためのワークスペースを用意します。1行ずつ実行してください。
source ~/.bashrc
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_init_workspace src
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
catkin_make && source ~/catkin_ws/devel/setup.bash
rt-net/raspimouse_simのインストール
インストーラを実行します。
bash -exv -c "$(curl -SsfL https://git.io/raspimouse-sim-installer)"
最終的に以下のログが出ていればインストール成功です。
###HOW TO VERIFY###
# roslaunch raspimouse_gazebo raspimouse_with_samplemaze.launch
# rosrun raspimouse_control controller_vel_publisher.py
raspimouse_simの実行にはraspimouse_rosのファイルが必要になります。
このインストーラではryuichiueda/raspimouse_rosとrt-net/raspimouse_simをダウンロードし、それぞれビルドしています。
$ catkin_make
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
Build space: /home/ubuntu/catkin_ws/build
Devel space: /home/ubuntu/catkin_ws/devel
Install space: /home/ubuntu/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ubuntu/catkin_ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/ubuntu/catkin_ws/build"
####
上記のようになにもビルドせず、目的のパッケージのcatkin_makeに失敗する場合があります。
setup.bash
を再読み込みしてからcatkin_makeしてみてください。
詳しくはROSトラブルシューティング#catkin_make-failedをご覧ください。