throttle

throttle is a ROS node that subscribes to a topic and republishes incoming data to another topic, either at a maximum bandwidth or maximum message rate. It's mainly useful for limiting bandwidth usage, e.g., over a wireless link. It can work with any message type.

throttle is part of topic_tools.

Parameters

~wall_clock (bool, default: False)
  • If True, then perform all rate measurements against wall clock time, regardless of whether simulation / log time is in effect. (New in ros_comm 1.5.3)
~unreliable (bool, default: False)
  • If True, prefer to negotiate an unreliable connection for the inbound data. (New in ros_comm 1.5.3)
~lazy (bool, default: False)
  • If True, don't subscribe to input topic unless there is at least one subscriber on the output topic. (New in ros_comm 1.5.3)

throttle message (rate)

throttle messages <intopic> <msgs_per_sec> [outtopic]

  • Throttle messages on <intopic> to a particular rate.

    • intopic: Incoming topic to subscribe to

    • msgs_per_sec: maximum messages per second to let through.

    • outtopic: Outgoing topic to publish on (default: intopic_throttle)

    e.g. throttle bandwidth-hogging laser scans (base_scan) to 1Hz:

    rosrun topic_tools throttle messages base_scan 1.0

throttle bytes (bandwidth)

throttle bytes <intopic> <bytes_per_sec> <window> [outtopic]

  • Throttle message on <intopic> to a maximum bandwidth (bytes_per_sec).

    • intopic: Incoming topic to subscribe to

    • bytes_per_sec: Maximum bytes per second to let through

    • window: Window (in seconds) over which to sample

    • outtopic: Outgoing topic to publish on (default: intopic_throttle)

    e.g., throttle bandwidth-hogging laser scans (base_scan) to 1KBps:

    throttle bytes base_scan 1024 1.0

Wiki: topic_tools/throttle (last edited 2019-06-11 21:59:31 by IsaacSaito)