zplugin-ros2dds
A new Zenoh bridge for ROS2.
How to install it
No version has been released yet. Therefore only nightly built packages are available.
The "Release" action builds packages for most most of OSes. You can download those from the "Artifacts" section in each build.
Just download the package for your OS, unzip it and run ./zenoh-bridge-ros2dds
.
A nightly build Docker image is also available. Pull it with this command: docker pull eclipse/zenoh-bridge-ros2dds:nightly
How to build it
⚠️ WARNING⚠️ : Zenoh and its ecosystem are under active development. When you build from git, make sure you also build from git any other Zenoh repository you plan to use (e.g. binding, plugin, backend, etc.). It may happen that some changes in git are not compatible with the most recent packaged Zenoh release (e.g. deb, docker, pip). We put particular effort in mantaining compatibility between the various git repositories in the Zenoh project.
⚠️ WARNING⚠️ : As Rust doesn't have a stable ABI, the plugins should be built with the exact same Rust version thanzenohd
, and using forzenoh
dependency the same version (or commit number) than 'zenohd'. Otherwise, incompatibilities in memory mapping of shared types betweenzenohd
and the library can lead to a"SIGSEV"
crash.
In order to build the zenoh bridge for DDS you need first to install the following dependencies:
-
Rust. If you already have the Rust toolchain installed, make sure it is up-to-date with:
$ rustup update
-
On Linux, make sure the
llvm
andclang
development packages are installed:- on Debians do:
sudo apt install llvm-dev libclang-dev
- on CentOS or RHEL do:
sudo yum install llvm-devel clang-devel
- on Alpine do:
apk install llvm11-dev clang-dev
- on Debians do:
-
CMake (to build CycloneDDS which is a native dependency)
Once these dependencies are in place, you may clone the repository on your machine:
$ git clone https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds.git
$ cd zenoh-plugin-ros2dds
⚠️ WARNING⚠️ : On Linux, don't usecargo build
command without specifying a package with-p
. Building bothzenoh-plugin-ros2dds
(plugin library) andzenoh-bridge-ros2dds
(standalone executable) together will lead to amultiple definition of
load_plugin'` error at link time. See #117 for explanations.
You can then choose between building the zenoh bridge for DDS:
- as a plugin library that can be dynamically loaded by the zenoh router (
zenohd
):
$ cargo build --release -p zenoh-plugin-ros2dds
The plugin shared library (*.so
on Linux, *.dylib
on Mac OS, *.dll
on Windows) will be generated in the target/release
subdirectory.
- or as a standalone executable binary:
$ cargo build --release -p zenoh-bridge-ros2dds
The zenoh-bridge-ros2dds
binary will be generated in the target/release
sub-directory.
Configuration
zenoh-bridge-ros2dds
can be configured via a JSON5 file passed via the -c
argument. You can see a commented example of such configuration file: DEFAULT_CONFIG.json5
.