Skip to content

how_to_install_simulator_trusty

Daisuke Sato edited this page Oct 21, 2020 · 3 revisions

Raspberry Pi Mouse Simulatorのインストール方法(Ubuntu Trusty)

Ubuntu 14.04 および ROS Indigoのサポートは終了しています。

以下のドキュメントの更新も終了しているため掲載されている情報は古い可能性があります。

GazeboでRaspberry Pi Mouseをシミュレーションするためのセットアップ方法

Ubuntu 16.04を使用している場合はRaspberry Pi Mouse Simulatorのインストール方法(Ubuntu Xenial)をご覧ください。

概要

Gazebo上でRaspberry Pi Mouseをシミュレートできるようにするため、以下のソフトウェアをインストールします。

動作確認済み環境

  • Ubuntu Desktop 14.04 LTS 64bit

手順

以下の手順でインストール作業を進めていきます。

  1. ROSをインストール
  2. catkin_wsを準備
  3. 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のインストール

今回は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

catkin_wsの準備

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_rosrt-net/raspimouse_simをダウンロードし、それぞれビルドしています。

Trubleshooting

catkin_makeに失敗する

$ 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をご覧ください。

Clone this wiki locally