Intel Movidius 2 Foxy 20210601
Contents
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
- Started Here: ROS 2 Documentation
- Expand "Related Projects" in left panel. Select:: Intel ROS2 Projects
- In "Key Projects" section select: ROS 2 Intel Movidius NCS
It states: "Warning: This repo is depreciated. For latest ROS2 wrapper for Movidius NCS, please refer to our project ros2_openvino_roolkit.
- See: ros2 openvino toolkit
- In the "Installation $ Launching" section see "ROS2 Foxy": ROS2 Foxy OpenVINO_ Tookit
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
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
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 I suspect the doing the image_common.git in brach dashing is OK. I couldn't do it in a foxy branch.
Build Package
Didn't source foxy local_setup.bash because that is done in my .bashrc script
$ 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.