# How to setup environment to test latency of publisher and subscriber scenarios

**URL:** <https://discourse.openrobotics.org/t/how-to-setup-environment-to-test-latency-of-publisher-and-subscriber-scenarios/4167>\
**Category:** ROS General\
**Created:** [March 13, 2018, 9:51am UTC](https://discourse.openrobotics.org/t/how-to-setup-environment-to-test-latency-of-publisher-and-subscriber-scenarios/4167 "2018-03-13T09:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akash1207](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/akash1207/32/1677_2.png) [@akash1207](https://discourse.openrobotics.org/u/akash1207)\
**Post date:** [March 13, 2018, 9:51am UTC](https://discourse.openrobotics.org/t/how-to-setup-environment-to-test-latency-of-publisher-and-subscriber-scenarios/4167/1 "2018-03-13T09:51:27Z")

</div>

I want to setup an environment where I can check latency of different publisher and subscriber scenarios in different architectures.How can I do it??

---

<div class="post-metadata">

**Author:** ![ruffsl](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ruffsl/32/83_2.png) [@ruffsl](https://discourse.openrobotics.org/u/ruffsl)\
**Post date:** [March 13, 2018, 5:42pm UTC](https://discourse.openrobotics.org/t/how-to-setup-environment-to-test-latency-of-publisher-and-subscriber-scenarios/4167/2 "2018-03-13T17:42:38Z")

</div>

Here is a recent 2018 paper from Robotics and Autonomous Systems that touches on this topic:

> **[Quantitative analysis of security in distributed robotic frameworks](https://www.sciencedirect.com/science/article/abs/pii/S0921889017303044)**
>
> Robotic software frameworks simplify the development of robotic applications. The more powerful ones help to build such applications as a distributed …

> In order to reproduce the network scenarios described before (localhost, Gigabit ethernet and WiFi networks), we take advantage from Linux NetEm [46]. This module allows the simulation of network delays. Moreover, we are able to simulate bandwidth and packet loss.

[46] S. Hemminger, Network Emulation with NetEm, in: Linux Conf Au, 2005. URL [http://developer.osdl.org/shemminger/netem/LCA2005\_paper.pdf](http://developer.osdl.org/shemminger/netem/LCA2005_paper.pdf).

Looks like they’ve also released there code for the experiments here:

[https://gitlab.aulas.gsyc.urjc.es/fmartin/JdeRobotROS](https://gitlab.aulas.gsyc.urjc.es/fmartin/JdeRobotROS)
