ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
206 stars 36 forks source link

rmw_zenoh and ROS 2 daemon #242

Open Yadunund opened 3 months ago

Yadunund commented 3 months ago

With ROS 2, there is a long-running daemon in the background that stores information about the ROS graph to provide faster responses to queries, e.g. the list of node names, without having to discovery every other peer in the network. The daemon is automatically started when the relevant command-line tools are used for the first time.

With rmw_zenoh, we expect users to run the zenohd router which largely does the same above. However, there are issues with the zenohd router and daemon coexisting (mostly related to graph cache queries).

For example, if a user runs ros2 topic list without the zenohd router running, the process will check indefinitely for a router until one is started. Once the command exists, and if one kills the router, running ros2 topic list again will instantly return the topics from the daemon's cache. However in such scenarios we would like the cli tool to look for a router first before returning results from a cache.

Starting a discussion on how to manage such scenarios.

  1. systemd service: An extention to the discussion in https://github.com/ros2/rmw_zenoh/issues/231, the service could also kill/restart the daemon as appropriate.
  2. Disable daemon:
    • Add mechanisms in rmw API to selectively enable/disable certain "features" including the daemon.
    • Update rcl, rclpy and ros2cli such that these features are checked and only start the daemon if configured to do so.
clalancette commented 3 months ago

We had a bit of a discussion about this at the Waffle meeting today. Some notes: