roscon2024_workshop

Exercise 7 - Downsampling

By configuration the Zenoh router can perform downsampling (i.e. reducing the frequency of messages) for some topics published via a specified interface.

Configuration

downsampling

Follow up with the same partner than the previous exercise.

In container A add this downsampling configuration at the end of your zenoh_confs/ROUTER_CONFIG.json5 file (just before the last }):

downsampling: [
  {
    // Downsampling publications in egress on WiFi interface
    interfaces: ["<YOUR_WIFI_INTERFACE>"],
    flow: "egress",
    rules: [
      // 0.5Hz for the Zenoh key expression used for the "/chatter_public" topic
      {
        key_expr: "*/chatter_public/**",
        freq: 0.5
      },
    ],
  },
],

Running the Test

Run the same commands than for previous exercise:

And see the result in the listener on /chatter_public.