樂視體感astra pro深度攝像頭在ros系統獲取 深度圖像 彩色圖像 無色彩點雲數據 彩色點雲數據


# 1.下載 https://orbbec3d.com/develop/ 這個官網的驅動

```bash
# 下載驅動文件:OpenNI_2.3.0.63(裏面包含linux和windows的驅動)

# 下載SDK文件(linux):AstraSDK-v2.1.1-24f74b8b15-Ubuntu-x86_64

# 下載SDK文件(windows):當時沒有下載

# 下載用戶手冊:Doc_SDK_AstraSDK-v2.1.0-9bced77c41.chm
```

# 2.驅動安裝方法參考:/OpenNI_2.3.0.63/Linux/Readme

```bash
# There are two zip files, one is for 32bit machine, the other one is for 64bit

# We choose 64bit(x64) and make the example as follows:


# To run visual samples(e.g., SimpleViewer), you will need freeglut3 header and libaries, please install:

$ sudo apt-get install build-essential freeglut3 freeglut3-dev

#check udev version, Orbbec Driver need libudev.so.1, if can't find it, can make symbolic link from libudev.so.x.x,
#which usually locate in /lib/x86_64-linux-gnu or /lib/i386-linux-gnu
$ldconfig -p | grep libudev.so.1
$cd /lib/x86_64-linux-gnu
$sudo ln -s libudev.so.x.x.x libudev.so.1

# copy tgz file to any place you want(e.g., Home)

# unzip tgz file
$ tar zxvf OpenNI-Linux-x64-2.2-0118.tgz
$ cd OpenNI-Linux-x64-2.2

# run install.sh to generate OpenNIDevEnvironment, which contains OpenNI development environment

$ sudo sh ./install.sh

# please replug in the device for usb-register

# add environment variables
$ source OpenNIDevEnvironment

# build sample(e.g., SimpleViewer)
$ cd Samples/SimpleViewer
$ make

# run sample
# connect sensor
$ cd Bin/x64-Release
$ ./SimpleViewer       這會報錯,深度和那個尺寸大小不一樣

# now you should be able to see a GUI window showing the depth stream video

```

測試和查看

```bash
./SimpleViewer
./ClosestPointViewer

ldd SimpleViewer
```

# 3.SDK安裝方法參考:

```bash

# 解壓AstraSDK-v2.0.18-05cfa52534-20191108T074013Z-ubuntu1604.tar.gz,並修改文件夾名爲AstraSDK-v2.0.18-Linux

# 裏面主要有
/AstraSDK-v2.0.18-Linux/samples/cmake/FindSFML.cmake
/AstraSDK-v2.0.18-Linux/samples/cmake/FindAstra.cmake
/AstraSDK-v2.0.18-Linux/samples/cmake/cpp-api        裏面都是cpp文件
/AstraSDK-v2.0.18-Linux/samples/cmake/sfml            裏面都是cpp文件


# 如果運行不了程序,就按下面的方法,自己編譯安裝一下
# 安裝方法參考:樂視深度相機使用記錄(2).md
```

測試和查看

```bash
# 進入AstraSDK-v2.0.18-Linux文件夾:
./bin/SimpleStreamViewer-SFML

ldd bin/SimpleStreamViewer-SFML
```

# ------------------------------------------

## 使用USB連接攝像頭後,查看設備是否存在:

```bash
> ls /dev/video*
/dev/video0
[臺式機沒有內置攝像頭,所以0號設備就是外接攝像頭設備]
```

## 簡單查看相機正常圖像:

```bash
> cheese
[cheese 是Ubuntu內置的開啓攝像頭設備的工具,然後就可以看到來自相機的RGB圖像]
```

## lsusb

```bash
liuhao@liuhao-Lenovo:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04ca:7070 Lite-On Technology Corp. 
Bus 001 Device 002: ID 17ef:60ca Lenovo 
Bus 001 Device 004: ID 0bda:b023 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
liuhao@liuhao-Lenovo:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04ca:7070 Lite-On Technology Corp. 
Bus 001 Device 002: ID 17ef:60ca Lenovo 
Bus 001 Device 013: ID 2bc5:0502                                  # 插上相機,多了這個
Bus 001 Device 012: ID 2bc5:0403                                  # 插上相機,多了這個
Bus 001 Device 011: ID 05e3:0610 Genesys Logic, Inc. 4-port hub    # 插上相機,多了這個
Bus 001 Device 004: ID 0bda:b023 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
liuhao@liuhao-Lenovo:~$ 

```

## 查看558-orbbec-usb.rules

```bash
liuhao@liuhao-Lenovo:~$ cd /etc/udev/rules.d/

liuhao@liuhao-Lenovo:/etc/udev/rules.d$ ls
558-orbbec-usb.rules  90-kinect2.rules

```

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章