I want to add latency for testing purposes. I imagine one of the queue types could be configured to induce latency, but I do not have a solution figured out yet. I’d like to be able to introduce round trip delay adjustable from 5ms to 500ms.
Any suggestions? I don’t actually want speed limited, just the time delay introduced.
You need a linux machine for that. The tool to use is netem. To introduce a 500 ms delay for a 1 Gbit/s stream in one direction, you have to store 500 Mbits, i.e. roughly 50 Mbytes, of data in the queue. So on a device with enough RAM, you may be able to achieve this using containers (currently available only on arm, arm64, and x86 CPU architectures in ROS 7).
try limiting traffic below the normal speed you achieve with a simple queue using a queue type with a very big size (take in count memory available on the router)