Ubuntu18.04在使用英特尔的相机时,我们需要安装librealsense2-SDK才可驱动相机。
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
git clone https://github.com/IntelRealSense/librealsense.git
注意:安装时,不要将相机连在电脑上。
cd ~/librealsense sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev sudo apt-get install libglfw3-dev
cd ~/librealsense sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules && udevadm trigger
cd ~/librealsense mkdir build && cd build cmake ../ cmake ../ -DBUILD_EXAMPLES=true
sudo make uninstall && make clean && make && sudo make install
realsense-viewer
注意:连接相机的数据线必须是USB3.0的数据线(USB口内为蓝色)
mkdir -p ~/realsense_ws/src/ cd ~/realsense_ws/src/ catkin_init_workspace git clone https://github.com/IntelRealSense/realsense-ros.git git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ~/realsense_ws/ catkin_make clean catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release catkin_make install
gedit ./.bashrc
文件末尾添加: source ~/realsense_ws/devel/setup.bash
roslaunch realsense2_camera rs_camera.launch