ROS 驱动REALSENSE D435i
环境
系统: Ubuntu 20.04.5 LTS
ROS: noetic 1.15.15
相机: REALSENSE D435i
RealSense的SDK2.0安装
1.注册服务器的公钥
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
2.将服务器添加到存储库列表中
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
3.安装SDK2
基础安装
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
选装
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
Tip:安装dev包后,可使用g++ -std=c++11 filename.cpp -lrealsense2
或 别的IDE来编译具有librealsense的应用。
测试安装结果
realsense-viewer
ROS包安装
安装ROS版本的realsense2_camera
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
sudo apt-get install ros-$ROS_DISTRO-realsense2-description
安装rgbd-launch
rgbd_launch是一组打开RGBD设备,并load 所有nodelets转化 raw depth/RGB/IR 流到深度图(depth image), 视差图(disparity image)和点云(point clouds)的launch文件集。
sudo apt-get install ros-noetic-rgbd-launch
测试编译结果:
roslaunch realsense2_camera demo_pointcloud.launch
启动相机话题以供订阅
roslaunch realsense2_camera rs_camera.launch
可以利用`rostopic list`查看现有的Topic,或者利用`RViz`或者`rqt_image_view`等工具订阅这些Topic