一、安装测试librealsense SDK 2.0
1.注册公钥
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
2.添加repositories(Ubuntu 18.04)
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
3.安装library
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
4.安装developer和debug packages
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
5.启动测试,需要连接USB3.0接口,要不然会连接失败。
realsense-viewer
二.安装测试realsense的ROS包
1.需要提前安装好ROS:点这
2.安装
cd ~/catkin_ws/src
git clone https://github.com/intel-ros/realsense.git
cd ..
catkin_make
rospack profile
source devel/setup.sh
catkin_make可能报错缺少ddynamic_reconfigure,请到github下载代码直接放置到你的catkin_ws/src中
3.启动测试
roslaunch realsense2_camera rs_camera.launch
rviz
点击左上角的Fixed Frame 选项中,下拉菜单选择 camera_link
点击左下角的Add,选择bytopic下的选项,如下图,点击ok
左下角有测试的效果图,连接成功。