You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2024. It is now read-only.
Updates to readme and camera node selection based on OS. (#17)
* Updates to readme and camera node selection based on OS.
* removed the engine block stl and added instructions to download.
* Updated date.
* README fixes for Linux
* c_str to fix build error on linux.
* Fixed link in README
* Made path to STL explicit in README.
* Switched to OTL cv_camera for linux and formatted link in README
Copy file name to clipboardExpand all lines: README.md
+75-33Lines changed: 75 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,23 @@
1
-
# ONNX (Open Neural Network Exchange) ROS Node
1
+
# ONNX (Open Neural Network Exchange) ROS 1 Node
2
2
3
-
## Consuming Onnx
4
-
Requirements:
3
+
[ONNX Runtime](https://github.com/microsoft/onnxruntime) is an open source inference engine for ONNX Models.
4
+
ONNX Runtime Execution Providers (EPs) enables the execution of any ONNX model using a single set of inference APIs that provide access to the best hardware acceleration available.
5
5
6
-
* Install Visual Studio 2019 with UWP development
7
-
*ROS Noetic for Windows
6
+
In simple terms, developers no longer need to worry about the nuances of hardware specific custom libraries to accelerate their machine learning models.
7
+
This repository demonstrates that by enabling the same code with ROS 2 to run on different hardware platforms using their respective AI acceleration libraries for optimized execution of the ONNX model.
8
8
9
-
The Onnx ROS Node is distrubted as source. To consume it in your robot, clone the ros_msft_onnx sources into your workspace.
9
+
## System Requirement
10
+
11
+
* Microsoft Windows 10 64-bit or Ubuntu 20.04 LTS x86_64
12
+
* ROS Noetic
13
+
* To make use of the hardware acceleration, the system is required to be compatible with [**CUDA 10.1**](https://developer.nvidia.com/cuda-toolkit) and [**cuDNN 7.6.5**](https://developer.nvidia.com/cudnn).
10
14
11
-
For example:
15
+
> For GPU support, please follow the installation steps on NVIDIA portal before proceeding.
16
+
17
+
## How to Build
18
+
The Onnx ROS Node is distrubted as source. To consume it in your robot, clone the ros_msft_onnx sources into your workspace.
There are two launch files included as samples in the launch folder. `tracker.launch` demonstrates tracking people in images/video and `pose.launch` demonstrates estimating the position and rotation of an engine block from images\video. To run the engine pose demo, copy the [Engine pose ONNX model](https://github.com/ms-iot/ros_msft_onnx_demo/releases/download/0.0/engine.onnx) to `ros_msft_onnx/testdata/`.
ONNX Runtime team is releasing different binaries for CPU and GPU (CUDA) support. To switch between the two, a workspace rebuild is required.
42
+
43
+
44
+
Make sure to source your ROS version before building.
45
+
46
+
* CPU Processing
47
+
48
+
```Batchfile
49
+
cd onnx_demo
50
+
51
+
catkin_make -DCUDA_SUPPORT=OFF
52
+
```
53
+
54
+
* GPU Processing (CUDA)
55
+
56
+
```Batchfile
57
+
cd onnx_demo
58
+
59
+
catkin_make -DCUDA_SUPPORT=ON
60
+
```
61
+
62
+
## Running the samples
63
+
There are two launch files included as samples in the launch folder.
64
+
An object tracking demo and a deep pose detection demo.
65
+
66
+
### Person Tracker Demo
67
+
`tracker.launch` demonstrates tracking people in images/video.
68
+
69
+
To run the person tracking detection demo, source the workspace and then roslaunch the launch file.
70
+
71
+
```Batchfile
72
+
c:\workspace\devel\setup.bat
73
+
roslaunch ros_msft_onnx tracker.launch
74
+
```
75
+
76
+
In another command prompt or terminal, run rviz and add the `/tracked_objects/image` topic to see the highlighted people when they have been detected.
77
+
```Batchfile
78
+
rosrun rviz rviz
79
+
```
23
80
24
-
To use hardware accelleration, install [CUDA Toolkit 10.1](https://developer.nvidia.com/cuda-10.1-download-archive-base) and [cuDNN v7 for CUDA 10.1](https://developer.nvidia.com/rdp/cudnn-archive).
81
+
### Deep Pose Detection Demo
82
+
`pose.launch` demonstrates estimating the position and rotation of an engine block from images\video.In preperation for running the engine pose demo:
83
+
* Copy [Engine pose ONNX model](https://github.com/ms-iot/ros_msft_onnx_demo/releases/download/0.0/engine.onnx) to `ros_msft_onnx/testdata/`.
84
+
* Download the `Engine_Block_-_Scaled.stl` mesh from [Thingiverse](https://www.thingiverse.com/thing:1911808) designed by Eric Harrell, and used with permission. Move or copy it into `ros_msft_onnx/testdata/`.
85
+
86
+
To run the engine pose detection demo, source the workspace and then roslaunch the launch file.
87
+
```Batchfile
88
+
roslaunch ros_msft_onnx pose.launch
89
+
```
25
90
26
91
For your own project, you can create a launch file in the following format:
27
92
@@ -54,7 +119,7 @@ For your own project, you can create a launch file in the following format:
54
119
</launch>
55
120
```
56
121
57
-
> While 'Pose' processing is enabled, the service required to generate the model has not been published as of October 2020
122
+
> While 'Pose' processing is enabled, the service required to generate the model has not been published as of April 2021
58
123
59
124
## Property Descriptions
60
125
@@ -75,29 +140,6 @@ For your own project, you can create a launch file in the following format:
75
140
| model_bounds| 9 coordinates used to perform the point in perspective caluclation for pose |
76
141
| calibration | Path to the OpenCV calibration file for point in persective |
77
142
78
-
## Building
79
-
Make sure to source your ROS version before building. Then use catkin_make to build.
80
-
```Batchfile
81
-
cd c:\workspace\src
82
-
catkin_make
83
-
```
84
-
85
-
## Running the samples
86
-
To run the samples, first source the workspace:
87
-
```Batchfile
88
-
cd c:\workspace\devel\setup.bat
89
-
```
90
-
91
-
Then, for the tracker sample run:
92
-
```Batchfile
93
-
roslaunch ros_msft_onnx tracker.launch
94
-
```
95
-
96
-
For the engine pose sample run:
97
-
```Batchfile
98
-
roslaunch ros_msft_onnx pose.launch
99
-
```
100
-
101
143
## Subscriptions
102
144
Onnx subscribes to the topic listed in the `image_topic` property, or `/camera/image_raw`
0 commit comments