Created
March 22, 2018 00:16
-
-
Save chaonan99/717f96d58aaad169388332cfafe60725 to your computer and use it in GitHub Desktop.
Revisions
-
chaonan99 created this gist
Mar 22, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/usr/bin/python2 import rospy from std_msgs.msg import String pub = rospy.Publisher('addup_number', String, queue_size=10) rospy.init_node('repub_test_pub', anonymous=True) r = rospy.Rate(1) i = 0 while not rospy.is_shutdown(): pub.publish(str(i)) rospy.loginfo("Publish {}".format(i)) i += 1 r.sleep()