乐视体感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

```

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