diff --git a/rospy_tutorials/001_talker_listener/listener.py b/rospy_tutorials/001_talker_listener/listener.py index 7cd8b7a7..ed27e1e5 100755 --- a/rospy_tutorials/001_talker_listener/listener.py +++ b/rospy_tutorials/001_talker_listener/listener.py @@ -40,18 +40,18 @@ from std_msgs.msg import String def callback(data): - rospy.loginfo(rospy.get_caller_id() + "I heard %s", data.data) + rospy.loginfo(rospy.get_caller_id() + 'I heard %s', data.data) def listener(): # In ROS, nodes are uniquely named. If two nodes with the same - # node are launched, the previous one is kicked off. The + # name are launched, the previous one is kicked off. The # anonymous=True flag means that rospy will choose a unique - # name for our 'talker' node so that multiple talkers can + # name for our 'listener' node so that multiple listeners can # run simultaneously. rospy.init_node('listener', anonymous=True) - rospy.Subscriber("chatter", String, callback) + rospy.Subscriber('chatter', String, callback) # spin() simply keeps python from exiting until this node is stopped rospy.spin()