ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You have two choices.
(Easiest) Either make a global variable that will hold the contents of your message, so that every function can have access to it.
or
(More formal) Create a class and pass the necessary variables to your desired callbacks.
Good luck!