Skip to content

ONNX Runtime for the Robot Operating System (ROS), works on ROS1 and ROS2

License

Notifications You must be signed in to change notification settings

polyhobbyist/ros_msft_onnx

 
 

Repository files navigation

ROS 2 with ONNX Runtime

ONNX Runtime 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.

Requirements

  • Microsoft Windows 10 64-bit or Ubuntu 20.04 LTS x86_64
  • Linux GPU acceleration:

How to Build

ONNX Runtime team is releasing different binaries for Windows ML or Linux CPU and GPU (CUDA) support.

Windows

mkdir colcon_ws\src
cd colcon_ws

wget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/master/onnx_windows.repos
vcs import src < onnx.repos
colcon build

Ubuntu

  • CPU Only
mkdir colcon_ws/src
cd colcon_ws

wget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/master/onnx.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=OFF
  • Cuda GPU
mkdir colcon_ws/src
cd colcon_ws

wget https://raw.githubusercontent.com/ms-iot/ros_msft_onnx/master/onnx.repos
vcs import src < onnx.repos
colcon build --cmake-args -DCUDA_SUPPORT=ON

Samples Lists

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. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

ONNX Runtime for the Robot Operating System (ROS), works on ROS1 and ROS2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 76.8%
  • CMake 12.0%
  • Python 11.2%