Coder Social home page Coder Social logo

eclipse-zenoh / zenoh-plugin-dds Goto Github PK

View Code? Open in Web Editor NEW
159.0 16.0 57.0 1.4 MB

A zenoh plug-in that allows to transparently route DDS data. This plugin can be used by DDS applications, such as ROS2 robotic applications and others, to leverage the zenoh for geographical routing or for better scaling discovery.

License: Other

Rust 96.53% Dockerfile 0.96% CMake 1.23% Shell 1.29%
zenoh dds cyclonedds ros2 edge-computing robotics

zenoh-plugin-dds's Introduction

Discussion Discord License License

Eclipse Zenoh

The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.

Zenoh (pronounce /zeno/) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.

Check the website zenoh.io and the roadmap for more detailed information.


DDS plugin and standalone zenoh-bridge-dds

👉 Install latest release: see below

👉 Docker image: see below

👉 Build "main" branch: see below

Background

The Data Distribution Service (DDS) is a standard for data-centric publish subscribe. Whilst DDS has been around for quite some time and has a long history of deployments in various industries, it has recently gained quite a bit of attentions thanks to its adoption by the Robotic Operating System (ROS 2) -- where it is used for communication between ROS 2 nodes.

⚠️ On usage with ROS 2 ⚠️

This plugin is based on the DDS standard, and thus can work with ROS 2 to some extent.

However we strongly advise ROS 2 users to rather try the new zenoh-plugin-ros2dds which is dedicated to the support of ROS 2 with DDS. Thanks to a better integration with ROS 2 concepts, this new plugin comes with those benefits:

  • Better integration of the ROS graph (all ROS topics/services/actions can be seen across bridges)
  • Better support of ROS toolings (ros2 CLI, rviz2...)
  • Configuration of a ROS namespace on the bridge (instead of on each ROS Node)
  • Services and Action as Zenoh Queryables with more efficiency and scalability that RPC over DDS
  • Even more compact discovery information between the bridges (not forwarding all ros_discovery_info messages as such)

This Zenoh plugin for DDS will eventually be deprecated for ROS 2 usage.

Plugin or bridge ?

This software is built in 2 ways to choose from:

  • zenoh-plugin-dds: a Zenoh plugin - a dynamic library that can be loaded by a Zenoh router
  • zenoh-bridge-dds: a standalone executable

The features and configurations described in this document applies to both. Meaning the "plugin" and "bridge" words are interchangeables in the rest of this document.

How to install it

To install the latest release of either the DDS plugin for the Zenoh router, either the zenoh-bridge-dds standalone executable, you can do as follows:

Manual installation (all platforms)

All release packages can be downloaded from:

Each subdirectory has the name of the Rust target. See the platforms each target corresponds to on https://doc.rust-lang.org/stable/rustc/platform-support.html

Choose your platform and download:

  • the zenoh-plugin-dds-<version>-<platform>.zip file for the plugin.
    Then unzip it in the same directory than zenohd or to any directory where it can find the plugin library (e.g. /usr/lib)
  • the zenoh-bridge-dds-<version>-<platform>.zip file for the standalone executable.
    Then unzip it where you want, and run the extracted zenoh-bridge-dds binary.

Linux Debian

Add Eclipse Zenoh private repository to the sources list:

echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt update

Then either:

  • install the plugin with: sudo apt install zenoh-plugin-dds.
  • install the standalone executable with: sudo apt install zenoh-bridge-dds.

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 maintaining 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 than zenohd, and using for zenoh dependency the same version (or commit number) than 'zenohd'. Otherwise, incompatibilities in memory mapping of shared types between zenohd 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 and clang 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
  • 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-dds.git
$ cd zenoh-plugin-dds
$ cargo build --release

The standalone executable binary zenoh-bridge-dds and a plugin shared library (*.so on Linux, *.dylib on Mac OS, *.dll on Windows) to be dynamically loaded by the zenoh router zenohd will be generated in the target/release subdirectory.

Enabling Cyclone DDS Shared Memory Support

Cyclone DDS Shared memory support is provided by the Iceoryx PSMX plugin based on the Iceoryx library. Iceoryx introduces additional system requirements which are documented here.

Note: To ensure successful communication the entire system should be built to use the same version of the Iceoryx Library. The Zenoh DDS Plugin currently uses Iceoryx v2.0.5.

To build the zenoh bridge for DDS with support for shared memory the dds_shm optional feature must be enabled during the build process as follows:

  • plugin library:
$ cargo build --release -p zenoh-plugin-dds --features dds_shm
  • standalone executable binary:
$ cargo build --release -p zenoh-bridge-dds --features dds_shm

Note: Iceoryx does not need to be installed to build the bridge when the dds_shm feature is enabled. Iceoryx will be automatically downloaded, compiled, and statically linked into the zenoh bridge as part of the cargo build process.

When the zenoh bridge is configured to use DDS shared memory (see Configuration) the Iceoryx RouDi daemon (iox-roudi) must be running in order for the bridge to start successfully. If not started the bridge will wait for a period of time for the daemon to become available before timing out and terminating.

When building the zenoh bridge with the dds_shm feature enabled the iox-roudi daemon is also built for convenience. The daemon can be found under target/debug|release/build/cyclors-<hash>/out/iceoryx-build/bin/iox-roudi.

See here for more details of shared memory support in Cyclone DDS.

Shared Memory Limitations

The following limitations apply to Cyclone DDS shared memory support in the plugin:

  • Shared memory is not supported on Windows systems.
  • When DDS shared memory is enabled the Iceoryx PSMX plugin will be instantiated with the default configuration. If additional configuration is required the Iceoryx plugin should be configured via the CYCLONEDDS_URI instead.
  • In forward discovery mode DDS samples will not be forwarded via Zenoh unless the DDS data type is memcpy safe. A data type is memcpy safe if it does not contain indirections.

ROS 2 package

⚠️ Please consider using zenoh-bridge-ros2dds which is dedicated to ROS 2.

If you're a ROS 2 user, you can also build zenoh-bridge-dds as a ROS package running:

rosdep install --from-paths . --ignore-src -r -y
colcon build --packages-select zenoh_bridge_dds --cmake-args -DCMAKE_BUILD_TYPE=Release

The rosdep command will automatically install Rust and clang as build dependencies.

If you want to cross-compile the package on x86 device for any target, you can use the following command:

rosdep install --from-paths . --ignore-src -r -y
colcon build --packages-select zenoh_bridge_dds --cmake-args -DCMAKE_BUILD_TYPE=Release  --cmake-args -DCROSS_ARCH=<target>

where <target> is the target architecture (e.g. aarch64-unknown-linux-gnu). The architecture list can be found here.

The cross-compilation uses zig as a linker. You can install it with instructions in here. Also, the zigbuild package is required to be installed on the target device. You can install it with instructions in here.

Docker image

The zenoh-bridge-dds standalone executable is also available as a Docker images for both amd64 and arm64. To get it, do:

  • docker pull eclipse/zenoh-bridge-dds:latest for the latest release
  • docker pull eclipse/zenoh-bridge-dds:main for the main branch version (nightly build)

⚠️ However, notice that it's usage is limited to Docker on Linux and using the --net host option.
The cause being that DDS uses UDP multicast and Docker doesn't support UDP multicast between a container and its host (see cases moby/moby#23659, moby/libnetwork#2397 or moby/libnetwork#552). The only known way to make it work is to use the --net host option that is only supported on Linux hosts.

Usage: docker run --init --net host eclipse/zenoh-bridge-dds
It supports the same command line arguments than the zenoh-bridge-dds (see below or check with -h argument).


Usage

The use cases of this Zenoh plugin for DDS are various:

  • integration of a DDS System with a Zenoh System
  • communication between DDS System and embedded devices thanks to zenoh-pico
  • bridging between different DDS Systems, across various transports, via a Zenoh infrastructure (i.e. some routers or directly in peer-to-peer between the bridges)
  • scaling a DDS system up to the Cloud with Zenoh routers
  • integration with any technology supported by other Zenoh Plugins (MQTT, ROS 2 ...) or Storages technology (InfluxDB, RocksDB)

Configuration

zenoh-bridge-dds can be configured via a JSON5 file passed via the -cargument. You can see a commented example of such configuration file: DEFAULT_CONFIG.json5.

The "dds" part of this same configuration file can also be used in the configuration file for the zenoh router (within its "plugins" part). The router will automatically try to load the plugin library (zenoh-plugin_dds) at startup and apply its configuration.

zenoh-bridge-dds also accepts the following arguments. If set, each argument will override the similar setting from the configuration file:

  • zenoh-related arguments:
    • -c, --config <FILE> : a config file
    • -m, --mode <MODE> : The zenoh session mode. Default: peer Possible values: peer or client.
      See zenoh documentation for more details.
    • -l, --listen <LOCATOR> : A locator on which this router will listen for incoming sessions. Repeat this option to open several listeners. Example of locator: tcp/localhost:7447.
    • -e, --peer <LOCATOR> : A peer locator this router will try to connect to (typically another bridge or a zenoh router). Repeat this option to connect to several peers. Example of locator: tcp/<ip-address>:7447.
    • --no-multicast-scouting : disable the zenoh scouting protocol that allows automatic discovery of zenoh peers and routers.
    • -i, --id <hex_string> : The identifier (as an hexadecimal string - e.g.: 0A0B23...) that the zenoh bridge must use. WARNING: this identifier must be unique in the system! If not set, a random UUIDv4 will be used.
    • --rest-http-port <rest-http-port> : set the REST API http port (default: 8000)
  • DDS-related arguments:
    • -d, --domain <ID> : The DDS Domain ID. By default set to 0, or to "$ROS_DOMAIN_ID" is this environment variable is defined.

    • --dds-localhost-only : If set, the DDS discovery and traffic will occur only on the localhost interface (127.0.0.1). By default set to false, unless the "ROS_LOCALHOST_ONLY=1" environment variable is defined.

    • --dds-enable-shm : If set, DDS will be configured to use the Iceoryx shared memory PSMX plugin with default config. Requires the bridge to be built with the 'dds_shm' feature for this option to valid. By default set to false.

    • -f, --fwd-discovery : When set, rather than creating a local route when discovering a local DDS entity, this discovery info is forwarded to the remote plugins/bridges. Those will create the routes, including a replica of the discovered entity. More details here

    • -s, --scope <String> : A string used as prefix to scope DDS traffic when mapped to zenoh keys.

    • -a, --allow <String> : A regular expression matching the set of 'partition/topic-name' that must be routed via zenoh. By default, all partitions and topics are allowed.
      If both 'allow' and 'deny' are set a partition and/or topic will be allowed if it matches only the 'allow' expression.
      Repeat this option to configure several topic expressions. These expressions are concatenated with '|'. Examples of expressions:

      • .*/TopicA will allow only the TopicA to be routed, whatever the partition.
      • PartitionX/.* will allow all the topics to be routed, but only on PartitionX.
      • cmd_vel|rosout will allow only the topics containing cmd_vel or rosout in their name or partition name to be routed.
    • --deny <String> : A regular expression matching the set of 'partition/topic-name' that must NOT be routed via zenoh. By default, no partitions and no topics are denied.
      If both 'allow' and 'deny' are set a partition and/or topic will be allowed if it matches only the 'allow' expression.
      Repeat this option to configure several topic expressions. These expressions are concatenated with '|'.

    • --max-frequency <String>... : specifies a maximum frequency of data routing over zenoh per-topic. The string must have the format "regex=float" where:

      • "regex" is a regular expression matching the set of 'partition/topic-name' for which the data (per DDS instance) must be routedat no higher rate than associated max frequency (same syntax than --allow option).
      • "float" is the maximum frequency in Hertz; if publication rate is higher, downsampling will occur when routing.

      (usable multiple times)

    • --queries-timeout <Duration>: A duration in seconds (default: 5.0 sec) that will be used as a timeout when the bridge queries any other remote bridge for discovery information and for historical data for TRANSIENT_LOCAL DDS Readers it serves (i.e. if the query to the remote bridge exceed the timeout, some historical samples might be not routed to the Readers, but the route will not be blocked forever).

    • -w, --generalise-pub <String> : A list of key expressions to use for generalising the declaration of the zenoh publications, and thus minimizing the discovery traffic (usable multiple times). See this blog for more details.

    • -r, --generalise-sub <String> : A list of key expressions to use for generalising the declaration of the zenoh subscriptions, and thus minimizing the discovery traffic (usable multiple times). See this blog for more details.

Admin space

The zenoh bridge for DDS exposes an administration space allowing to browse the DDS entities that have been discovered (with their QoS), and the routes that have been established between DDS and zenoh. This administration space is accessible via any zenoh API, including the REST API that you can activate at zenoh-bridge-dds startup using the --rest-http-port argument.

Starting from version 0.11.0-rc.2, the zenoh-bridge-dds exposes this administration space with paths prefixed by @/<uuid>/dds (where <uuid> is the unique identifier of the bridge instance). The information is then organized with such paths:

  • @/<uuid>/dds/version : the bridge version
  • @/<uuid>/dds/config : the bridge configuration
  • @/<uuid>/dds/participant/<gid>/reader/<gid>/<topic> : a discovered DDS reader on <topic>
  • @/<uuid>/dds/participant/<gid>/writer/<gid>/<topic> : a discovered DDS reader on <topic>
  • @/<uuid>/dds/route/from_dds/<zenoh-resource> : a route established from a DDS writer to a zenoh key named <zenoh-resource> (see mapping rules).
  • @/<uuid>/dds/route/to_dds/<zenoh-resource> : a route established from a zenoh key named <zenoh-resource> (see mapping rules)..

For previous versions, see the corresponding version of README.md: 0.10.1-rc.

Example of queries on administration space using the REST API with the curl command line tool (don't forget to activate the REST API with --rest-http-port 8000 argument):

  • List all the DDS entities that have been discovered:
    curl http://localhost:8000/@/*/dds/participant/**
  • List all established routes:
    curl http://localhost:8000/@/*/dds/route/**
  • List all discovered DDS entities and established route for topic cmd_vel:
    curl http://localhost:8000/@/*/dds/**/cmd_vel

Pro tip: pipe the result into jq command for JSON pretty print or transformation.

Architecture details

The zenoh bridge for DDS discovers all DDS Writers and Readers in a DDS system and routes each DDS publication on a topic T as a Zenoh publication on key expression T. In the other way, assuming a DDS Reader on topic T is discovered, it routes each Zenoh publication on key expression T as a DDS publication on topic T.

The bridge doesn't deserialize the DDS data which are received from DDS Writer as a SerializedPayload with the representation defined in §10 of the DDS-RTPS specification. Therefore, the payload published from any Zenoh application for a DDS Reader served by the bridge must have such format:

 0...2...........8...............16..............24..............32
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   representation_identifier   |    representation_options     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                                                               ~
 ~ ... Bytes of data representation using a format that ...      ~
 ~ ... depends on the RepresentationIdentifier and options ...   ~
 ~                                                               ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Where the first 4 bytes (representation_identifier and representation_options) are usually {0x00, 0x0} for Big Endian encoding or {0x00, 0x01} for Little Endian encoding, and the remaining bytes are the data encoded in CDR.

In details, whether it's built as a library or as a standalone executable, it does the same things:

  • in default mode:

    • it discovers the DDS readers and writers declared by any DDS application, via the standard DDS discovery protocol (that uses UDP multicast)
    • it creates a mirror DDS writer or reader for each discovered reader or writer (using the same QoS)
    • if maps the discovered DDS topics and partitions to zenoh keys (see mapping details below)
    • it forwards user's data from a DDS topic to the corresponding zenoh key, and vice versa
    • it does not forward to the remote bridge any DDS discovery information
  • in "forward discovery" mode

    • each bridge will forward via zenoh the local DDS discovery data to the remote bridges (in a more compact way than the original DDS discovery traffic)
    • each bridge receiving DDS discovery data via zenoh will create a replica of the DDS reader or writer, with similar QoS. Those replicas will serve the route to/from zenoh, and will be discovered by the ROS2 nodes.
    • for ROS 2 systems, each bridge will forward the ros_discovery_info data (in a less intensive way than the original publications) to the remote bridges. On reception, the remote bridges will convert the original entities' GIDs into the GIDs of the corresponding replicas, and re-publish on DDS the ros_discovery_info. The full ROS graph can then be discovered by the ROS 2 nodes on each host.

Mapping of DDS topics to zenoh keys

The mapping between DDS and zenoh is rather straightforward: given a DDS Reader/Writer for topic A without the partition QoS set, then the equivalent zenoh key will have the same name: A. If a partition QoS P is defined, the equivalent zenoh key will be named as P/A.

Optionally, the bridge can be configured with a scope that will be used as a prefix to each zenoh key. That is, for scope S the equivalent zenoh key will be:

  • S/A for a topic A without partition
  • S/P/A for a topic A and a partition P

Mapping ROS 2 names to zenoh keys

The mapping from ROS 2 topics and services name to DDS topics is specified here. Notice that ROS 2 does not use the DDS partitions.
As a consequence of this mapping and of the DDS to zenoh mapping specified above, here are some examples of mapping from ROS 2 names to zenoh keys:

ROS2 names DDS Topics names zenoh keys (no scope) zenoh keys (if scope="myscope")
topic: /rosout rt/rosout rt/rosout myscope/rt/rosout
topic: /turtle1/cmd_vel rt/turtle1/cmd_vel rt/turtle1/cmd_vel myscope/rt/turtle1/cmd_vel
service: /turtle1/set_pen rq/turtle1/set_penRequest
rr/turtle1/set_penReply
rq/turtle1/set_penRequest
rr/turtle1/set_penReply
myscope/rq/turtle1/set_penRequest
myscope/rr/turtle1/set_penReply
action: /turtle1/rotate_absolute rq/turtle1/rotate_absolute/_action/send_goalRequest
rr/turtle1/rotate_absolute/_action/send_goalReply
rq/turtle1/rotate_absolute/_action/cancel_goalRequest
rr/turtle1/rotate_absolute/_action/cancel_goalReply
rq/turtle1/rotate_absolute/_action/get_resultRequest
rr/turtle1/rotate_absolute/_action/get_resultReply
rt/turtle1/rotate_absolute/_action/status
rt/turtle1/rotate_absolute/_action/feedback
rq/turtle1/rotate_absolute/_action/send_goalRequest
rr/turtle1/rotate_absolute/_action/send_goalReply
rq/turtle1/rotate_absolute/_action/cancel_goalRequest
rr/turtle1/rotate_absolute/_action/cancel_goalReply
rq/turtle1/rotate_absolute/_action/get_resultRequest
rr/turtle1/rotate_absolute/_action/get_resultReply
rt/turtle1/rotate_absolute/_action/status
rt/turtle1/rotate_absolute/_action/feedback
myscope/rq/turtle1/rotate_absolute/_action/send_goalRequest
myscope/rr/turtle1/rotate_absolute/_action/send_goalReply
myscope/rq/turtle1/rotate_absolute/_action/cancel_goalRequest
myscope/rr/turtle1/rotate_absolute/_action/cancel_goalReply
myscope/rq/turtle1/rotate_absolute/_action/get_resultRequest
myscope/rr/turtle1/rotate_absolute/_action/get_resultReply
myscope/rt/turtle1/rotate_absolute/_action/status
myscope/rt/turtle1/rotate_absolute/_action/feedback
all parameters for node turtlesim rq/turtlesim/list_parametersRequest
rr/turtlesim/list_parametersReply
rq/turtlesim/describe_parametersRequest
rr/turtlesim/describe_parametersReply
rq/turtlesim/get_parametersRequest
rr/turtlesim/get_parametersReply
rr/turtlesim/get_parameter_typesReply
rq/turtlesim/get_parameter_typesRequest
rq/turtlesim/set_parametersRequest
rr/turtlesim/set_parametersReply
rq/turtlesim/set_parameters_atomicallyRequest
rr/turtlesim/set_parameters_atomicallyReply
rq/turtlesim/list_parametersRequest
rr/turtlesim/list_parametersReply
rq/turtlesim/describe_parametersRequest
rr/turtlesim/describe_parametersReply
rq/turtlesim/get_parametersRequest
rr/turtlesim/get_parametersReply
rr/turtlesim/get_parameter_typesReply
rq/turtlesim/get_parameter_typesRequest
rq/turtlesim/set_parametersRequest
rr/turtlesim/set_parametersReply
rq/turtlesim/set_parameters_atomicallyRequest
rr/turtlesim/set_parameters_atomicallyReply
myscope/rq/turtlesim/list_parametersRequest
myscope/rr/turtlesim/list_parametersReply
myscope/rq/turtlesim/describe_parametersRequest
myscope/rr/turtlesim/describe_parametersReply
myscope/rq/turtlesim/get_parametersRequest
myscope/rr/turtlesim/get_parametersReply
myscope/rr/turtlesim/get_parameter_typesReply
myscope/rq/turtlesim/get_parameter_typesRequest
myscope/rq/turtlesim/set_parametersRequest
myscope/rr/turtlesim/set_parametersReply
myscope/rq/turtlesim/set_parameters_atomicallyRequest
myscope/rr/turtlesim/set_parameters_atomicallyReply
specific ROS discovery topic ros_discovery_info ros_discovery_info myscope/ros_discovery_info

zenoh-plugin-dds's People

Contributors

ahcorde avatar dariusimp avatar davidedellagiustina avatar diogomatsubara avatar eclipse-zenoh-bot avatar esteve avatar evshary avatar fuzzypixelz avatar gabrik avatar gmartin82 avatar homalozoa avatar imstevenpmwork avatar jenoch avatar joespeed avatar kydos avatar mallets avatar milyin avatar olivierhecart avatar p-avital avatar roby2014 avatar spiderkeys avatar splinter1984 avatar thijsmie avatar vinnnyr avatar william-wyliang avatar yellowhatter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenoh-plugin-dds's Issues

Using ROS2 introspective tools (ros2 node list, etc.) with Zenoh

I have two sets of ROS2 nodes running on different networks connected through a Zenoh router. When I use commands like ros2 node list and ros2 topic list on one network, they do not receive info about nodes and topics that are on the other network even though the ROS2 nodes are able to establish publisher/subscriber relationships across the Zenoh connection.

It would be very useful to have access to these tools when using Zenoh, since they make it much easier to debug ROS-related node and networking issues.

[Bug] Unable to get the first ROS service request while in forward discovery mode

Describe the bug

When I run zenoh-bridge-dds in forward discovery mode, ROS service does not respond to the first request from the client.
However, ROS service will respond to the second request from the client.
Also if not in forward discovery mode, the problem disappears.

To reproduce

Host1:

  1. Run zenoh-bridge-dds:
./target/release/zenoh-bridge-dds -f -l tcp/0.0.0.0:7447
  1. Run ROS2 service server:
ros2 run demo_nodes_cpp add_two_ints_server

Host2:

  1. Run zenoh-bridge-dds:
./target/release/zenoh-bridge-dds -f -e tcp/<HOST1 IP>:7447
  1. Run ROS2 service client:
ros2 run demo_nodes_cpp add_two_ints_client

The client request will be stuck.
But if I stop and rerun the request, it'll run successfully.

System info

Crash when sending compressed video

After getting the basics working over the internet using std_msgs/msg/String messages, I moved on to trying to send an H264 video stream through the DDS plugin. Discovery and setup within dzd seems to work fine, but the program crashes upon receiving a video frame message.

The frames being sent in this particular test ranged between 20KB - 90KB.

IDL used for video message:

module test_msgs {
  module msg {
    struct CompressedVideo {
        builtin_interfaces::msg::Time timestamp;    // Timestamp of frame from camera's clock
        unsigned long long            frame_id;     // Monotonically increasing frame counter
        unsigned long                 frame_meta;   // Additional bits for encoding compression-specific metadata
        sequence<octet, 1000000>      data;         // 1MB max allocated size
    };
  };
};

Application output:

root@a749392:/usr/src/app/zenoh-plugin-dds# RUST_LOG=debug LD_LIBRARY_PATH=/usr/local/lib/ ./target/release/dzd --peer=tcp/172.105.86.91:7447
1606523959.073460 [0]        dzd: using network interface eth0 (udp/10.10.11.3) selected arbitrarily from: eth0
[2020-11-28T00:39:19Z DEBUG zenoh::net] Zenoh Rust API v12bfe92
[2020-11-28T00:39:19Z DEBUG zenoh::net] Config: {"mode": "client", "local_routing": "false", "peer": "tcp/172.105.86.91:7447"}
[2020-11-28T00:39:19Z DEBUG zenoh_router::runtime] Using PID: E4FE6591AE5143689519887B68B72199
[2020-11-28T00:39:19Z DEBUG zenoh_protocol::session::manager] New session opened with 390CF4A4252842FA88EB45C35808C62B: whatami 1, lease 10s, keep alive 1000, sn resolution 268435456, initial sn tx 134184083, initial sn rx 73496218
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::broker] New face 0
[2020-11-28T00:39:19Z DEBUG zenoh_protocol::session::initial] New session link established with 390CF4A4252842FA88EB45C35808C62B: tcp/192.168.1.71:57560 => tcp/172.105.86.91:7447
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::broker] New face 1
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/memory/storage
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/memory/storage/*
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/memory/storage/* for face 0
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/*
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/* for face 0
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::queries] Register quaryable /@/router/390CF4A4252842FA88EB45C35808C62B/plugin/storages/backend/memory for face 0
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::queries] Register quaryable /@/router/390CF4A4252842FA88EB45C35808C62B for face 0
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /ros_discovery_info
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /ros_discovery_info for face 0
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 4394223598638391801
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 4394223598638391801
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 4394223598638391801
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: false
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: DCPSPublication
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: false
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: DCPSSubscription
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 4394223598638391801
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 4394223598638391801
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7169910340329578230
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /ros_discovery_info
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /ros_discovery_info
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: ros_discovery_info
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /ros_discovery_info
[2020-11-28T00:39:19Z DEBUG dzd] Already forwarding matching subscription ros_discovery_info -- ignoring
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/describe_parametersReply, rcl_interfaces::srv::dds_::DescribeParameters_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/describe_parametersReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/describe_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/describe_parametersReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/describe_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/get_parameter_typesReply, rcl_interfaces::srv::dds_::GetParameterTypes_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/get_parameter_typesReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/get_parameter_typesReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/get_parameter_typesReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/get_parameter_typesReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/get_parametersReply, rcl_interfaces::srv::dds_::GetParameters_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/get_parametersReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/get_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/get_parametersReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/get_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/list_parametersReply, rcl_interfaces::srv::dds_::ListParameters_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/list_parametersReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/list_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/list_parametersReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/list_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/set_parametersReply, rcl_interfaces::srv::dds_::SetParameters_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/set_parametersReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/set_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/set_parametersReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/set_parametersReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rr/h264_cam_node/set_parameters_atomicallyReply, rcl_interfaces::srv::dds_::SetParametersAtomically_Response_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rr/h264_cam_node/set_parameters_atomicallyReply
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rr/h264_cam_node/set_parameters_atomicallyReply
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rr/h264_cam_node/set_parameters_atomicallyReply
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rr/h264_cam_node/set_parameters_atomicallyReply
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rt/parameter_events, rcl_interfaces::msg::dds_::ParameterEvent_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rt/parameter_events
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rt/parameter_events
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rt/parameter_events
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rt/parameter_events
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rt/parameter_events, rcl_interfaces::msg::dds_::ParameterEvent_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rt/parameter_events
[2020-11-28T00:39:19Z DEBUG dzd] Already forwarding matching subscription rt/parameter_events -- ignoring
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rt/rosout, rcl_interfaces::msg::dds_::Log_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rt/rosout
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rt/rosout
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rt/rosout
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rt/rosout
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rt/rosout, rcl_interfaces::msg::dds_::Log_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rt/rosout
[2020-11-28T00:39:19Z DEBUG dzd] Already forwarding matching subscription rt/rosout -- ignoring
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredPublication(rt/vehicle/camera/forward/data, nadir_msgs::msg::dds_::CompressedVideo_, None
[2020-11-28T00:39:19Z DEBUG dzd] Declaring resource /rt/vehicle/camera/forward/data
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rt/vehicle/camera/forward/data
[2020-11-28T00:39:19Z DEBUG dzd] Creating Forwarding Reader for: /rt/vehicle/camera/forward/data
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rt/vehicle/camera/forward/data
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredSubscription(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: ros_discovery_info
[2020-11-28T00:39:19Z DEBUG dzd] The Subscription(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None is new setting up zenoh and DDS endpoings
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredSubscription(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None
[2020-11-28T00:39:19Z DEBUG dzd] The Subscription(ros_discovery_info, rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_, None is aready handled, IGNORING
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredSubscription(rq/h264_cam_node/describe_parametersRequest, rcl_interfaces::srv::dds_::DescribeParameters_Request_, None
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /ros_discovery_info for face 1
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rq/h264_cam_node/describe_parametersRequest
[2020-11-28T00:39:19Z DEBUG dzd] The Subscription(rq/h264_cam_node/describe_parametersRequest, rcl_interfaces::srv::dds_::DescribeParameters_Request_, None is new setting up zenoh and DDS endpoings
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rq/h264_cam_node/describe_parametersRequest
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredSubscription(rq/h264_cam_node/get_parameter_typesRequest, rcl_interfaces::srv::dds_::GetParameterTypes_Request_, None
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rq/h264_cam_node/get_parameter_typesRequest
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /rq/h264_cam_node/describe_parametersRequest for face 1
[2020-11-28T00:39:19Z DEBUG dzd] The Subscription(rq/h264_cam_node/get_parameter_typesRequest, rcl_interfaces::srv::dds_::GetParameterTypes_Request_, None is new setting up zenoh and DDS endpoings
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::resource] Register resource /rq/h264_cam_node/get_parameter_typesRequest
[2020-11-28T00:39:19Z DEBUG dzd] DiscoveredSubscription(rq/h264_cam_node/get_parametersRequest, rcl_interfaces::srv::dds_::GetParameters_Request_, None
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Local Domain Participant IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovery data from Participant with IH = 7069752098226128381
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Discovered endpoint is keyless: true
[2020-11-28T00:39:19Z DEBUG zplugin_dds] Ignoring discovery from local participant: rq/h264_cam_node/get_parametersRequest
[2020-11-28T00:39:19Z DEBUG zenoh_router::routing::pubsub] Register subscription /rq/h264_cam_node/get_parameter_typesRequest for face 1
[2020-11-28T00:39:19Z DEBUG dzd] The Subscription(rq/h264_cam_node/get_parametersRequest, rcl_interfaces::srv::dds_::GetParameters_Request_, None is new setting up zenoh and DDS endpoings
dzd: /usr/src/app/zenoh-plugin-dds/deps/cyclocut/src/cdds_blob.c:170: cdds_serdata_from_ser: Assertion `fragchain->nextfrag == NULL' failed.
Aborted (core dumped)

Membership status publication

The zenoh-bridge-dds are discovering and supervising each other via a Group Management algorithm. This feature is configurable via:

  • --group-member-id <ID>: This option allows to set a custom identifier for the bridge, that will be used in group membership algorithm (if not specified, the zenoh UUID is used).
  • --group-lease <Duration>: The lease duration (in seconds) used in group membership algorithm

I would be useful for the user if the bridge publishes the group events:

  • when a remote bridge joins the group (i.e. it's discovered)
  • when a remote bridge explicitly leaves the group
  • when a remote bridge has its lease expired (i.e. connectivity loss or bridge crash)

[Bug] Random failure on first ROS service request while in forward discovery mode

Describe the bug

Following #102 the same issue is still occurring, but randomly.

To reproduce

Host1:

  1. Run zenoh-bridge-dds:
./target/release/zenoh-bridge-dds -f -l tcp/0.0.0.0:7447
  1. Run ROS2 service server:
ros2 run demo_nodes_cpp add_two_ints_server

Host2:

  1. Run zenoh-bridge-dds:
./target/release/zenoh-bridge-dds -f -e tcp/<HOST1 IP>:7447
  1. Run ROS2 service client:
ros2 run demo_nodes_cpp add_two_ints_client_async

Most of the time the client succeeds. But sometime (~10%) the client is blocked after sending the request.
On server side, we see the request is received and processed.

System info

  • Platform: Ubuntu 20.04
  • ROS version: ROS 2 Humble
  • zenoh-plugin-dds: 0.7.0-rc

In forward discovery mode the scope is not used for routing of discovery traffic

Scenario to reproduce the issue:

  • ROS_DOMAIN_ID=1 ros2 run turtlesim turtlesim_node
  • zenoh-bridge-dds -d 1 -f -s /dom1
  • zenoh-bridge-dds -d 2 -f -s /dom2
  • ROS_DOMAIN_ID=2 ros2 topic list

Result: the ros2 topic list command displays the list of topics defines by the turtlesim, while it shouldn't since they operate on different scope.

Panic in fwd discovery mode: `Err` value: Closed(..)', zplugin-dds/src/dds_mgt.rs:137:26

In case a zenoh publication is made on a key expression that matches the ones used to forward the discovery information, such an error is displayed:
[2022-03-24T12:37:03Z ERROR zplugin_dds] Unexpected forwarded discovery message received on invalid key: /*/xxx (no expected kind)
And then the event loop is stopped, leading to the closure of an internal communication channel, and eventually to this panic:
thread '<unnamed>' panicked at 'called 'Result::unwrap()' on an Errvalue: Closed(..)', zplugin-dds/src/dds_mgt.rs:137:26

Fix: the event loop shall never be stopped.

Cargo build error

I am new to cargo, but following the Readme I get following error and I don't really know how to solve this:

cargo +nightly build --release --all-targets
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (signal: 11, SIGSEGV: invalid memory reference)

Docker build error

I have downloaded the zenoh plugin dds on my PC. I could sucessfully build the rust binary unter the target/release, although there was also not that smooth.
But I want to use it as a docker container.
As I ran the command docker build -t zenoh-bridge:latest /zenoh-plugin-dds/, it failed at step 6/18, with the following error message:
error: could not compile zplugin-dds Caused by: process didn't exit successfully: rustc --crate-name dzd --edition=2018 src/bin/zenoh-bridge-dds.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 -C metadata=ba6255499f3b3893 -C extra-filename=-ba6255499f3b3893 --out-dir /usr/src/zenoh-plugin-dds/target/release/deps -L dependency=/usr/src/zenoh-plugin-dds/target/release/deps --extern async_std=/usr/src/zenoh-plugin-dds/target/release/deps/libasync_std-971771c819c3d6ae.rlib --extern async_trait=/usr/src/zenoh-plugin-dds/target/release/deps/libasync_trait-d330024b777d927b.so --extern clap=/usr/src/zenoh-plugin-dds/target/release/deps/libclap-f130171fc73c7873.rlib --extern cyclors=/usr/src/zenoh-plugin-dds/target/release/deps/libcyclors-5c0dc288e3ea32a3.rlib --extern env_logger=/usr/src/zenoh-plugin-dds/target/release/deps/libenv_logger-065286da14da1e1f.rlib --extern futures=/usr/src/zenoh-plugin-dds/target/release/deps/libfutures-3257bf31cb9dd6ef.rlib --extern libc=/usr/src/zenoh-plugin-dds/target/release/deps/liblibc-82fc623194b48829.rlib --extern log=/usr/src/zenoh-plugin-dds/target/release/deps/liblog-06380b60399c477a.rlib --extern regex=/usr/src/zenoh-plugin-dds/target/release/deps/libregex-1ba1495b2025cb1f.rlib --extern zenoh=/usr/src/zenoh-plugin-dds/target/release/deps/libzenoh-6dc48809802b17c2.rlib --extern zplugin_dds=/usr/src/zenoh-plugin-dds/target/release/deps/libzplugin_dds-064595951d1906a9.rlib -L /usr/local/lib -L native=/usr/src/zenoh-plugin-dds/target/release/build/cyclors-3432522568f8014c/out/cyclonedds-build/lib -L native=/usr/src/zenoh-plugin-dds/target/release/build/cyclors-3432522568f8014c/out/cyclocut-build/lib -L native=/usr/src/zenoh-plugin-dds/target/release/build/ring-3baaa555570ba30c/out (signal: 9, SIGKILL: kill) warning: build failed, waiting for other jobs to finish... error: failed to compile zplugin-dds v0.5.0-beta.2 (/usr/src/zenoh-plugin-dds), intermediate artifacts can be found at /usr/src/zenoh-plugin-dds/target

Could someone tell me, how to fix this error?

My OS and architecture is:
Linux my-server 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Combine Zenoh-plugin-dds with Cyclone iceoryx shared memory

The Zenoh-plugin-dds fails to start when an unknown configuration is found in the configuration of Cyclone (CYCLONEDDS_URI). After enabling shared memory zenoh reports an error on start:

1634811842.307391 [] async-std/: config: //CycloneDDS/Domain: SharedMemory: unknown element (file:///home/elias/tractonomy/shm_test_ws/src/ros2_shm_demo/cyclonedds.xml line 22)

The goal is to increase performance on the local machine through iceoryx while still maintain the possibility to connect remotely over WiFi using Zenoh. I'm using ROS2 Galactic, Cyclone DDS with iceoryx support and zenoh_plugin_dds ros2 node from this repository (master branch).

cyclonedds.xml

<?xml version="1.0" encoding="UTF-8"?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/iceoryx/etc/cyclonedds.xsd">
    <Domain id="any">
         <General>
            <NetworkInterfaceAddress>lo</NetworkInterfaceAddress>
            <AllowMulticast>default</AllowMulticast>
            <MaxMessageSize>65500B</MaxMessageSize>
            <FragmentSize>64000B</FragmentSize>
        </General>
        <Internal>
            <Watermarks>
                <WhcHigh>500kB</WhcHigh>
            </Watermarks>
            <MinimumSocketReceiveBufferSize>10MB</MinimumSocketReceiveBufferSize>
            <AssumeMulticastCapable>lo</AssumeMulticastCapable>
        </Internal>
        <SharedMemory>
            <Enable>true</Enable>
            <SubQueueCapacity>256</SubQueueCapacity>
            <SubHistoryRequest>16</SubHistoryRequest>
            <PubHistoryCapacity>16</PubHistoryCapacity>
            <LogLevel>info</LogLevel>
        </SharedMemory>
    </Domain>
</CycloneDDS>

how to reproduce

Using the ros2_shm_demo sample code it is easy to reproduce with the following steps.

  • create new workspace
  • clone zenoh-plugin-dds in src folder
  • clone ros2_shm_demo in src folder
  • rosdep install --from-paths . --ignore-src -r -y
  • colcon build
  • edit src/ros2_shm_demo/cyclonedds.xml to correspond my config given at the top of this issue.
  • export CYCLONEDDS_URI=file://$PWD/src/ros2_shm_demo/cyclonedds.xml
  • . install/setup.bash

Do not forget to export CYCLONEDDS_URI and source your workspace in each terminal before every command.

Terminal 1

ros2 run ros2_shm_demo listener

Terminal 2

ros2 run ros2_shm_demo talker

Terminal 3

iox-roudi

You should see the talker and listener communicate using Shared Memory (iceoryx).

Terminal 4

RUST_LOG=info ros2 run zenoh_bridge_dds zenoh_bridge_dds

Expected result

I would assume it would ignore the Shared Memory configuration and try to discover nodes using the local loopback interface. However it fails on recognizing the <SharedMemory> tag from the config file and hangs without discovering any nodes, topics, etc.

Starting an additional echo on the topic does work when adding the ROS msg type:

ros2 topic echo /chatter ros2_shm_demo/msg/ShmTopic

Update README with install instructions

At next release (probably 0.6.0-beta.1), update the README with installation instructions, including:

  • Debian packages install
  • Binaries download
  • Docker container

[Bug] Unable to build with the latest zenoh-plugin-dds

Describe the bug

While building the latest version of zenoh-plugin-dds, it causes the following error:

.....
   Compiling cyclors v0.1.5
error: failed to run custom build command for `cyclors v0.1.5`

Caused by:
  process didn't exit successfully: `/home/ros/zenoh-plugin-dds/target/release/build/cyclors-073c38f7381a1401/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds" "-DBUILD_SHARED_LIBS=OFF" "-DBUILD_IDLC=OFF" "-DBUILD_DDSPERF=OFF" "-DENABLE_SSL=NO" "-DENABLE_SECURITY=NO" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_PREFIX=/home/ros/zenoh-plugin-dds/target/release/build/cyclors-662b0f66ac098368/out/cyclonedds-build" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- Building without OMG DDS Security support
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/ros/zenoh-plugin-dds/target/release/build/cyclors-662b0f66ac098368/out/cyclonedds-build/build
  running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--parallel" "12"
  [  0%] Built target _confgen
  [ 21%] Built target ddsrt-internal
  [ 21%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_serdata_default.c.o
  [ 21%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_security_omg.c.o
  [ 21%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_serdata_plist.c.o
  [ 22%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_sertype_default.c.o
  [ 23%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_pmd.c.o
  [ 23%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_entity_index.c.o
  [ 24%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_deliver_locally.c.o
  [ 24%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_deadline.c.o
  [ 25%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_plist.c.o
  [ 26%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_config.c.o
  [ 26%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_cdrstream.c.o
  [ 27%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_time.c.o
  [ 27%] Building C object src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_ownip.c.o

  --- stderr
  make: warning: -j12 forced in submake: resetting jobserver mode.
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/q_xmsg.h:24,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_plist.c:31:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:479: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_plist.c.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/q_xmsg.h:24,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_sertype_default.c:37:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/q_xmsg.h:24,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_serdata_plist.c:29:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_serdata_default.c:30:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/q_xmsg.h:24,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_security_omg.h:25,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_security_omg.c:3920:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:271: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_serdata_plist.c.o] Error 1
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:297: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_sertype_default.c.o] Error 1
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:245: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_serdata_default.c.o] Error 1
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsc/src/dds__types.h:26,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsc/src/dds__alloc.h:15,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_cdrstream.c:23:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:193: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_security_omg.c.o] Error 1
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:492: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_cdrstream.c.o] Error 1
  In file included from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/q_xmsg.h:24,
                   from /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/src/ddsi_pmd.c:32:
  /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.5/cyclonedds/src/core/ddsi/include/dds/ddsi/ddsi_shm_transport.h:27:10: fatal error: iceoryx_binding_c/config.h: No such file or directory
     27 | #include "iceoryx_binding_c/config.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [src/core/CMakeFiles/ddsc.dir/build.make:427: src/core/CMakeFiles/ddsc.dir/ddsi/src/ddsi_pmd.c.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:310: src/core/CMakeFiles/ddsc.dir/all] Error 2
  make: *** [Makefile:152: all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /home/ros/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I guess the error is from the commit Use new cyclors.
If I use the previous commit, the error disappears.

To reproduce

  1. Get the code from GitHub
  2. Build standalone executable
cargo build --release -p zenoh-bridge-dds

System info

  • Platform: Ubuntu 20.04
  • CPU: Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz

[Bug] Zenoh router doesn't seem to work with `@appendable` data

Describe the bug

I use Zenoh plugin to access DDS data via VPN (ie the router configuration). This works well when the data types are annotated with @final (the current default) but fails when the types are annotated with @appendable.

I don't see reference to XTypes in this repository, although I'm not familiar with it (@appendable is a relatively new feature).

Is this expected behavior?

To reproduce

  1. Create a data type in an IDL file and annotate it with either @final or @appendable
  2. Create a publisher and a subscriber
  3. Run the publisher on computer A, as well as a Zenoh bridge: docker run --init --rm --net=host eclipse/zenoh-bridge-dds:0.6.0-beta.1 --no-multicast-scouting -l tcp/0.0.0.0:7447
  4. Run a VPN, and run the subscriber on computer B. Run a second Zenoh bridge: docker run --init --rm --net=host eclipse/zenoh-bridge-dds:0.6.0-beta.1 --no-multicast -scouting -m peer -e tcp/$IP:7447

If the data type is @final, this works. If it's @appendable, it doesn't.

System info

  • DDS implementation: CycloneDDS v0.10.2
  • VPN: WireGuard
  • Platform: CentOS Stream 8
  • CPU: AMD Ryzen 9 5950X

Support TRANSIENT_LOCAL DDS Readers/Writers

The DDS TRANSIENT_LOCAL implementation relies mainly in the DDSI protocol that introduces a tight coupling between a DDS Reader and its matching DDS Writers. The DDS Reader is able to discover a new matching DDS Writer (or one coming back after a disconnection) and to request him re-publications of non-received samples.

When bridged via the zenoh-plugin-dds, the DDSI protocol is not end-to-end between a DDS Writer and a DDS Reader, and a Reader cannot discover all the matching Writers on the other side of the bridge (for scalability reasons).

Still, with some updates in the zenoh-plugin-dds, the TRANSIENT_LOCAL behaviour can be ensured across the bridge:

  • leveraging the zenoh PublicationCache the zenoh-dds-plugin can cache the publications of the TRANSIENT_LOCAL DDS Writers he's routing to zenoh
  • leveraging the zenoh QueryingSubscriber the zenoh-dds-plugin can query the past/missed publications from the publication caches of remote zenoh-dds-plugins, and make those available to the TRANSIENT_LOCAL DDS Readers
  • leveraging the zenoh Group Management the zenoh-dds-plugin can discover new remote zenoh-dds-plugins and make its querying subscribers for TRANSIENT_LOCAL DDS Readers to query the publication caches of new comers.

Topic Whitelisting/Blacklisting

It would be useful to be able to control by configuration the DDS topics that should not be exposed via zenoh resources or viceversa the set of those that should be.

Option for DDS discovery forwarding

By default the DDS discovery protocol is not routed through the zenoh bridge for DDS.
Meaning that, in case you use 2 zenoh-bridge-dds to interconnect 2 DDS domains, the DDS entities discovered in one domain won't be advertised in the other domain. Thus, the DDS data will be routed between the 2 domains only if matching readers and writers are declared in the 2 domains independently.

This behaviour prevents unnecessary DDS discovery traffic (that can be heavyweight) to occur (more explanation in this blog. But it also prevents some dynamic use cases where a DDS application relies on discovery of remote readers and writers.
For instance, the implication using ROS2 is that the ROS graph is not complete on the remote end, making commands such as ros2 topic list to return only topics discovered in the "local" domain.

Therefore, we need to add an option allowing to configure the zenoh bridge for DDS with an expression of the topics for which it must forward the DDS discovery information via zenoh. Thus, a remote zenoh bridge for DDS will automatically create a corresponding route and a mirror DDS entity that will be discovered by the DDS applications.
The list of topic could be .* meaning that all the DDS discovery information will be forwarded.

Specify a max frequency of routing per-topic

Some periodic DDS publications might lead to an excessive bandwidth consumption when routed over a connectivity with a limited bandwidth. In such situation it's useful to perform downsampling on those publications, dropping some publications in order to route data at a maximum frequency.

For this purpose, a --dds-max-frequency <String> option will be added to the bridge. The string having the format "<regex>=<float>"where:

  • regex is a regular expression matching the set of 'partition/topic-name' for which the data (per DDS instance) must be routed at no higher rate than associated max frequency (same syntax than --dds-allow option).
  • float is the maximum frequency in Hertz; if publication rate is higher, downsampling will occur when routing

[Bug] After port to CycloneDDS 0.10.2 the routes are not removed when a DDS entity is removed

Describe the bug

Activating the trace log, the bridge doesn't react at all after a DDS Reader or Writer it serves is gone.
I.e. no [2022-11-29T14:11:38Z DEBUG zplugin_dds] Undiscovered DDS Reader... log

To reproduce

  1. Start a zenoh-bridge-dds
  2. Start any DDS application creating a Writer of a Reader
  3. Check that the bridge created a route for it
  4. Kill the DDS application

Result: the route is not deleted by the bridge even after waiting +30 seconds.

System info

zenoh-plugin-dds docker port

I am using the zenoh plugin dds inside a docker container.
As I ran docker run -e RUST_LOG=debug --name zenoh-bridge -p 7447:7447/tcp zenoh-bridge, the zenohd can not be reached at the port 7447, but at another port zenohd can be reached on tcp/172.17.0.2:35065.
But the docker ps shows me:
7447/udp, 0.0.0.0:7447->7447/tcp, :::7447->7447/tcp zenoh-bridge. The docker command should be right, but why the port 7447 is not opened?

Docker image eclipse/zenoh-bridge-dds:master for arm64 is broken.

Attempts to execute the arm64 docker for eclipse/zenoh-bridge-dds:master on Raspberry Pi 4 with Ubuntu fails.

Steps to reproduce on Raspi 4

docker pull eclipse/zenoh-bridge-dds:master
docker run -it eclipse/zenoh-bridge-dds:master

Result:

/usr/local/bin/zenoh-bridge-dds: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bin/zenoh-bridge-dds)

libc-2.28.so is available in the /lib/aarch64-linux-gnu/, but apparently v2.29 is required.
Interestingly, this was not observed in the amd64 docker.

cmake build --release command fails

-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
[ 66%] Building C object CMakeFiles/cdds-util.dir/src/cdds_blob.c.o
[ 66%] Building C object CMakeFiles/cdds-util.dir/src/builtin.c.o
[100%] Linking C static library libcdds-util.a
[100%] Built target cdds-util
Install the project...
-- Install configuration: "Release"
-- Installing: /home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/lib/libcdds-util.a
-- Installing: /home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/include/cdds
-- Installing: /home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/include/cdds/cdds_builtin.h
-- Installing: /home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/include/cdds/cdds_util.h
cargo:root=/home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build
cargo:rustc-link-search=native=/home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclocut-build/lib
cargo:rustc-link-lib=static=cdds-util

--- stderr
CMake Warning:
Manually-specified variables were not used by the project:

  CMAKE_ASM_COMPILER
  CMAKE_ASM_FLAGS
  CMAKE_CXX_COMPILER

CMake Warning:
Manually-specified variables were not used by the project:

  CMAKE_ASM_COMPILER
  CMAKE_ASM_FLAGS
  CMAKE_INSTALL_LIBDIR
  CYCLONE_INCLUDE
  CYCLONE_LIB

/home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclonedds-build/include/dds/dds.h:15:10: fatal error: 'stddef.h' file not found
/home/shaurya/zenoh-plugin-dds/zplugin-dds/target/release/build/cyclors-7b461b7c5ccc9415/out/cyclonedds-build/include/dds/dds.h:15:10: fatal error: 'stddef.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings: ()', /home/shaurya/.cargo/registry/src/github.com-1ecc6299db9ec823/cyclors-0.1.1/build.rs:59:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Behavior difference for multiple TRANSIENT_LOCAL publishers

There is a difference between the behavior of vanilla ROS2 and using Zenoh for handling communication between hosts. With 2 or more publishers (e.g. /tf_static) only one message will be received by late subscribers when using Zenoh while with the vanilla you would receive one message from each publisher (example with /tf_static uses depth of one https://github.com/ros2/geometry2/blob/bd125c5af32e2c63c70b7e0ba88e57094714b9b8/tf2_ros/include/tf2_ros/qos.hpp#L66).

In my setup each physical device publishes its own static transforms which makes zenoh unusable without continuously republishing the static transforms.

logs filtered on /tf_static:

[2022-01-11T16:38:05Z DEBUG zplugin_dds::dds_mgt] Discovered DDS publication cbdc1001ecc47db2d8d6102c00001603 from Participant cbdc1001ecc47db2d8d6102c000001c1 on rt/tf_static with type tf2_msgs::msg::dds_::TFMessage_ (keyless: true)
[2022-01-11T16:38:05Z DEBUG zplugin_dds] Discovered DDS Writer on rt/tf_static: cbdc1001ecc47db2d8d6102c00001603
[2022-01-11T16:38:05Z DEBUG zenoh::net::routing::resource] Register resource /rt/tf_static
[2022-01-11T16:38:05Z DEBUG zplugin_dds] Caching publications for TRANSIENT_LOCAL Writer on resource /rt/tf_static with history 1
[2022-01-11T16:38:05Z DEBUG zenoh::net::routing::resource] Register resource /@dds_pub_cache/B6F8FB5759A44D39A2FB181081A96C63/rt/tf_static
[2022-01-11T16:38:05Z DEBUG zenoh::net::routing::queries] Register queryable /@dds_pub_cache/B6F8FB5759A44D39A2FB181081A96C63/rt/tf_static (face: Face{0, B6F8FB5759A44D39A2FB181081A96C63}, kind: 8)
[2022-01-11T16:38:05Z DEBUG zenoh::net::routing::queries] Register peer queryable /@dds_pub_cache/B6F8FB5759A44D39A2FB181081A96C63/rt/tf_static (peer: B6F8FB5759A44D39A2FB181081A96C63, kind: 8)
[2022-01-11T16:38:05Z DEBUG zplugin_dds::dds_mgt] Discovered DDS subscription ed3c1001c01efcbbeb2528b900001504 from Participant ed3c1001c01efcbbeb2528b9000001c1 on rt/tf_static with type tf2_msgs::msg::dds_::TFMessage_ (keyless: true)
[2022-01-11T16:38:05Z DEBUG zplugin_dds::dds_mgt] Ignoring discovery of ed3c1001c01efcbbeb2528b900001504 (rt/tf_static) from local participant
[2022-01-11T16:38:05Z INFO  zplugin_dds] New route: DDS 'rt/tf_static' => zenoh '/rt/tf_static' with type 'tf2_msgs::msg::dds_::TFMessage_'

[2022-01-11T16:38:19Z DEBUG zplugin_dds::dds_mgt] Discovered DDS publication f19810013ed8411c12de60fc00001603 from Participant f19810013ed8411c12de60fc000001c1 on rt/tf_static with type tf2_msgs::msg::dds_::TFMessage_ (keyless: true)
[2022-01-11T16:38:19Z DEBUG zplugin_dds] Discovered DDS Writer on rt/tf_static: f19810013ed8411c12de60fc00001603
[2022-01-11T16:38:19Z DEBUG zplugin_dds] Route from DDS to resource /rt/tf_static already exists -- ignoring

Expected result

A late subscriber to /tf_static should receive one message from all publishers.

[Bug] rustc version installed through rosdep is lagging behind that required by this package

Describe the bug

rustc version installed through rosdep is version 1.61.0 but package zenoh-config v0.6.0-beta.1 requires rustc 1.62.1 or newer.

Apparently, the latest binary version of rustc for Ubuntu is at V1.61.0

If rust is installed for the first time via rosdep, rustup will not be installed and cannot be used to update the rustc version. The workaround now is to install rustup and rustc packages the officially recommended way:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

To reproduce

  1. Create workspace and clone the repo
mkdir -p zenoh_ws/src
git clone https://github.com/eclipse-zenoh/zenoh-plugin-dds.git zenoh_ws/src/zenoh-plugin-dds
  1. Download and install dependencies through rosdep. This installs the packages cargo and rustc
cd zenoh_ws
rosdep install --from-paths src --ignore-src -r
  1. Build the workspace
colcon build
  1. Error shows
error: package `zenoh-config v0.6.0-beta.1` cannot be built because it requires rustc 1.62.1 or newer, while the currently active rustc version is 1.61.0
gmake[2]: *** [CMakeFiles/build_crate.dir/build.make:79: target/release/zenoh-bridge-dds] Error 101
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/build_crate.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< zenoh_bridge_dds [1min 22s, exited with code 2]

Summary: 0 packages finished [1min 22s]
  1 package failed: zenoh_bridge_dds
  1 package had stderr output: zenoh_bridge_dds

System info

  • Platform: [Ubuntu 22.04.1 LTS]
  • CPU: [AMD Ryzen 7 3800x]
  • Zenoh version: 0.6.0-beta.1

config.sh should check if cyclone-dds is installed as part of ROS2

At the present time the config.sh only checks to see if cyclone is installed locally under /usr/local but does not check to see if by any chance it is installed as part of ROS2 and consequently under /opt/ros/...

This check should be added and the ROS2 installed version reused if available.

Build failure on ROS 2 Buildfarm

Commit e344199 caused a build failure on ROS2 buildfarm:

Compiling zenoh-plugin-rest v0.5.0-dev (https://github.com/eclipse-zenoh/zenoh#8ae5936b)
error[E0658]: use of unstable library feature 'str_split_once': newly added
  --> /tmp/ws/src/zenoh_bridge_dds/zplugin-dds/src/lib.rs:182:17
   |
182 |         match s.split_once('=') {
   |                 ^^^^^^^^^^
   |
   = note: see issue #74773 <https://github.com/rust-lang/rust/issues/74773> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.

waiting for action server or service broken

When using action servers or services it is typical to first test if the action server or service is available with wait_for_action_server or wait_for_service. When having a zenoh bridge node active it will create an action server or service proxy which will then trigger the wait to finish and succeed. Navigation stack uses this feature in the life-cycle nodes to wait for action servers or services to become active before activating itself.

code example:

rclcpp_action::Client<NavigateToPose>::SharedPtr client =
    rclcpp_action::create_client<NavigateToPose>(this, "navigate_to_pose");
  while (!client->wait_for_action_server(std::chrono::duration<double>(1.0))) {
    RCLCPP_ERROR(
      get_logger(), "timed out waiting for action server");
    if (!rclcpp::ok())
      throw std::runtime_error("exited rclcpp while constructing client");
  }

My current work around is to only allow topics to be routed through zenoh using `--allow /rt/'.

ROS2 build failure

build command: colcon build --packages-select zenoh_bridge_dds

Output:

Starting >>> zenoh_bridge_dds
--- stderr: zenoh_bridge_dds
make[2]: *** No rule to make target '/home/elias/ros_ws/src/tools/zenoh-plugin-dds/zenoh-bridge-dds/Cargo.lock', needed by 'target/release/zenoh-bridge-dds'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:98: CMakeFiles/build_crate.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
---
Failed   <<< zenoh_bridge_dds [0.08s, exited with code 2]

Summary: 0 packages finished [3.60s]
  1 package failed: zenoh_bridge_dds
  1 package had stderr output: zenoh_bridge_dds

Reason:
In 9889381 the path of Cargo.lock has changed.

Update subscription logic to maximise resource generalisation

As zenoh has recently added support for resource generalisation by configuration -- notice that we take the liberty to generalise within the routers -- we can exploit this resource generalisation to further limit the discovery traffic. Our early measurements, performed using the ROS2 dummy_robot demo, show a reduction in discovery data of 180x -- when compared to ROS2 generated DDS discovery traffic. These initial results are extremely encouraging, but more experiments are done. In light of the extremely promising results we should make this feature generally available.

Compatibility between opendds and cyclonedds

Hello everyone,
I have a question about the compartibility of opendds as mentioned in title.
If I would like to write a publisher in opendds and a subscriber in cyclone. Would it be possible, that the subscriber receives the messages from the publisher, which is writen in opendds? Have you already tested the compartibility?
Thank you!

Port to CycloneDDS 0.10.2

zenoh-plugin-dds currently relies on CycloneDDS 0.7.0 (builtin and statically linked within the plugin or the zenoh-bridge-dds binaries).

It must be ported to CycloneDDS 0.10.x to benefit its improvements.

This issue depends on kydos/cyclocut#3

How to choose network interface where plugin runs?

From the log as shown below, I see the plugin chooses "wlan0". But I want to run on another interface. Can I config it?

async-std/: using network interface wlan0 (udp/192.168.0.213) selected arbitrarily from: wlan0, docker0, flannel.1, cni0

Thanks in advance!

Use CongestionControl::Blocking when routing RELIABLE Writers

When a DDS Writer with RELIABLE and KEEP_ALL QoS is discovered, its publication to RELIABLE DDS Readers should be routed over zenoh with the CongestionControl::Blocking strategy to not drop any routed data.
As a consequence, in case of congestion, the route will be blocked, blocking the DDS Reader that will stop acknowledging publications from the RELIABLE DDS Writer, and this one will also be blocked on writes.

Still, in some use cases, one could prefer to still having the bridge to drop some publications, avoiding a "congested" external network to slow down its DDS system. Thus this feature should be deactivable.

Get on an exact path in admin space returns nothing

Running zenoh-bridge-dds --rest-plugin:

curl http://localhost:8000/@/** returns:

[
{ "key": "/@/service/7E3418AB8A1546B0B134DD1FE8C26F52/dds/version", "value": "v0.5.0-beta.8-59-ga466f22 built with rustc 1.53.0 (53cb7b09b 2021-06-17)", "encoding": "application/json", "time": "2021-09-02T11:10:44.645689000Z/00" },
{ "key": "/@/service/7E3418AB8A1546B0B134DD1FE8C26F52/dds/config", "value": {"domain_id":4294967295,"scope":"","allow":"**"}, "encoding": "application/json", "time": "2021-09-02T11:10:44.645887000Z/00" }
]

While curl -g http://localhost:8000/@/service/7E3418AB8A1546B0B134DD1FE8C26F52/dds/version returns:

[

]

The expected result is:

[
{ "key": "/@/service/7E3418AB8A1546B0B134DD1FE8C26F52/dds/version", "value": "v0.5.0-beta.8-59-ga466f22 built with rustc 1.53.0 (53cb7b09b 2021-06-17)", "encoding": "application/json", "time": "2021-09-02T11:10:44.645689000Z/00" },
]

Forward discovery failure in case DDS discovery happens before connecting to remote bridge

The issue can be reproduced with 2 distinct networks, not interconnected at the beginning:

  • network 1:
    • start a DDS application
    • start zenoh-bridge-dds -f -e tcp/0.0.0.0:7447
  • network 2:
    • start another DDS application that supposed to communicate with the 1st one via the bridges
    • start zenoh-bridge-dds -f -l tcp/<ip_of_1st_bridge>:7447
  • connect the 2 networks

Expected behaviour: the bridges discover each other, exchange discovery messages, establish routes and eventually the DDS application communicate with each other via the bridges.

Current behaviour: the bridges discover each other, but the discovery messages are not exchanged.
This can be verified by the lack of such debug logs in the bridges: [2022-04-12T08:45:32Z DEBUG zplugin_dds] Received forwarded discovery message on ...

zenoh-plugin-dds source from .profile/ .bashrc

Is there any way to source the zenoh-plugin-dds? Every time remembering the whole installation path and running the command is kind of annoying and it is cumbersome for the whole ecosystem, if someone has 3 or 4 hosts and remembers each single installation directory, I guess you understood it. Will it be possible to provide some executable file so that we can export it and use zenoh-bridge-dds -d 1 only other than ~/zenoh-plugin-dds/zenoh-plugin-dds/target/release/zenoh-bridge-dds -d 1

macOS

@kydos @JEnoch heads up that @JWhitleyWork and I get same error when following the readme. I'm on macOS 10.15.7, Josh is on Ubuntu

-- Build files have been written to: /Users/joespeed/Downloads/zenoh-plugin-dds/deps/cyclocut/build
./config.sh: line 40: [: Other: binary operator expected
Scanning dependencies of target cdds-util
[ 6%] Building C object CMakeFiles/cdds-util.dir/src/cdds_blob.c.o
In file included from /Users/joespeed/Downloads/zenoh-plugin-dds/deps/cyclocut/src/cdds_blob.c:4:
/Users/joespeed/Downloads/zenoh-plugin-dds/deps/cyclocut/./include/cdds/cdds_util.h:5:10: fatal error:
'dds/dds.h' file not found
#include "dds/dds.h"
^~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/cdds-util.dir/src/cdds_blob.c.o] Error 1
make[1]: *** [CMakeFiles/cdds-util.dir/all] Error 2
make: *** [all] Error 2
Cleaning up.
Joes-MacBook-Pro:zenoh-plugin-dds joespeed$

DDS data routing and forwarding through zenoh

The aim of this first phase is to provide the ability to dynamically discover DDS entities and then create on the fly the required matching entities on DDS side and some associated entities in zenoh to allow for data forwarding.

Endpoint Un-Declaration and Resource Cleanup

Whilst in many use cases the number topics flowing in the system will be rather static, it still makes sense to tear down DDS endpoints when undiscovering matching remote entities. Likewise the associated zenoh entities should be removed.

Publication cache re-implementation

Currently a route for TRANSIENT_LOCAL Writers uses a zenoh-ext PublicationCache to store the published samples. However this cache is not designed to maintain 1 queue per-writer, leading to cache only 1 sample despite several Writer with history length 1 might be served by this route (see #61).

A new publication cache (specific to this plugin) must be implemented to support per-writer caching, with a queue size corresponding to each matching Writer. The cache management must be dynamic to allow addition/removal of queues on Writers discovery/undiscovery.
Ideally, we should also foresee the possibility to support per-instance queues, to be used when the plugin will be able to distinguish instances at samples reception.

Error after running config.sh: "fatal error: dds/dds.h: No such file or directory"

OS: Ubuntu 20.04
ROS: Foxy, installed from binaries
I installed Rust using rustup as recommended in this repo's README.

After cloning the repo and sourcing /opt/ros/foxy/setup.bash, I ran the config.sh script, but I encounter an error while building some dependencies:

In file included from /home/jschornak/zenoh-plugin-dds/deps/cyclocut/src/cdds_blob.c:4:
/home/jschornak/zenoh-plugin-dds/deps/cyclocut/./include/cdds/cdds_util.h:5:10: fatal error: dds/dds.h: No such file or directory
 #include "dds/dds.h"
          ^~~~~~~~~~~
compilation terminated.

This ultimately causes the Rust build to fail:

error: failed to run custom build command for `cyclors v0.1.0 (https://github.com/kydos/cyclors#e20f3df2)`

Caused by:
  process didn't exit successfully: `/home/jschornak/zenoh-plugin-dds/target/release/build/cyclors-7ce0470c2d0478f1/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=ddsc
  cargo:rustc-link-lib=cdds-util

  --- stderr
  wrapper.h:1:10: fatal error: 'cdds/cdds_util.h' file not found
  wrapper.h:1:10: fatal error: 'cdds/cdds_util.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()', /home/jschornak/.cargo/git/checkouts/cyclors-fbee27736ff49651/e20f3df/build.rs:14:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.