Difference between revisions of "Intel Movidius 2 Foxy 20210601"

From wikidb
Jump to: navigation, search
(Build Package)
(Build Package)
Line 171: Line 171:
  
 
* '''Note''': Didn't source foxy local_setup.bash because that is done in my .bashrc script
 
* '''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.  
+
* '''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 tried doing it in the src sub-directory as well but it didn't help.
+
  
 
   $ source /opt/intel/openvino_2021.3.394/bin/setupvars.sh
 
   $ source /opt/intel/openvino_2021.3.394/bin/setupvars.sh

Revision as of 10:04, 19 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: Tet the Intel Distribution of OpenVINO Toolkit
    • Operating System "Linux"
    • Distribution: We & Local (recommended)
    • Version Type: 2021.3 (latest) - I tried 2020.3 but it didn't work possibly because I am on Ubuntu 20.04
    • 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/
 

Install Intel RealSense SDK 2.0 - tag v2.30.0

I thinks I did this

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

  • 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.
 $ source /opt/intel/openvino_2021.3.394/bin/setupvars.sh
       [setupvars.sh] OpenVINO environment initialized

 $ colcon build --symlink-install
       Starting >>> cv_bridge
       Starting >>> object_msgs
       Starting >>> realsense_msgs
       Starting >>> vino_param_lib

Note: this build is happening in vino_ros2_ws/src when it should be happening in vino_ros_ws. I have seen this work before but the install directory ends up in the src directory. Is this really what they want.

3. Running the Demo

TBD

Notes and Logs