Subscribe to two image_raws with one function
Hello community, I want to capture pictures from two webcams simultaneously and process them with opencv. I tried to get this work with two image_subscribers, that have the same callback-function. I tried that by editing the code from the cvbridge-tutorial. The result of my editing was, that i got two windows that show both the same picture, switching between the two image raws. So here is my question now:
How do I have to define my subscribers or my callback function to get the two raws seperately in one function to process them both simultaneously?
Solution: http://wiki.ros.org/message_filters. There you can find an example cpp-code for a policy-based synchronizer function. I've used this example to get my Node working.