Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl

Repository Summary

Description Modern ROS 2 client library for .NET.
Checkout URI https://github.com/noelex/rclnet.git
VCS Type git
VCS Version main
Last Updated 2025-05-13
Dev Status UNKNOWN
Released UNRELEASED
Tags csharp dotnet ros ros2 rcl
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

README

rclnet

rclnet is a fast and easy-to-use .NET wrapper over ROS 2 client library, allowing .NET applications to interact with other ROS applications.

Features

  • Completely asynchronous and async/await friendly.
  • Flexible asynchronous scheduling control to fit rclnet into existing applications.
  • Unified message generation for POCOs and blittable structures.
  • Intuitive ROS graph querying and monitoring APIs.
  • Easy-to-use POCO-based APIs.
  • Fast and zero managed heap allocation APIs operating directly on native message buffers.
  • Single package with runtime support for different ROS 2 distros.
  • Builtin support for querying topic messages and ROS graph events with Reactive Extensions.

Supported ROS Features

| Feature | Status | Additional Information | | ———————– | —— | ——————————————————————————————————————————————————————————————————————————————– | | Topics | ✅ | N/A | | Services | ✅ | N/A | | Actions | ✅ | Managed implementation. | | Clocks | ✅ | Supports external time source by setting use_sim_time to true.
CancellationTokenSources can also be configured to cancel with timeout measured by external clock. | | Timers | ✅ | N/A | | Guard Conditions | ✅ | N/A | | Events | ✅ | Event handlers can be registered via SubscriptionOptions or PublisherOptions when creating the subscirption or publisher. | | ROS Graph | ✅ | Managed implementation. | | Logging | ✅ | Supports logging to stdout, /rosout and log files. Configurable with --ros-args. | | Content Filtered Topics | ✅ | Available since humble. | Network Flow Endpoints | ✅ | Available since galactic.
Network flow endpoints of publishers and subscriptions can be retrieved via IRclPublisher.Endpoints and IRclSubscription.Endpoints property.
Unique network flow endpoints requirement can be configured when creating SubscriptionOptions and PublisherOptions.| | Service Introspection | ✅ | Available since iron. | | Parameter Service | ⚠️ | Supports loading parameters from command-line arguments and parameter files.
Locally declared parameters are exposed via Parameter API.
Parameter client is not implemented. | | Lifecycle Nodes | ❌ | N/A |

✅Supported ⚠️Partial support ❌Not supported ⏳In development

Supported Platforms

Supported .NET Versions:

  • .NET 7
  • .NET 8
  • .NET 9

Supported ROS 2 Distributions:

  • Iron Irwini
  • Humble Hawksbill
  • Foxy Fitzroy

Supported Operating Systems:

  • Ubuntu
  • Windows

Should also work on macOS but untested.

Getting Started

rclnet provides project templates to help you getting started quickly. You can install the templates using the following command:

dotnet new install Rcl.NET.Templates

Then, to create a node application:

mkdir MyNode
cd MyNode
dotnet new ros2-node

To create a message only library:

mkdir MyMessageLibrary
cd MyMessageLibrary
dotnet new ros2-msg

If you prefer creating the projects by yourself, or want to use rclnet in existing projects, refer the Installing and Generating Messages section.

Installing

Stable releases of rclnet are hosted on NuGet. You can install them using the following command:

dotnet add package Rcl.NET

For message only projects, you can install only Rosidl.Runtime without Rcl.NET:

dotnet add package Rosidl.Runtime

To generate message classes, you’ll also need to install ros2cs utility:

dotnet tool install -g ros2cs

Generating Messages

rclnet does not ship with message definitions. In order to communicate with other ROS 2 nodes, you need to generate messages first.

Message definitions are .NET classes / structs, you can either include messages in a console app which runs as an ROS 2 node, or compile separately in another library.

Projects containing messages will have to meet the following requirements:

  • Rcl.NET or Rosidl.Runtime NuGet package is installed.
  • AllowUnsafeBlocks is set to true. This can be done by adding the following lines to the .csproj file:

```xml

File truncated at 100 lines see the full file

Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl
Repo symbol

rclnet repository

csharp dotnet ros ros2 rcl