Ubuntu16.04+CUDA10.0+ZED2+ROS installation operation

1 Install NVIDIA graphics card

When using the nvidia-smi command in the terminal, nvidia-smi: command not found is displayed. After reading blogs on the Internet, it is mostly caused by the Ubuntu 16.04 kernel update. At this time, it is necessary to install the graphics card driver.

First check your graphics card model:

lspci |grep -i nvidia

My computer is an ASUS VivoBook, and the graphics card model is GeForce MX150. I use manual installation. Please refer to the following blog:
Super detailed steps for installing the graphics driver in ubuntu 16.04.

Insert image description here
Pay attention to the corresponding relationship between nvidia graphics card and cuda given in the table below. We will also need to configure the cuda version later. I chose cuda10.0, so the graphics card version installed here must be higher than 410.48. What I downloaded is NVIDIA-Linux-x86_64-440.100.run.

Insert image description here
I successfully installed the nvidia graphics card according to the blog above, but unfortunately found that ubuntu has a login loop. According to the commands in the blog below, I reinstalled nvidia and you're done.

Ubuntu16.04 + GTX1080 solves the problem of repeated login on the desktop

The fundamental solution to the problem is to add the parameter: –no-opengl-files

sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-xxx.run --no-opengl-files
sudo service lightdm start

Insert image description here

2 Configure CUDA10.0

2.1 Reduce the ubuntu kernel version

To install cuda10.0, you must first lower the ubuntu16.04 kernel version according to this version correspondence table. I read a blog that said that the version in the table is not greater than less than, but equal to. For cuda10.0, the kernel of ubuntu16.04 should be 4.4. .

It's strange here. When I installed it for the first time, I couldn't run zed under the 4.15.0-128 kernel. I had to switch to version 4.4.0. After crashing the system for the second time, I found that it was running under 4.15.0. Launch files can be run under the -133 kernel version, which feels very strange.
Insert image description here
1. Check the current kernel version

uname -r

2. Install the new kernel version 4.4.0-197:

sudo apt-get install linux-headers-4.4.0-197-generic linux-image-4.4.0-197-generic
sudo apt-get install linux-modules-extra-4.4.0-197-generic 

3. Update settings:

sudo update-grub

View existing kernels:

dpkg --get-selections | grep linux

2.2 Install cuda10.0

Reference blog: Detailed steps for configuring CUDA10.0 on ubuntu18.04

Download cuda10.0 from the CUDA official website :
Insert image description here
Check the cuda version after the installation is complete:

Insert image description here

3 Install ZED ROS

3.1 Install ZED SDK

First go to the zed official website to download the zed sdk that matches the ubuntu and cuda versions, and then install it:

https://www.stereolabs.com/docs/installation/linux/

What I downloaded is ZED_SDK_Ubuntu16_cuda10.0_v3.4.0.run

sudo chmod +x ZED_SDK_Ubuntu16_cuda10.0_v3.4.0.run
sudo ./ZED_SDK_Ubuntu16_cuda10.0_v3.4.0.run

3.2 ROS environment configuration

Reference blog: ZED2 SDK usage and development environment configuration under Ubuntu

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

You can also use the zed view software Depth Viewer:

cd /usr/local/zed/tools
./ZED_Depth_Viewer

Insert image description here
OK, now the zed2 ros operating environment under ubuntu16.04 is configured. I will have a camera to use when I go to school. I hope the graduation project will go smoothly! (I hope I won’t pretend it for the third time...)

Guess you like

Origin blog.csdn.net/slender_1031/article/details/113914675