一、安装SDK
- 1、根据这里增加swap内存
- 2、安装依赖
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install git cmake libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
- 3、获取源码:
git clone https://github.com/IntelRealSense/librealsense.git
或者git clone https://gitee.com/awake658/librealsense
- 4、编译安装
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true -DFORCE_RSUSB_BACKEND=ON -DBUILD_WITH_TM2=false -DIMPORT_DEPTH_CAM_FW=false
make clean && make
sudo make install
- 5、设置udev规则:
sudo ./scripts/setup_udev_rules.sh
二、安装realsense-ros
- 1、获取源码:
git clone https://github.com/IntelRealSense/realsense-ros
或者git clone https://gitee.com/awake658/realsense-ros
- 2、因为ros是源码安装,缺包,需要:
git clone https://github.com/pal-robotics/ddynamic_reconfigure
放在相同目录 - 3、
catkin_make
- 4、
source devel/setup.bash && roslaunch realsense2_camera rs_camera.launch
就可以看到图像的topic了
三、参考
树莓派4整合Intel Realsense深度相机