(1)安装SDK
检查内核版本
cat /proc/version
uname -a
Linux yang-OMEN-Laptop-15-ek0xxx 5.4.0-73-generic #82~18.04.1-Ubuntu SMP Fri Apr 16 15:10:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Register the server’s public key:
`sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE`
2.Add the server to the list of repositories:
Ubuntu 18 LTS:
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u
3.Install the libraries (see section below if upgrading packages):
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
4.Optionally install the developer and debug packages:
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
5.Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.
realsense-viewer
(2)安装测试realsense
这个realsense指的是对应的realsense相机的ROS包,官方教程如下:
官方教程
cd ~/catkin_ws/src
git clone https://github.com/intel-ros/realsense.git
cd ..
catkin_make
rospack profile
source devel/setup.zsh
roslaunch realsense2_camera rs_camera.launch
发布的主题根据设备和参数的不同而不同。在运行上面带有D435i的命令之后,下面的主题列表将可用:
/camera/color/camera_info
/camera/color/image_raw
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_infra1
/camera/extrinsics/depth_to_infra2
/camera/infra1/camera_info
/camera/infra1/image_rect_raw
/camera/infra2/camera_info
/camera/infra2/image_rect_raw
/camera/gyro/imu_info
/camera/gyro/sample
/camera/accel/imu_info
/camera/accel/sample
/diagnostics