LoginSignup
2
2

More than 5 years have passed since last update.

ドローンのためのROS

Last updated at Posted at 2017-10-26

ROS導入

はじめに

ROSを導入するOSはLinuxにしましょう。自分はUBUNTU LTS 14.04を使ってます。以降にあるコマンドはすべて端末で入力する用です。

1.ROS

$sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
$wget http://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
$sudo apt-get update
$sudo apt-get install ros-indigo-desktop-full
$sudo rosdep init
$rosdep update
$echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
$source ~/.bashrc
$sudo apt-get install python-rosinstall

$roscore   //動作確認用

ROSで始めるロボットプログラミング

2.ワークスペース

ワークスペースとはROSでいろいろいじる場所のことで、それを作ります。

$mkdir -p ~/catkin_ws/src
$cd ~/catkin_ws/src
$catkin_init_workspace
$cd ~/catkin_ws
$catkin_make

~./bashrc の一番下の行source ~/catkin_ws/devel/setup.bashに

3.パッケージ

パッケージとは自分のプログラムをまとめて置いておくところで、ワークスペースの中に作ります。

$cd ~/catkin_ws/src
$catkin_create_pkg ros_start rospy roscpp std_msgs//ros_startのところは好きな名前で
$cd ~/catkin_ws
$catkin_make
$source ~/catkin_ws/devel/setup.bash

4.ardrone_autonomy?

これを入れるとARドローンが動かせるようになります。細かい動かし方は別ページで

$ cd ~/catkin_ws/src
$ git clone https://github.com/AutonomyLab/ardrone_autonomy.git -b indigo-devel
$ cd ~/catkin_ws
$ rosdep install --from-paths src -i
$ catkin_make

http://ardrone-autonomy.readthedocs.io/en/latest/installation.html

5.tum_ardrone

$cd catkin_ws/src
$git clone https://github.com/tum-vision/tum_ardrone.git -b indigo-devel
$cd ..
$rosdep install tum_ardrone
$catkin_make

6.bebop_autonomy(動作未確認)

$sudo apt-get install build-essential python-rosdep python-catkin-tools
$mkdir -p ~/bebop_ws/src && cd ~/bebop_ws
$catkin init
$git clone https://github.com/AutonomyLab/bebop_autonomy.git src/bebop_autonomy
$rosdep update
$rosdep install --from-paths src -i
$catkin build

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2