首先安装librealsense(内核5.6并不支持)——>只能源码安装
https://github.com/IntelRealSense/librealsense/blob/v1.12.1/doc/installation.md
git clone https://github.com/IntelRealSense/librealsense
cd librealsense
mkdir build
cd build
cmake ..
make && sudo make install
The library will be installed in /usr/local/lib and header files in /usr/local/include.
Note: If you would also like to compile the code examples use:
cmake .. -DBUILD_EXAMPLES:BOOL=true
make && sudo make install
The example executables will build into ./examples and install into /usr/local/bin.
安装ROS Wrapper
官网参考链接: https://github.com/IntelRealSense/realsense-ros
git clone https://github.com/IntelRealSense/realsense-ros.git
git@github.com:pal-robotics/ddynamic_reconfigure.git
如果编译不通过则很有可能是librealsense未安装成功
roslaunch realsense2_camera rs_rgbd.launch
如果中间报错ResourceNotFound: rgbd_launch
解决方案:sudo apt-get install ros-kinetic-rgbd-launch