Subscribing 2 topics of different types in a callback function
I would like to ask, How do I subscribe 2 topics with different message types (say one is LaserScan and another is Pose) using a callback function? How to realize this in a better way? Could someone point me to some references or any code snippet will be helpful.
EDIT: If one wants to get what I'm actually aiming at is like this, you can think I want to get 2 values from those 2 topics and do a addition of those 2 values there, and can further publish it the new result of the addition.