A C# .NET library for ROS2, including C# implementation of rcl APIs, message generation, tests and examples.
Ros2cs is also an independent part of Ros2 For Unity, which enables high-performance communication between simulation and ROS2 robot packages. Follow instructions there instead if you are intending to use ros2cs with Unity3D.
Supported OSes:
* ROS2 Galactic and Humble support only Windows 10 (ROS 2 Windows system requirements), but it is proven that it also works fine on Windows 11.
Supported ROS2 distributions:
ros2cs
libraries can be built in two flavors:
After cloning the project and importing .repos, you can simply put your message package next to other packages in the src/ros2
sub-folder. Then, build your project, and you have all messages generated. You can also modify and use the custom_message.repos
template to automate the process with the get_repos
script.
Please follow the OS-specific instructions for your build:
Make sure your NuGet repositories can resolve xUnit
dependency. You can call dotnet nuget list source
to see your current sources for NuGet packages. Please note that Microsoft Visual Studio Offline Packages
are usually insufficient. You can fix it by adding nuget.org
repository: dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json
.
--with-tests
flag)../test.sh
test.sp1
ros2 run ros2cs_examples ros2cs_talker
ros2 run ros2cs_examples ros2cs_listener
ros2 run ros2cs_examples ros2cs_talker.exe
ros2 run ros2cs_examples ros2cs_listener.exe
ros2 run ros2cs_examples ros2cs_performance_talker
ros2 run ros2cs_examples ros2cs_performance_listener
ros2 run ros2cs_examples ros2cs_performance_talker.exe
ros2 run ros2cs_examples ros2cs_performance_listener.exe
The project started as a fork of ros2_dotnet but moved away from its root through new features and design choices. Nevertheless, ros2cs is built on foundation of open-source efforts of Esteve Fernandez (esteve), Lennart Nachtigall (firesurfer), Samuel Lindgren (samiamlabs) and other contributors to ros2_dotnet project.
Open-source release of ros2cs was made possible through cooperation with Tier IV. Thanks to encouragement, support and requirements driven by Tier IV the project was significantly improved in terms of portability, stability, core structure and user-friendliness.