Sync consumer nodes rate of the same topic
Hi ROS community,
I'm working with ROS2-foxy to build a small example, where:
- two detectors with different latency are fed with the same image source(topic)
- a visualization node merges different detected result.
My first idea was:
- one node for each detector, spining as fast as possible
- the visualization node filters detections so that ONLY results of the same image source are shown together.
However, the throughput of the detectors can be much lower than the incoming rate of input; for example A
process 1,3,5,7,9... image, and B
process 2,6,10... with a lower throughput, making visualization FPS even worse than the slowest detector (because ONLY detections from the same image are shown).
Is there a ROS-style way to sync detections, making the faster waiting for the slower so that they always consume the same image therefore publishing in the same pace?