Quantcast
Channel: demura.net
Viewing all articles
Browse latest Browse all 757

RealSense D435をROSで使う

$
0
0

RealSense D435をROSで使うメモ。RealSense SDKはapt-getでインストールできるのでとても簡単。ROSのラッパーもすでに提供されているのですぐ使える。このメモはカラー画像の表示まで。

ソフトウェア環境

  • Ubuntu16.04
  • ROS Kinetic
  • RealSense SDK: LibRealSense v2.9.1
  • ROS Wrapper: build 2.0.2

RealSense SDKのインストール

  • このページのとおり実施すればよい。以下の手順はその簡単な日本語訳。
  • リポジトリにIntelサーバーを追加
    • echo ‘deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main’ | sudo tee /etc/apt/sources.list.d/realsense-public.list
  • サーバーの公開鍵を登録
    • sudo apt-key adv –keyserver keys.gnupg.net –recv-key 7DCC6F0F
  • リポジトリのリストと使えるパッケージをリフレッシュする
    • sudo apt-get update
  • デモを実行できるようにインストールする
    • sudo apt-get install realsense-uvcvideo
    • sudo apt-get install librealsense2-utils
  • 開発用に追加のパッケージをインストールする
    • sudo apt-get install librealsense2-dev
    • sudo apt-get install librealsense2-dbg
  • リブートする
    • reboot
  • リブートしたらカーネルがアップデートしているか確認する
    • 次のコマンドを実行してrealsenseの文字列があれば成功
    • modinfo uvcvideo | grep “version:”

ROSラッパーのインストール

  • https://github.com/intel-ros/realsense/releases からSource code (realsense-2.0.2.tar.gz)を~/catkin_ws/srcにダウンロードする
  • cd ~/catkin_ws/src
  • tar xvzf realsense-2.0.2.tar.gz
  • cd ~/catkin_ws
  • catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
    • usr/lib/libusb.aがないと怒られたら、次のコマンドを実施する。
    • sudo ln -s /usr/lib/x86_64-linux-gnu/libusb-1.0.a  /usr/lib/libusb.a
  • catkin_make install

実行

  • roslaunch realsense_ros_camera rs_camera.launch
    • 解像度は640×480 pixel。変更したいときはrs_camera.launchの中を書き換える。
  • rosrun  view_image view_image  image:=/camera/color/image_raw
    • 画像が表示されれば成功。

トピック

$ ~/catkin_ws/src/realsense-2.0.2/realsense_ros_camera/launch$ rostopic list
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates
/camera/color/image_raw/theora
/camera/color/image_raw/theora/parameter_descriptions
/camera/color/image_raw/theora/parameter_updates
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_infra1
/camera/extrinsics/depth_to_infra2
/camera/infra1/camera_info
/camera/infra1/image_rect_raw
/camera/infra1/image_rect_raw/compressed
/camera/infra1/image_rect_raw/compressed/parameter_descriptions
/camera/infra1/image_rect_raw/compressed/parameter_updates
/camera/infra1/image_rect_raw/compressedDepth
/camera/infra1/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra1/image_rect_raw/compressedDepth/parameter_updates
/camera/infra1/image_rect_raw/theora
/camera/infra1/image_rect_raw/theora/parameter_descriptions
/camera/infra1/image_rect_raw/theora/parameter_updates
/camera/infra2/camera_info
/camera/infra2/image_rect_raw
/camera/infra2/image_rect_raw/compressed
/camera/infra2/image_rect_raw/compressed/parameter_descriptions
/camera/infra2/image_rect_raw/compressed/parameter_updates
/camera/infra2/image_rect_raw/compressedDepth
/camera/infra2/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra2/image_rect_raw/compressedDepth/parameter_updates
/camera/infra2/image_rect_raw/theora
/camera/infra2/image_rect_raw/theora/parameter_descriptions
/camera/infra2/image_rect_raw/theora/parameter_updates
/camera/realsense_ros_camera_manager/bond
/camera/realsense_ros_camera_manager/parameter_descriptions
/camera/realsense_ros_camera_manager/parameter_updates
/rosout
/rosout_agg
/tf_static

以上


Viewing all articles
Browse latest Browse all 757

Trending Articles