官网链接:https://orbbec3d.com/develop/
Astra相机:https://github.com/orbbec/ros_astra_camera
普通相机:https://github.com/bosch-ros-pkg/usb_cam.git
开发者社区:https://developer.orbbec.com.cn/download.html?id=53
Astra SDK搭建官方视频教程:https://developer.orbbec.com.cn/develop_details.html?id=3
Create astra udev rule(单品深度相机需执行)
cd ~/astra_ws/src./create.sh
launch启动命令
| Launch文件 | 启动相机型号 |
|---|---|
| astra.launch | Astra,Astra S,Astra mini,Astra mini S |
| astraplus.launch | Astra plus |
| astrapro.launch | Astra pro |
| embedded_s.launch | Deeyea |
| dabai_u3.launch | Dabai |
| gemini.launch | Gemini |
运行环境:虚拟机或双系统
开发者社区:https://developer.orbbec.com.cn/download.html?id=53
xxxxxxxxxxsudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs ros-melodic-pointcloud-to-laserscan ros-melodic-rgbd-launch ros-melodic-libuvc-* ros-melodic-uvc-camera ros-melodic-usb-cam ros-melodic-ar-track-alvar ros-melodic-camera-calibration build-essential freeglut3 freeglut3-dev libsfml-dev
去开发者社区下载SDK文件,即(Astra SDK和OpenNI2 SDK,版本、系统架构要匹配)

文件夹名可能不相同,根据自己需求更改。
xxxxxxxxxxtar -zxvf AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gzcd AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz/install # 进入install文件夹sudo sh ./install.sh输出结果包含以下两行,注意把倒数第二个路径里的install删掉:
xxxxxxxxxxexport ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/includeexport ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/lib
删掉install之后:
xxxxxxxxxxexport ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/includeexport ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/lib
将输出结果复制到~/.bashrc尾部
xxxxxxxxxxgedit ~/.bashrcsource ~/.bashrc
amples目录中即是示例程序,需要依赖include和lib目录
bin文件夹如下:

注意:bin文件夹下均可采取sudo ./或./的方式启动,启动后缀带有-SFML的文件,有画面显示;方式都类似,其他效果可以进行测试。在虚拟机会有启动不成功得现象,请多试几次,目前不清楚什么原因,在双系统下比较容易启动。
xxxxxxxxxxcd ~/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/bin/./SimpleBodyViewer-SFML # 骨骼检测./SimpleHandViewer-SFML # 手指跟随
安装OpenNI
xxxxxxxxxxunzip OpenNI_2.3.0.55.zipcd OpenNI_2.3.0.55/Linux/OpenNI-Linux-x64-2.3.0.55chmod +x install.shsudo ./install.sh
重新拔插设备 初始化OpenNI环境
xxxxxxxxxxsource OpenNIDevEnvironment
编译运行
xxxxxxxxxxcd Samples/SimpleViewermakecd Bin/x64-Release./SimpleViewer

https://developer.orbbec.com.cn/download.html?id=31

下载完毕后,双击安装即可。成功的标志如下


下载完毕后,解压该文件夹,

进入bin文件夹,双击后缀带有exe的任意文件测试即可。

https://developer.orbbec.com.cn/download.html?id=31

解压,进入OrbbecViewer_v1.1.1文件夹,双击
即可。

环境搭建
xxxxxxxxxxsudo apt-get install ros-melodic-async-web-server-cpp ros-melodic-web-video-server ros-melodic-usb-cam
启动相机
xxxxxxxxxxroslaunch astra_camera astrapro.launch # Astraroslaunch usb_cam usb_cam-test.launch # USB启动web_video_server
xxxxxxxxxxrosrun web_video_server web_video_server查看
xxxxxxxxxx本地web浏览器查看http://localhost:8080/必须在同一个局域网下,其他设备查看http://192.168.2.103:8080/(192.168.2.103为该主控的IP地址)注意:建议使用谷歌浏览器或手机QQ浏览器,其他浏览器可能无法打开图像