ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can:
2 | No.2 Revision |
You can:
Update
my_data = None
def callback(data):
# you have to let python know that this is a global otherwise
# it thinks that it's a local variable
global my_data
my_data = data.data
rospy.loginfo(rospy.get_caller_id() + "I heard %s", my_data)