--- tags: ROS2note,OpenVINO,Training --- # Quick Installation for OpenVINO ROS 1 Since the installation needs lots of time, we combine some steps together. * Download "2019 R3.1" from [official website](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/choose-download/linux.html). * Open 1st terminal and add server for apt ``` sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main" sudo apt update ``` * then install some necessary packages ``` sudo apt install -y --no-install-recommends libboost-all-dev # numpy and networkx pip3 install numpy pip3 install networkx # Realsense sudo apt install -y librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper1 libjasper-dev libdc1394-22-dev ``` * Open 2nd terminal ``` mkdir -p ~/OpenCV3 && cd ~/OpenCV3 git clone https://github.com/opencv/opencv.git git clone https://github.com/opencv/opencv_contrib.git cd opencv && git checkout 3.4.2 && cd .. cd opencv_contrib && git checkout 3.4.2 && cd .. cd opencv mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=$HOME/OpenCV3/opencv_contrib/modules/ .. make -j8 ``` * If downloading OpenVINO is complete, then go back to 1st terminal and install it ``` tar -xvzf l_openvino_toolkit_p_2019.3.376.tgz cd l_openvino_toolkit_p_2019.3.376 sudo ./install_GUI.sh cd /opt/intel/openvino/install_dependencies sudo -E ./install_openvino_dependencies.sh ``` * While running, open 3rd terminal and clone some code ``` mkdir -p ~/ros1_openvino_ws/src cd ~/ros1_openvino_ws/src git clone https://github.com/intel/ros_openvino_toolkit git clone https://github.com/intel/object_msgs git clone https://github.com/ros-perception/vision_opencv -b melodic git clone https://github.com/intel-ros/realsense cd realsense git checkout 2.1.3 ``` * Now waiting... if terminal 1 is done, do the follow steps ``` source /opt/intel/openvino/bin/setupvars.sh cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites sudo ./install_prerequisites.sh cd /opt/intel/openvino/deployment_tools/demo ./demo_squeezenet_download_convert_run.sh -d CPU ./demo_security_barrier_camera.sh -d CPU ```