ZED双目摄像头 Ubuntu18.04 + ROS melodic + opencv3.4.0 + Cuda10.2 + ZED SDK 3.5.6

ZED双目摄像头 Ubuntu18.04 + ROS melodic + opencv3.4.0 + Cuda10.2 + ZED SDK 3.5.6_第1张图片
1. 安装Ubuntu18.04+ROSmelodic+opencv3.4.0

此类网上资料很多,百度一下即可

2. 安装CUDA 10.2
下载链接:

https://developer.nvidia.com/cuda-10.2-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal

下载链接的页面中有对应的cuda版本,这里我选择的是cuda 10.2、ZED SDK for Ubuntu 18这两个驱动版本。
ZED双目摄像头 Ubuntu18.04 + ROS melodic + opencv3.4.0 + Cuda10.2 + ZED SDK 3.5.6_第2张图片
点击Download,下载安装

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

安装好之后在~/.bashrc文件末尾添加如下:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64

然后source一下更新

source ~/.bashrc

3. 安装ZED SDK 3.5.6

ZED SDK 3.5.6网址

https://www.stereolabs.com/developers/release/

ZED双目摄像头 Ubuntu18.04 + ROS melodic + opencv3.4.0 + Cuda10.2 + ZED SDK 3.5.6_第3张图片给文件权限:

 chmod +x ZED_SDK_Ubuntu18_cuda10.2_v3.5.6.run 

运行:

./ZED_SDK_Ubuntu18_cuda10.2_v3.5.6.run 

一路YES,等待安装完成

4. ZED_Depth_Viewer测试

安装过程中一直继续选择默认方式,安装完成之后:

cd /usr/local/zed/tools

执行命令:

./ZED_Depth_Viewer

5. ZED_Sensor_Viewer测试

cd /usr/local/zed/tools

执行命令:

./ZED_Sensor_Viewer

6. 运行zed-ros-wrapper
编译

$ cd ~/catkin_ws/src
$ git clone https://github.com/stereolabs/zed-ros-wrapper.git
$ cd ../
$ rosdep install --from-paths src --ignore-src -r -y
$ catkin_make -DCMAKE_BUILD_TYPE=Release
$ source ./devel/setup.bash

运行

source catkin_ws/devel/setup.bash
roslaunch zed_wrapper zed2.launch

7. 运行zed-ros-examples
编译

$ cd ~/catkin_ws/src
$ git clone https://github.com/stereolabs/zed-ros-examples.git
$ cd ../
$ rosdep install --from-paths src --ignore-src -r -y
$ catkin_make -DCMAKE_BUILD_TYPE=Release
$ source ./devel/setup.bash

运行

source catkin_ws/devel/setup.bash
roslaunch zed_examples zed2.launch

下载文件夹zed-ros-interfaces到zed-ros-examples,不然会报错
ZED双目摄像头 Ubuntu18.04 + ROS melodic + opencv3.4.0 + Cuda10.2 + ZED SDK 3.5.6_第4张图片

https://haowang.blog.csdn.net/article/details/115401380

你可能感兴趣的:(SLAM,slam)