I want to make a subscriber subscribe to two topics synchronously. I am following through the tutorial implementing a publisher and a subscriber in ROS2 C++ (in Linux Ubuntu). The tutorial only shows how to let a subscriber subscribe 1 topic, but how about two topics at the same time?
For example, how do I modify the code from the tutorial such that the subscriber takes in an integer from a topic and another integer from another topic (at the same time) and add those two values as an output.
Thank you.