# ros_openvino
**Repository Path**: stefantasy/ros_openvino
## Basic Information
- **Project Name**: ros_openvino
- **Description**: A ROS package to wrap openvino inference engine and get it working with Myriad and GPU
- **Primary Language**: Unknown
- **License**: AGPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-12-22
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# **ros_openvino**
A ROS package to wrap openvino inference engine and get it working with **Myriad** and **Intel CPU/GPUs**
The main topic is to accelerate robotics developing using ROS with OpenVINO.
This package is designed on async api of [Intel OpenVINO](https://software.intel.com/en-us/openvino-toolkit) and allows an easy setup for **object detection**.
Entire package is born to support Myriad X, so it works perfectly with:
- Movidius Neural Compute Stick 2
- Ai Core X
- Movidius Neural Compute Stick
- Ai Core
**object detection** node allows you to use a standard image topic and obtain a new topic with live result image.
If you enable *depth analysis* you can add depth image topic to obtain 3d boxes, visible as markers in rviz.
## **Wiki**
[Wiki home](https://github.com/gbr1/ros_openvino/wiki)
## **Setup**
You need some steps to get ros_openvino working.
If you are working on a Myriad based device (NCS, NCS2, AI Core, AI Core X) follow [this guide](https://github.com/gbr1/ros_openvino/wiki/Fast-setup-for-Myriad-based-devices) because is faster.
If you have already this kind of stuffs, please take care to modify steps for your case.
### **- Prerequisites**
1. Ubuntu 16.04/18.04
2. OpenVINO 2018 R5 or newer (latest officially tested is 2019 R3)
3. ROS Kinetic Kame/Melodic Morenia
### **- Setup** ***ros_openvino***
1. Clone repo in your **source folder**, assuming `catkin_ws` as your ROS workspace:
`cd ~/catkin_ws/src`
`git clone http://github.com/gbr1/ros_openvino.git`
2. Compile!
`cd ~/catkin_ws`
`catkin_make`
`catkin_make install`
all installation steps and a case of study configuration are described in [Setup environment wiki page](https://github.com/gbr1/ros_openvino/wiki/Setup-environment).
Remember that OpenVINO enviroment variables, ROS enviroment variables and ROS workspace need to be sourced in `bashrc`.
### **- Tests**
There are some demo launch files.
1. **Webcam and GPU**
you need to install usb_cam node:
`sudo apt-get install ros-kinetic-usb-cam`
then type:
`roslaunch ros_openvino gpu_demo_webcam.launch`

2. **Webcam and Myriad**
you need to install usb_cam node:
`sudo apt-get install ros-kinetic-usb-cam`
then type:
`roslaunch ros_openvino myriad_demo_webcam.launch`

3. **Realsense D435/D435i/D415 and Myriad**
you need to install realsense package, follow [here](https://github.com/intel-ros/realsense) step-by-step according your environment setup.
After that, just type:
`roslaunch ros_openvino myriad_demo_realsense.launch`

## **Nodes**
- [object_detection](https://github.com/gbr1/ros_openvino/wiki/Object-Detection), a node to detect objects in enviroment using a RGB or RGBD camera using MobileNet-SSD
---
## Note
Tests are done on [UP2](https://up-board.org/upsquared/specifications/) with Intel Atom, 4GB of RAM and 64GB eMMC and [AI Core X](https://up-board.org/ai-core-x/).
Results with a complete analysis with 4-5 object detected is about 30fps for rgb output and 16-18Hz for spatial calculation.
On GPU analysis drop down the frame rate.
If OpenVINO works on Ubuntu 18.04 this package should be compatible with ROS Melodic Morenia.
## Known issues
- CPU device doesn't work. In the future yes, it is in "todo" list;
- GPU is worst than Myriad;
- resize of input image is not availble at the moment. It is in "todo" list.
## Future steps
- add face and body tracking
- improve depth analysis
***This package is distribuited under Affero GPLv3.***
***Copyright (c) 2019 Giovanni di Dio Bruno***
*Models:*
- *mobilenet-ssd.bin*
- *mobilenet-ssd.xml*
*are created using OpenVINO model downloader and converter.*
*Original mobilenet-ssd model are under Intel OpenVINO licenses.*