1
$\begingroup$

I want to use information together received from the different ROS subscriber nodes. One way I think of is to make separate callback functions for each subscriber node and then receive messages from corresponding nodes, store info of messages in some global variable and the use other function for manipulation of those variables or there is a better way to do this.

$\endgroup$
1
$\begingroup$

You can have as many callbacks as you want in a single program. Usually I save the values in internal variables within the program. They do not have to be global, that depends on your application.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.