ubuntu 1604 安装realsense摄像头 并使用

参考官网: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

          https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages

           https://github.com/IntelRealSense/realsense-ros

首先更新一下资源

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial

sudo update-grub && sudo reboot

安装依赖

sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev

设置安装的密钥

sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

获取资源

sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u

 安装驱动包和依赖

sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg

更新文件

sudo apt-get update

升级 

sudo apt-get upgrade

 打开操作界面查看安装是否成功,效果如下,(这个是盗来的图,我自己没有截图)

realsense-viewer

 

 

,进入自己的工作空间下载与ROS相关的驱动 

git clone https://github.com/IntelRealSense/realsense-ros.git

进入下载的文件夹 

cd realsense-ros/

 选择分支并打标签,排序之后选择最后一条文本

git checkout `git tag | sort -V | grep -P "^\d+\.+\.\d+" | tail -1`
cd ..

编译,生成install文件夹 

catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release

catkin_make install

 跑个demo看看

roslaunch realsense2_camera demo_pointcloud.launch

你可能感兴趣的:(计算机视觉)