赞
踩
一、安装OpenNI
从官网上下载相应系统和版本的SDK,我这里是Linux-ARM64版本的,下载的是OpenNI-Linux-Arm64-2.3.0.66。
在解压后的目录中,执行 install.sh 文件
sudo sh install.sh
该脚本一共做了两件事,为摄像头设备增加UDEV规则,把开发环境写到 OpenNIDevEnvironment
文件中。
- cat OpenNIDevEnvironment
- export OPENNI2_INCLUDE=/home/work/abc/OpenNI-Linux-Arm64-2.3.0.65/Include
- export OPENNI2_REDIST=/home/work/abc/OpenNI-Linux-Arm64-2.3.0.65/Redist
注意第一个环境变量的Include,实际的目录名称为 include,记得改过来(要么把目录名称改成大写,要么把环境变量改成小写。)
然后再进行加载使其生效。
source OpenNIDevEnvironment
- env | grep OPENNI2_INCLUDE
- OPENNI2_INCLUDE=/home/<$username>/wk_ws/OpenNI-Linux-Arm64-2.3.0.66/include
OPENNI2_INCLUDE=/home/work/abc/OpenNI-Linux-Arm64-2.3.0.66/include
至此,我们就把OpenNI在Linux/Ubuntu16.04-Arm64上安装成功了。
安装依赖
- cd ~/catkin_ws/src
- git clone https://github.com/orbbec/ros_astra_camera
-
- #5 Create astra udev rule
-
- roscd astra_camera
- ./scripts/create_udev_rules
sudo apt install ros-$ROS_DISTRO-rgbd-launch ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
- cd ~/catkin_ws
- catkin_make --pkg astra_camera
- cd ~/catkin_ws/src
- git clone https://github.com/orbbec/ros_astra_launch
-
-
- roslaunch astra_launch astra.launch
-
-
- roslaunch astra_launch astrapro.launch
如报错
- No matching device found… waiting for devices. Reason: astra_wrapper::AstraDevice::AstraDevice(const string&) @ /tmp/binarydeb/ros-kinetic-astra-camera-0.2.2/src/astra_device.cpp @ 76 : Device open failed
- Could not open “2bc5/0401@3/5”: Failed to set USB interface!
原因是上面步骤的./scripts/create_udev_rules,会在 /etc/udev/rules.d/放一个规则文件56-orbbec-usb.rules
在 astra_camera 目录执行下面命令,就好了。
- ./scripts/create_udev_rules
- sudo service udev reload
- sudo service udev restart
完成。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。