Pamoja.Ros2
0.2.0
dotnet add package Pamoja.Ros2 --version 0.2.0
NuGet\Install-Package Pamoja.Ros2 -Version 0.2.0
<PackageReference Include="Pamoja.Ros2" Version="0.2.0" />
<PackageVersion Include="Pamoja.Ros2" Version="0.2.0" />
<PackageReference Include="Pamoja.Ros2" />
paket add Pamoja.Ros2 --version 0.2.0
#r "nuget: Pamoja.Ros2, 0.2.0"
#:package Pamoja.Ros2@0.2.0
#addin nuget:?package=Pamoja.Ros2&version=0.2.0
#tool nuget:?package=Pamoja.Ros2&version=0.2.0
Pamoja.Ros2
ROS 2 names, RIHS01 type hashes, CDR encoding, and rmw_zenoh key assembly, with no ROS 2 installed. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.
Install
dotnet add package Pamoja.Ros2
using Pamoja.Ros2;
This pulls in Pamoja.Native, the compiled engine. dotnet add package Pamoja is the whole framework in one package.
Example
The guide project's example, spliced here as it ran in CI.
From bindings/dotnet/samples/Pamoja.Guides/Ros2Guide.cs:
// A name is slash-separated tokens of letters, digits, and underscores. A token may
// not start with a digit, and a name may not end in a slash, hold an empty token, or
// double an underscore.
const string camera = "/robot1/camera_left/image_raw";
if (Ros2.IsValidName(camera))
{
Console.WriteLine($"valid {camera}");
}
foreach ((string name, string why) in new[]
{
("/2foo", "a token starts with a digit"),
("/cmd_vel/", "it ends in a slash"),
("/robot1//odom", "it has an empty token"),
("/robot1/cmd__vel", "it doubles an underscore"),
})
{
if (!Ros2.IsValidName(name))
{
Console.WriteLine($"invalid {name}, since {why}");
}
}
// A name with no leading slash is relative, and one that starts with a tilde is
// private. Both are valid, and both resolve against the node before they reach the
// wire, so neither is fully qualified.
foreach ((string label, string name, string against) in new[]
{
("relative", "cmd_vel", "the node's namespace"),
("private", "~/setpoint", "the node's own name"),
})
{
if (Ros2.IsValidName(name) && !Ros2.IsFullyQualified(name))
{
Console.WriteLine($"{label,-10}{name} is valid, and resolves against {against} first");
}
}
// Only a fully qualified name reaches the wire. DDS puts a prefix before it that says
// what kind of endpoint it is, and a service travels on two topics, each ending in the
// suffix the middleware appends.
string? published = Ros2.DdsTopic("/robot1/cmd_vel", EntityKind.Topic);
string? asked = Ros2.DdsTopic("/robot1/add_two_ints", EntityKind.ServiceRequest);
string? answered = Ros2.DdsTopic("/robot1/add_two_ints", EntityKind.ServiceResponse);
Console.WriteLine($"topic /robot1/cmd_vel travels on {published}");
Console.WriteLine($"request /robot1/add_two_ints asks on {asked}");
Console.WriteLine($"reply and answers on {answered}");
// A message type maps to a DDS type name the same way, so both ends agree on what is
// carried before a byte is exchanged. A name that is not package/namespace/Type maps
// to nothing rather than to something plausible.
foreach (string rosType in new[]
{
"std_msgs/msg/String",
"example_interfaces/srv/AddTwoInts",
"std_msgs/String",
})
{
Console.WriteLine(Ros2.DdsTypeName(rosType) is { } carried
? $"type {rosType} is named {carried}"
: $"malformed {rosType} is not package/namespace/Type, so it has no DDS type name");
}
The same capability in every language
| Language | Package | Reference |
|---|---|---|
| Rust | pamoja-ros2 |
reference, docs.rs, install |
| TypeScript | @pamoja/ros2 |
reference, install |
| Python | pamoja-ros2 |
reference, install |
| C# | Pamoja.Ros2 |
reference, install |
Documentation
Pamoja.Ros2reference, every type in this namespace.- The ROS 2 rules guide, with the same example in Rust, TypeScript, and Python.
- Every capability, and the install page.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Pamoja.Native (>= 0.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Pamoja.Ros2:
| Package | Downloads |
|---|---|
|
Pamoja
The whole pamoja framework in one package: every capability of one memory-safe Rust core, behind an idiomatic C# facade, for IoT, robotics, and drones. |
|
|
Pamoja.Profiles
Profiles and robotics: A node written down as a JSON file, rules between nodes as another, and the naming and encoding rules a robot's topics follow, with no ROS 2 or Zenoh installed. |
GitHub repositories
This package is not used by any popular GitHub repositories.