LoginSignup
5
13

More than 3 years have passed since last update.

DJI Telloのカメラ でVisual-SLAMのORB-SLAM2 を動かしてみた

Last updated at Posted at 2019-10-28

DJI Tello等ドローンの自律飛行を実現するには、3D環境でナビゲーション経路を計画としてOMPL(Open Motion Planning Library)を試してみます。

目次

  1. OMPLのインストール
  2. OMPLの基礎
  3. OMPL.appの入門
  4. OMPLの使用
  5. DJI Telloの使用
    1. DJI Telloのフロントカメラのcamera_calibration
    2. Visual SLAM ORB_SLAM2 用のカメラキャリブレーションYamlファイルの作成
    3. DJI Telloのカメラ でVisual-SLAMのORB-SLAM2 を動かしてみた ← いまココ
  6. navigationスタックの使い方
    1. Turtlebot3 NavigationをGazebo Simulationで動かしてみた
    2. Turtlebot3 Navigationでmap_fileの代わりにSLAMを使用
    3. ARdroneのシミュレーターをGazeboで動かす
    4. AirSimのシミュレーターを動かす
    5. octomapのインストール
    6. 単眼カメラでORB_SLAM2から3D point clouodの生成
    7. point_cloud2から3D octomapの生成
  7. OMPLで3D 経路計画
    1. 状態空間環境のセットアップ

動作環境

  • Ubuntu 18.04
  • ROS Melodic
  • Tello EDU

DJI Telloのカメラ でVisual-SLAMのORB-SLAM2

DJI Telloの単眼カメラでVisual-SLAM自己位置推定検証で、ORB-SLAM2 を動かしてみた。

環境

Ubuntu 18.04
ROS Melodic
Tello EDU
tello_driver
Visual-SLAMのORB-SLAM2

tello_driverのインストール

tello_driverをcatkin_wsのsrcにgit cloneします。

git clone --recursive https://github.com/appie-17/tello_driver.git

必要なライブラリのインストール

camera_info_manager_pyをcatkin_wsのsrcにgit cloneします。

git clone https://github.com/ros-perception/camera_info_manager_py.git

image_transportをインストールします。

sudo apt-get install ros-melodic-image-transport

H264動画ストリームのデコード

tello_driverの「tello_node.launch」にimage_transportのrepublishを追加します。
「/tello/image_raw/h264」から「/tello/image_raw」にデコード

  <!-- <node pkg="image_transport" name="image_compressed" type="republish" args="raw in:=image_raw compressed out:=image_raw" />-->
  <node pkg="image_transport" name="image_decompressed" type="republish" args="compressed in:=image_raw raw out:=image_raw">
    <param name="image_transport" value="h264"/>
  </node>

ORB-SLAM2のインストール

必要なライブラリのインストール

sudo apt install libglew-dev cmake libjpeg-dev libtiff5-dev libopenexr-dev libpng-dev
sudo apt install ros-melodic-tf

Pangolinのインストール

$ git clone https://github.com/stevenlovegrove/Pangolin.git
$ cd Pangolin
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ sudo make install

ORB_SLAM2のインストール

$ git clone https://github.com/ILab-01/ORB_SLAM2.git
$ cd ORB_SLAM2
$ chmod +x build.sh

$ ./build.sh

ORB_SLAM2/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.ccにincludeを追記します。

#include <unistd.h>
$ export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/XXX_YOUR_PATH_XXX/ORB_SLAM2/Examples/ROS
$ chmod +x build_ros.sh
$ ./build_ros.sh

ORB_SLAM2 用のカメラキャリブレーションYamlファイルの作成

DJI Telloのフロントカメラのcamera_calibration
ORB_SLAM2用カメラキャリブレーションYamlファイルの作成

tello_driverの起動

$ roslaunch tello_driver tello_node.launch

Visual-SLAMのORB-SLAM2の起動

$ rosrun ORB_SLAM2 Mono 'ORB_SLAM2/Vocabulary/ORBvoc.txt' 'ORB_SLAM2/Examples/ROS/ORB_SLAM2/calibration_tello.yaml'

image.png

image.png

ORB-SLAM2のYouTube動画
Visual-SLAMのORB-SLAM2を起動

Next: 6.1. Turtlebot3 NavigationをGazebo Simulationで動かしてみた

Prev: 5.2. Visual SLAM ORB_SLAM2 用のカメラキャリブレーションYamlファイルの作成

5
13
4

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
5
13