Difference between revisions of "Intel Movidius 2 Foxy 20210601"

From wikidb
Jump to: navigation, search
(Install OpenVINO)
(2. Environment Setup)
Line 154: Line 154:
 
         has been successfully installed in  
 
         has been successfully installed in  
 
         /opt/intel/openvino_2021.3.394.
 
         /opt/intel/openvino_2021.3.394.
 
+
 
         ADDITIONAL STEPS STILL REQUIRED:  
 
         ADDITIONAL STEPS STILL REQUIRED:  
 
    
 
    

Revision as of 12:25, 21 June 2021

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/

The following install displays a detailed license, other info and installation choices. I selected defaulst.

 $ sudo ./install.sh

       --------------------------------------------------------------------------------
       Initializing, please wait...
       --------------------------------------------------------------------------------
       ...
       ...
       The following components will be installed:
           Inference Engine                                                       219MB
               Inference Engine Development Kit                                    66MB
               Inference Engine Runtime for Intel® CPU                             30MB
               Inference Engine Runtime for Intel® Processor Graphics              18MB
               Inference Engine Runtime for Intel® Movidius™ VPU                  83MB
               Inference Engine Runtime for Intel® Gaussian Neural Accelerator     13MB
               Inference Engine Runtime for Intel® Vision Accelerator Design with  15MB
       Intel® Movidius™ VPUs

           Model Optimizer                                                          5MB
               Model Optimizer Tool                                                 5MB

           Post-Training Optimization Tool                                         66MB
               Post-Training Optimization Tool                                     66MB

           Deep Learning Workbench                                                157MB
               Deep Learning Workbench                                            157MB

           OpenCV*                                                                101MB
               OpenCV* Libraries                                                   90MB

           Open Model Zoo                                                         250MB
               Open Model Zoo                                                     250MB

           Intel(R) Media SDK                                                     157MB
               Intel(R) Media SDK                                                 157MB

           DL Streamer                                                            240MB
               DL Streamer                                                        155MB

          Install space required:  849MB

       --------------------------------------------------------------------------------

          1. Accept configuration and begin installation [ default ]
          2. Customize installation

          h. Help
          b. Back
          q. Quit installation

       --------------------------------------------------------------------------------
       Please type a selection or press "Enter" to accept default choice [ 1 ]: 
       --------------------------------------------------------------------------------
       ...
       ...
       ...

       Finalizing product configuration...
       --------------------------------------------------------------------------------

       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