LoginSignup
9
7

More than 1 year has passed since last update.

ROS OPENCV OAK-D 点群表示設定

Last updated at Posted at 2021-05-31

OPENCV OAK-D とROSの接続後、RVIZでサンプルプログラムにて点群表示を行いました。

環境

mac Big Sar
VMware fusion
ubuntu 20.04
noetic
opencv4

設定準備

あれこれと試行錯誤しましたが、結局、noeticで動作しました。
melodicでも動作するとの事ですが、OPENCV3をOPENCV4への
バージョンアップ時にエラーが出たのでひとまず、noeticでテストしました。

※2021/5/31 仮想マシンでテストする際は、現況では仮想マシンがparallesでは、rvizが動作しません。
こちら再現する場合はVMwareなどの仮想マシンで試してください。

下記URLでROS noetic desktopfulバージョンをインストールしてください。
http://wiki.ros.org/noetic/Installation/Ubuntu
ROSが正常にインストール出来た後、下記手順で進めてください。

依存関係設定ubuntu

$ cd ~

$ sudo wget -qO- http://docs.luxonis.com/_static/install_dependencies.sh | bash

$ echo "export OPENBLAS_CORETYPE=ARMV8" >> ~/.bashrc

$ source ~/.bashrc

VCSツールインストール

$ cd ~

$ python3 -m pip install opencv-python

$ sudo apt install python3-vcstool

rosdep初期化

$ cd ~

$ sudo apt install python3-rosdep

$ sudo rosdep init

$ rosdep update

設定方法

$ cd ~

$ git clone --recursive https://github.com/luxonis/depthai-core.git --branch develop$

$ cd ~/depthai-core

$ mkdir build

$ cd build

$ cmake .. -DBUILD_SHARED_LIBS=ON

$ cmake --build . --config Release --target install

$ cd ~

$ mkdir -p ros_ws/src

$ cd ros_ws/src

$ git clone https://github.com/luxonis/depthai-ros.git --branch noetic-devel

$ git clone https://github.com/luxonis/depthai-ros-examples.git --branch noetic-devel

$ git clone https://github.com/ros-perception/vision_msgs.git --branch noetic-devel

$ cd ~/ros_ws

$ source /opt/ros/<ros-distro>/setup.bash

$ catkin_make_isolated --cmake-args -D depthai_DIR=~/depthai-core/build/install/lib/cmake/depthai

動作テスト

※動作テスト前に vmwareのUSB3.0へ設定変更してください。
詳細は下記URL参照
https://kb.vmware.com/s/article/2128105?lang=ja

$ cd ~/ros_ws

$ source ~/ros_ws/devel_isolated/setup.bash

$ roslaunch depthai_examples stereo_nodelet.launch

するとrvizが立ち上がり点群表示されます。

現在、点群表示が白オンリーでros-depthaiパッケージにはRGB表示はまだ
実装されていないようです。

参考

9
7
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
9
7