1、创造工作空间并进入
mkdir ros_ws
cd ros_ws/
2、克隆librealsense
git clone https://github.com/IntelRealSense/librealsense
cd librealsense
3、安装依赖项
sudo apt-get install libssl-dev
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libudev-dev
sudo apt-get install pkg-config
sudo apt-get install libgtk-3-devsudo apt-get install cmakesudo apt-get install libglfw3-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglu1-mesa-dev at
4、运行权限脚本
./scripts/setup_udev_rules.sh
./scripts/patch-realsense-ubuntu-lts.sh
如果运行第一个脚本失败
sudo apt install v4l-utils
5、创建build目录并切换至build目录
mkdir build && cd build
6、编译和安装
cmake .. -DBUILD_EXAMPLES=true
sudo make uninstall && make clean && make && sudo make install
7、插入realsense相机测试
realsense-viewer