官方下载地址:https://developer.orbbec.com.cn/download.html?id=13

先下载Astra sdk: AstraSDK-v2.1.2-Linux-aarch64

再下载OpenNI : OpenNI-Linux-Arm64-2.3.0.66

分别解压

进入OpenNI-Linux-Arm64-2.3.0.66内

sudo chmod a+x install.sh
sudo ./install.sh
source OpenNIDevEnvironment

#进入sample文件夹
export OPENNI2_INCLUDE=/usr/include/openni2
#随便进入某个例子
make

进入 AstraSDK-v2.1.2-Linux-aarch64 里面的install文件夹

sudo chmod a+x install.sh
sudo apt-get install libsfml-dev

安装依赖

sudo apt install ros-melodic-rgbd-launch ros-melodic-libuvc ros-melodic-libuvc-camera ros-melodic-libuvc-ros

ROS

git clone https://github.com/orbbec/ros_astra_launch.git
git clone https://github.com/orbbec/ros_astra_camera.git

roscd astra_camera
./scripts/create_udev_rules

cd ~/catkin_ws
catkin_make --pkg astra_camera

#执行
lsusb

其中2bc5:0502是RGB模块,2bc5:0403是深度模块。

一种是修改astrapro.launch文件,另一种是修改astra.launch文件

一,启动文件在~/catkin_ws/src/ros_astra_camera-master/launch中,打开astrapro.launch文件,将71行的value值改为0x0502,如下图所示。保存修改。

二,修改astra.launch文件

将下面内容复制以下代码到“< /launch >”的前面

<node pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen" 	/>
<param name="width" type="int" value="320" />
<param name="height" type="int" value="240" />
<param name="fps" type="int" value="30" />
<param name="frame" type="string" value="wide_stereo" />

<param name="auto_focus" type="bool" value="False" />
<param name="focus_absolute" type="int" value="0" />
<!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->

<param name="device" type="string" value="/dev/video1"/> 
<param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" />

“/dev/video2″修改为深度相机对应的设备文件。
一般台式机:video0和video1就对应的外接相机,此时launch中写”/dev/video0″即可
一般笔记本:video0和video1就对应的自带相机,此时launch中写”/dev/video2″即可
我的jetson nano,因为有csi排线摄像头占用了video0,所以我的乐视摄像头是video1

roslaunch astra_camera astrapro.launch
#or
roslaunch astra_camera astra.launch 

rviz

rqt_image_view

击Add,添加Image
订阅 */image_raw 话题即可显示彩色和深度图像。

运行roslaunch astra_camera astrapro.launch 可以显示ir,至于深度和rgb都不行

运行roslaunch astra_camera astra.launch ,出错如下

Resource not found: uvc_camera