10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ROS初心者がeagleyeを使ってみた

Last updated at Posted at 2020-04-01

はじめに

ROS初心者がデモデータを使ってeagleyeを動かしてみました.
eagleyeとはMapⅣが提供しているGNSSとIMUを利用した車両位置特定のためのオープンソースソフトウェアです.
以下からダウンロードできます.
eagleye

ソフトウェア環境

ubuntu 18.04 LTS
ROS Melodic
Autoware AI

ROS Melodicはここからインストールしました.
Autoware AIはここからインストールしました.

準備

catkinワークスペースを作成

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

RTKLIBをクローンしてビルド

$ sudo apt-get install gfortran
$ cd
$ git clone -b rtklib_ros_bridge https://github.com/MapIV/RTKLIB.git
$ cd ~/RTKLIB/lib/iers/gcc/  
$ make   
$ cd ~/RTKLIB/app  
$ make   

rtklib_ros_bridgeをクローンしてビルド

$ cd ~/catkin_ws/src  
$ git clone https://github.com/MapIV/rtklib_ros_bridge.git  
$ cd ..  
$ catkin_make -DCMAKE_BUILD_TYPE=Release

nmea_commsをクローンしてビルド

$ cd ~/catkin_ws/src  
$ git clone https://github.com/MapIV/nmea_comms.git  
$ cd ..  
$ catkin_make -DCMAKE_BUILD_TYPE=Release

依存パッケージのインストール

$ sudo apt-get install ros-melodic-geodesy  
$ sudo apt-get install ros-melodic-can-msgs  
$ sudo apt-get install ros-melodic-nmea-msgs

eagleyeをクローン

$ cd ~/catkin_ws/src
$ git clone https://github.com/MapIV/eagleye.git
$ cd ..
$ catkin_make -DCMAKE_BUILD_TYPE=Release

homeにrosbagフォルダを作り,その中にデータ(.bag)を入れます.
rosbag_001.png

eagleyeを動かしてみる

eagleyeの起動

$ cd ~/catkin_ws
$ source devel/setup.bash
$ roslaunch eagleye_rt eagleye_rt.launchh

rosbagの起動

$ cd ~/rosbag
$ rosbag play eagleye_sample.bag

eagleye_sample.bagはファイル名なので適宜変更
以下の画像のようになればeagleyeは正しく起動しています.
左側がeagleye,右側がrosbagの実行画面です.
最初は各項目がFalseになっていますが,しばらくするとTrueになります.
megken@megken-Z390M-S01_ _-rosbag_004.png

Eagleyeとrosbagが正常に動作することを確認したら,Eagleyeとrosbagをctrl+Cで終わらせてください.

Autoware AIで視覚的に動かす

Autoware AIのインストール参考

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudo apt update
$ sudo apt install git
$ sudo apt install -y python-catkin-pkg python-rosdep ros-melodic-catkin
$ sudo apt install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
$ pip3 install -U setuptools

ソースのコンパイル

$ mkdir -p autoware.ai/src
$ cd autoware.ai
$ wget -O autoware.ai.repos https://gitlab.com/autowarefoundation/autoware.ai/autoware/raw/1.14.0/autoware.ai.repos?inline=false
$ vcs import src < autoware.ai.repos
$ sudo rosdep init
$ rosdep update
$ rosdep install -y --from-paths src --ignore-src --rosdistro melodic
$ source /opt/ros/melodic/setup.bash

CUDA Supportあるとき

$ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

CUDA Supportないとき

$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Autoware AIの起動

$ cd ~/autoware.ai
$ source install/setup.bash
$ roslaunch runtime_manager runtime_manager.launch

Runtime managerが立ち上がったら,Simulationタブで.bagを入力しPlayして,すぐposeする.

eagleyeの起動

$ cd ~/catkin_ws
$ source devel/setup.bash
$ roslaunch eagleye_rt eagleye_rt.launchh

fix2pose.launchの起動

$ cd ~/catkin_ws
$ source devel/setup.bash
$ roslaunch fix2pose fix2pose.launch

AutowareAI上で,SetupタブのTFとVehicleModelを有効にする.
MapタブのPoint Cloud,Vector Map,TFに適宜データを入れて有効にします.
(データを入れるときは、フォルダの中身全てです)

Simulationタブでpose解除.Rviz起動

eagleyeのpositionがTrueになると動き始めます.
デフォルトでは、RVizのTarget Frameがbase_linkになっており、eagleyeの結果が視覚的にわかりやすく表示されます.
RViz-_005.png

最後に

ROS初心者がサンプルデータを使ってeagleyeを動かしてみました.
MapⅣが提供しているeagleyeをぜひ利用してみてください.

10
4
2

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
10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?