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 Answer 1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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