Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ms-iot/ros_msft_onnx
ONNX Runtime for the Robot Operating System (ROS), works on ROS1 and ROS2
https://github.com/ms-iot/ros_msft_onnx
hardware-acceleration onnx-runtime ros ros2
Last synced: 28 days ago
JSON representation
ONNX Runtime for the Robot Operating System (ROS), works on ROS1 and ROS2
- Host: GitHub
- URL: https://github.com/ms-iot/ros_msft_onnx
- Owner: ms-iot
- License: mit
- Archived: true
- Created: 2020-08-10T20:59:04.000Z (over 4 years ago)
- Default Branch: foxy
- Last Pushed: 2024-02-14T20:48:17.000Z (10 months ago)
- Last Synced: 2024-08-04T00:13:45.339Z (4 months ago)
- Topics: hardware-acceleration, onnx-runtime, ros, ros2
- Language: C++
- Homepage:
- Size: 9.47 MB
- Stars: 32
- Watchers: 6
- Forks: 10
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- LiDAR-Guide - ROS 2 with ONNX Runtime
- Computer-Vision-Guide - ROS 2 with ONNX Runtime
- Deep-Learning-Guide - ROS 2 with ONNX Runtime
- Autonomous-Systems-Guide - ROS 2 with ONNX Runtime
- MATLAB-Guide - ROS 2 with ONNX Runtime
README
# ROS 2 with ONNX Runtime
[ONNX Runtime](https://github.com/microsoft/onnxruntime) is an open source inference engine for ONNX Models.
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.In simple terms, developers no longer need to worry about the nuances of hardware specific custom libraries to accelerate their machine learning models.
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.## System Requirement
* Microsoft Windows 10 64-bit or Ubuntu 20.04 LTS x86_64
* 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).> For GPU support, please follow the installation steps on NVIDIA portal before proceeding.
## How to Build
ONNX Runtime team is releasing different binaries for CPU and GPU (CUDA) support. To switch between the two, a workspace rebuild is required.
* Default CPU
### Windows
```Batchfile
mkdir colcon_ws\src
cd colcon_wswget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/foxy/onnx_windows.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=OFF
```* Default GPU (CUDA)
```Batchfile
mkdir colcon_ws\src
cd colcon_wswget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/foxy/onnx_windows.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=ON
```### Ubuntu
```Batchfile
mkdir colcon_ws/src
cd colcon_wswget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/foxy/onnx.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=OFF
```* Default GPU (CUDA)
```Batchfile
mkdir colcon_ws/src
cd colcon_wswget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/foxy/onnx.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=ON
```## Samples Lists
* [Object Detection with Tiny-YOLOv2/ONNX Runtime](./onnx/README.md)
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.