Intel Realsense D435是Intel生产的一款RGBD相机,可以在ROS系统中安装和使用,本文使用的软件配置如下:
- Ubuntu 16.04
- 内核版本:4.15.0
- ROS kinetic
1. 前期准备
a. 首先更新Ubuntu及内核:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
b. 升级程序包
sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial
c. 升级OS Boot并重启使用正确的内核
sudo update-grub && sudo reboot
d. 查看内核版本
uname -r
确定系统内核版本是 4.[4,8,10,13,15,16]
e. 下载源程序
ROS源程序地址: https://github.com/IntelRealSense/realsense-ros/releases
根据ROS版本下载支持该版本的SDK
SDK源程序地址: https://github.com/IntelRealSense/librealsense/releases/tag/v2.25.0
f. 解压文件到 ~/librealsense/文件夹下
g. 在路径~/librealsense/下打开终端安装依赖项,不要连接D435相机。
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
h. 安装对应Ubuntu版本的依赖项
Ubuntu 16.04版本:
sudo apt-get install libglfw3-dev
i. 运行脚本
./scripts/setup_udev_rules.sh
j. 建立并应用patched内核模块
这步有点儿慢
./scripts/patch-realsense-ubuntu-lts.sh
2.安装SDK
a. 运行CMake
mkdir build && cd build cmake ../ cmake ../ -DBUILD_EXAMPLES=true
b. 重编译和安装
sudo make uninstall && make clean && make && sudo make install
c. 运行viewer查看相机
realsense-viewer
d. 可在realsense viewer中更新Firmware
3.安装ROS包
将代码放于catkin_ws/src/
catkin_init_workspace cd .. catkin_make clean catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release catkin_make install echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc source ~/.bashrc
参考资料:
ROS: https://github.com/IntelRealSense/realsense-ros
SDK: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md
https://blog.csdn.net/sinat_23853639/article/details/88044019