ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You will probably want to have your callbacks as members of a class. When a callback is called, you will then store the data from the callback as data in the class. This way all methods of the class has access to that data. Please notice that you need to guard data from threading issues since the rospy callbacks can happen concurrently.

Walk through the basic tutorials related to rospy if you have not already. It is time well spent.