Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository

Repository Summary

Description .NET bindings for ROS2
Checkout URI https://github.com/ros2-dotnet/ros2_dotnet.git
VCS Type git
VCS Version main
Last Updated 2024-12-03
Dev Status UNKNOWN
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

README

ROS2 for .NET

Target Status
Linux Build (Linux)
Windows Desktop Build (Desktop)

Windows UWP CI Builds are currently disabled, see this issue for more information.

Introduction

This is a collection of projects (bindings, code generator, examples and more) for writing ROS2 applications for .NET Core and .NET Standard.

Features

The current set of features include:

  • Generation of all builtin ROS types
  • Support for publishers and subscriptions
  • Support for clients and services
  • Support action clients and servers
  • Cross-platform support (Linux, Windows, Windows IoT Core, UWP)

What’s missing?

Lots of things!

  • Unicode types
  • String constants (specifically BoundedString)
  • Component nodes
  • Tests
  • Documentation
  • More examples (e.g. IoT, VB, UWP, HoloLens, etc.)

Sounds great, how can I try this out?

First of all install the standard ROS2 dependencies for your operating system of choice (NOTE: only do this if building Windows Desktop or Linux. For UWP, see the relevant section below): https://github.com/ros2/ros2/wiki/Installation#building-from-source

Next make sure you’ve either installed .Net Core (preferred) https://www.microsoft.com/net/learn/get-started or Mono https://www.mono-project.com/. (NOTE: For building unit tests, .NET 6 is required).

For running on Linux or Windows Desktop, one can build ros2_dotnet (along with all desired packages containing interface definitions) as an overlay on top of an existing ROS2 installation. The ros2_dotnet_foxy.repos contains all necessary repositories to build the core ros2_dotnet project along with all standard ROS2 interface packages. If you are using other packages which provide interface definitions, those must also be included in the ros2_dotnet workspace in order for .NET bindings to be generated. (NOTE: if you wish to build the core of ROS2 from source, everything through the rcl layer is required.)

For running within UWP (Universal Windows Platform) applications, the entire core of ROS2 must be compiled for UWP compatibility.

Windows (Desktop)

Assuming you’ve installed ROS2 (pre-built binary packages) to the directory c:\dev\ros2_foxy per the official installation instructions, run the following from an Administrator Visual Studio 2019 Developer Command Prompt:

(NOTE: Building as an overlay on top of binary distributions of ROS2 has presented some challenges. As of this writing, you may also need to include the rosidl package due to some unicode/locale compatibility problems. This is done for you below in the line preceding colcon build. This step can/should be omitted if building on top of a built-from-source ROS2 workspace)

call \dev\ros2_foxy\local_setup.bat
md \dev\ros2_dotnet_ws\src
cd \dev\ros2_dotnet_ws
curl -sk https://raw.githubusercontent.com/ros2-dotnet/ros2_dotnet/main/ros2_dotnet_foxy.repos -o ros2_dotnet_foxy.repos
vcs import \dev\ros2_dotnet_ws\src < ros2_dotnet_foxy.repos
git clone --branch foxy https://github.com/ros2/rosidl src\ros2\rosidl
colcon build --merge-install

Linux

Assuming ROS2 foxy installed to the standard location, run the following commands:

source /opt/ros/foxy/setup.bash
mkdir -p ~/ros2_dotnet_ws/src
cd ~/ros2_dotnet_ws
wget https://raw.githubusercontent.com/ros2-dotnet/ros2_dotnet/main/ros2_dotnet_foxy.repos
vcs import ~/ros2_dotnet_ws/src < ros2_dotnet_foxy.repos
colcon build

Universal Windows Platform (Win32, Win64)

We’ll build this in two steps, first ament (the build system) and related tools

File truncated at 100 lines see the full file

Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository

Repo symbol

ros2_dotnet repository