官网链接: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
Linux环境
sudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs ros-melodic-pointcloud-to-laserscan ros-melodic-astra-camera ros-melodic-astra-launch 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
Create astra udev rule
xxxxxxxxxx
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
xxxxxxxxxx
sudo apt-get install build-essential freeglut3 freeglut3-dev libsfml-dev
去开发者社区下载SDK文件,即(Astra SDK和OpenNI2 SDK,版本、系统架构要匹配)
xxxxxxxxxx
tar -zxvf AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz
cd AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz
sudo sh ./install.sh
输出结果包含以下两行,注意把倒数第二个路径里的install删掉:
xxxxxxxxxx
export ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/include
export ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/lib
删掉install之后:
xxxxxxxxxx
export ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/include
export ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/lib
将输出结果复制到~/.bashrc尾部
xxxxxxxxxx
gedit ~/.bashrc
source ~/.bashrc
amples目录中即是示例程序,需要依赖include和lib目录
安装OpenNI
xxxxxxxxxx
unzip OpenNI_2.3.0.55.zip
cd OpenNI_2.3.0.55/Linux/OpenNI-Linux-x64-2.3.0.55
chmod +x install.sh
sudo ./install.sh
重新拔插设备 初始化OpenNI环境
xxxxxxxxxx
source OpenNIDevEnvironment
编译运行
xxxxxxxxxx
cd Samples/SimpleViewer
make
cd Bin/x64-Release
./SimpleViewer
xxxxxxxxxx
cd ~/astra、AstraSDK-v2.1.3-Ubuntu18.04-x86_64/bin/
./SimpleBodyViewer-SFML
环境搭建
xxxxxxxxxx
sudo apt-get install ros-melodic-async-web-server-cpp ros-melodic-web-video-server ros-melodic-usb-cam
启动web_video_server
xxxxxxxxxx
rosrun web_video_server web_video_server
查看
xxxxxxxxxx
本地web浏览器查看
http://localhost:8080/
必须在同一个局域网下,其他设备查看
http://192.168.2.103:8080/
(192.168.2.103为该主控的IP地址)
注意:建议使用谷歌浏览器或手机QQ浏览器,其他浏览器可能无法打开图像