5
9

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 5 years have passed since last update.

librealsense (sdk2.0) を windows 10 でビルドして LiDAR CAMERA L515 を動かす

Last updated at Posted at 2020-06-12

やること

ここのコードを Windows 10 でビルドして L515 を使って動かします。D435 とかでも基本同じですが、L515 でも動いたよという生存確認(?)です。

image.png

前提

  • Windows 10 Home/Pro
  • LiDAR L515
  • librealsense: Intel RealSense SDK 2.0 (build 2.35.2))
  • Cmake
  • Visual Studio (C++) / 英語パック
  • git for windows

Visual Studio のインストール

ビルドに Visual Stdudio の C++ の開発環境が必要のようです。Visual Studio Installer で「C++によるデスクトップ開発:のワークロードをインストールしておきます。

image.png

また、ビルド時に英語の言語パックのインストールを要求されるので、これも入っていない場合はインストールしておきます。

image.png

Visual Studio 自体は下記からインストール可能です。

下記では Visual Studio 2017 でやってますが、2019 でもいけます。

CMake のインストール

ビルドのために CMake が必要です。インストールされていない場合は、下記からインストールします。必要に応じてパスも通しておきます。

Git のインストール

git は必須ではないですが、あると楽です。以下では git がインストールされているものとして、手順を示します。インストールは下記からできます。

手順

最初に PowerShell を開きます。PowerShell でなくてもできますが、以下では PowerShell を使う前提で手順を示します。

PowerShell を開いたら、git.exe, cmake.exe が使えることを確認しておきます。

>git --version
git version 2.24.1.windows.2

>cmake --version
cmake version 3.18.0-rc1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

ワークディレクトリの作成

以下の説明では ~/Documents/work をワークディレクトリとして使います。もちろん他のディレクトリでもかまいません。

> cd ~/Documents
> mkdir work
> cd work
> git clone https://github.com/IntelRealSense/librealsense
> cd librealsense

Cmake

> mkdir build
> cd build
> cmake ..

cmake が成功したら、build ディレクトリの中に librealsense2.sln ができるはずです。

image.png

Visual Studio でのビルド

cmake で作成された~/Documents/work/librealsense/build/librealsense2.sln を Visual Studio で開きます。

image.png

開いたら、ビルドメニューでビルドします。

実行

ビルドが完了したら、build/Debug の中に example や tools をビルドした exe ができてます。

image.png

下記は、L515 を接続して rs-gl.exe を実行したところです。

l515_1.gif

おまけ

L515 がとりあえず動くか試したいだけなら、下記からツール類のバイナリをダウンロードするのが一番簡単です。

example の中のプログラムで、L515 で動かないものは結構あります。たとえば pose 系のサンプルは T265 でないと動きません。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?