Intel Movidius 2 Foxy 20210601

From wikidb
Revision as of 12:53, 21 June 2021 by Edc (Talk | contribs)

Jump to: navigation, search

Comment

The Movidius Neural Compute Stick 2 requires OpenVINO toolkit. So the install is little more of a challenge. I haven't gotten the Foxy Demos to compile yet.

References

Hardware

ROS 2 support

It states: "Warning: This repo is depreciated. For latest ROS2 wrapper for Movidius NCS, please refer to our project ros2_openvino_roolkit.

ROS2 OpenVINO Toolkit - Getting Started with Foxy

1. Install ROS2 Foxy from source code

Update cmake 3.14

I'm at 3.16

 $ cmake --version
       cmake version 3.16.3
 
       CMake suite maintained and supported by Kitware (kitware.com/cmake).

Install ROS2 Foxy

I've already installed this from binary. I hope that is ok. I skip this.

2. Environment Setup

Install OpenVINO

  • See "guide" link: The Intel Distribution of OpenVINO Toolkit
    • Operating System "Linux"
    • Distribution: We & Local (recommended)
    • Version Type: 2021.3 (latest) -
      • TBD: Explore this decision: I tried 2020.3 but it didn't work.
      • I maybe able to have both installed in /opt/intel/ and just source the script in the respective /ope/intel/<INSTALL_DIR>/bin
    • Installer Type: Local
    • Press the "Download" button and choose to put it in my "Download" directory

This is a summary of the installation instructions

 -----------------------------------
 ------- installation instruction
 ------------------------------------
 
 The following steps apply to Ubuntu*, CentOS*, Red Hat* Enterprise Linux*, and Yocto* versions of Linux.
 
 Step 1: Open a command prompt terminal window.
 
 Step 2: Unpack the .tgz file.
 
 tar -xvzf l_openvino_toolkit_p_<version>.tgz
 
 Step 3: Go to the l_openvino_toolkit_p_<version> directory:
 
 cd l_openvino_toolkit_p_<version>
 
 Step 4: Choose your installation option.
 
     GUI Installation Wizard: sudo ./install_GUI.sh
     Command-Line Instructions: sudo ./install.sh
 
 Step 5: Follow the instructions in the installer.
 
 Step 6: The core components are installed. To complete the configuration, follow the instructions in the Complete Installation Guide.


 $ mkdir openvino

 $ cd openvino

 $ tar -xvzf ~/Downloads/l_openvino_toolkit_p_2021.3.394.tgz 
       ...
       ...

 $ cd l_openvino_toolkit_p_2021.3.394/
$ sudo ./install.sh

--------------------------------------------------------------------------------
Initializing, please wait...
--------------------------------------------------------------------------------

Welcome
--------------------------------------------------------------------------------
Welcome to the Intel® Distribution of OpenVINO™ toolkit 2021.3 for Linux*
--------------------------------------------------------------------------------
The Intel installation wizard will install the Intel® Distribution of OpenVINO™
toolkit 2021.3 for Linux* to your system.

The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and
solutions that emulate human vision. Based on Convolutional Neural Networks
(CNN), the toolkit extends computer vision (CV) workloads across Intel®
hardware, maximizing performance. The Intel Distribution of OpenVINO toolkit
includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).

Before installation please check system requirements:
https://docs.openvinotoolkit.org/2021.3/_docs_install_guides_installing_openvino
_linux.html#system_requirements
and run following script to install external software dependencies:

sudo -E ./install_openvino_dependencies.sh

Please note that after the installation is complete, additional configuration
steps are still required.

For the complete installation procedure, refer to the Installation guide:
https://docs.openvinotoolkit.org/2021.3/_docs_install_guides_installing_openvino
_linux.html.

You will complete the following steps:
   1.  Welcome
   2.  End User License Agreement
   3.  Prerequisites
   4.  Configuration
   5.  Installation
   6.  First Part of Installation is Complete

--------------------------------------------------------------------------------
Press "Enter" key to continue or "q" to quit: 
First Part of Installation is Complete
--------------------------------------------------------------------------------
The first part of Intel® Distribution of OpenVINO™ toolkit 2021.3 for Linux*
has been successfully installed in 
/opt/intel/openvino_2021.3.394.

ADDITIONAL STEPS STILL REQUIRED: 

Open the Installation guide at:
 https://docs.openvinotoolkit.org/2021.3/_docs_install_guides_installing_openvino_linux.html 
and follow the guide instructions to complete the remaining tasks listed below:

 • Set Environment variables 
 • Configure Model Optimizer 
 • Run the Verification Scripts to Verify Installation and Compile Samples

--------------------------------------------------------------------------------
Press "Enter" key to quit: 

Install Intel RealSense SDK 2.0 - tag v2.30.0

I think I did this: See

I hope I'm done with "2 Enviornment Setpu"

3. Building and Installation

Important Note This section was transcribed incorrectly FIX

Build Demo Code in OpenVINO Toolkit

 $ su

In root

 # source /opt/intel/openvino_2021.3.394/bin/setupvars.sh 
       [setupvars.sh] OpenVINO environment initialized

 # cd /opt/intel/openvino_2021.3.394/deployment_tools/open_model_zoo/demos/
 
 # source build_demos.sh 
 
       Setting environment variables for building demos...
       [setupvars.sh] OpenVINO environment initialized
       -- The C compiler identification is GNU 9.3.0
       ...
       ...
       ...
       ...
       [ 99%] Built target object_detection_demo
       [100%] Linking CXX executable ../../intel64/Release/classification_demo
       [100%] Built target classification_demo
       Scanning dependencies of target ie_samples
       [100%] Built target ie_samples

       Build completed, you can find binaries for all demos in the /root/omz_demos_build/intel64/Release subfolder.

Get out of root - I think that is what I should do

Check Disk Usage

 $ df
       Filesystem     1K-blocks     Used Available Use% Mounted on
       udev             8133636        0   8133636   0% /dev
       tmpfs            1632492     1660   1630832   1% /run
       /dev/sda1      114854020 23423452  85553220  22% /
       ...

Install ROS2_OpenVINO Packages

 $ mkdir -p vino_ros2_ws/src

 $ cd vino_ros2_ws/src/

 $ git clone https://github.com/intel/ros2_openvino_toolkit
      Cloning into 'ros2_openvino_toolkit'...
       ...

 $ git clone https://github.com/intel/ros2_object_msgs
       Cloning into 'ros2_object_msgs'...
       ...

 $ git clone https://github.com/ros-perception/vision_opencv -b ros2
       Cloning into 'vision_opencv'...
       ...
 
 $ git clone https://github.com/ros2/message_filters.git
       Cloning into 'message_filters'...
       ...

 $ git clone https://github.com/ros-perception/image_common.git -b dashing
       Cloning into 'image_common'...
       ..

 $ git clone https://github.com/intel/ros2_intel_realsense.git -b refactor
       Cloning into 'ros2_intel_realsense'...
       ...

Note See the 5th git for image_common.git. I suspect the doing the image_common.git in branch dashing is OK. Besides, I couldn't do it in a foxy branch. There may not be one?

Build Package

  • FAILS
  • Note: This must be build the ROS 2 wrapper step.
  • Note: Didn't source foxy local_setup.bash because that is done in my .bashrc script
  • Note: cd'ed into the vino_ros2_ws project root (~/vino_ros2_ws). This is the standard place to do a build. I tried doing it in the src sub-directory as well but it didn't help. I've seen this work in the src directory equally well. The install directory ends up in the src directory. Is this really what they want?
  • Note: There is a soft link from penvino_2021 to openvino_2021.3.394. Should make a difference which one I source.
  • Note: I wonder if the problem is using OpenVINO 2021 instead of 2020.


 $ source /opt/intel/openvino_2021.3.394/bin/setupvars.sh
       [setupvars.sh] OpenVINO environment initialized

 # Put myself into ~/vino_ros2_ws
 $ cd ..

 $ colcon build --symlink-install
       Starting >>> cv_bridge
       Starting >>> object_msgs
       Starting >>> realsense_msgs
       Starting >>> vino_param_lib
       ...
       ...
       ---
       Failed   <<< image_transport [47.3s, exited with code 2]
       Aborted  <<< people_msgs [1min 27s]                                           

       Summary: 13 packages finished [4min 14s]
         1 package failed: image_transport
         1 package aborted: people_msgs
         3 packages had stderr output: image_transport realsense_ros vino_param_lib
         4 packages not processed

TBD: Figure out what went wrong.

4. Running the Demo

TBD

Notes and Logs