#!/usr/bin/env python
# license removed for brevity
import rospy
from std_msgs.msg import String

def callback(data):
        pub = rospy.Publisher('ping', String, queue_size=10)
        rospy.loginfo(data.data)
	rate = rospy.Rate(1) # 10hz
   	rate.sleep()
        pub.publish(data)

def pong():
    rospy.init_node('pong', anonymous=True)
    rospy.Subscriber("pong", String, callback)
    rospy.spin()
if __name__ == '__main__':
    try:
        pong()
    except rospy.ROSInterruptException:
        pass


8cfa8b7309ad8b3900640d7be1f9d4523083aa02
#!/usr/bin/env python
# license removed for brevity
import rospy
from std_msgs.msg import String

def callback(data):
        pub = rospy.Publisher('ping', String, queue_size=10)
        rospy.loginfo(data.data)
	rate = rospy.Rate(1) # 10hz
   	rate.sleep()
        pub.publish(data)

def pong():
    rospy.init_node('pong', anonymous=True)
    rospy.Subscriber("pong", String, callback)
    rospy.spin()
if __name__ == '__main__':
    try:
        pong()
    except rospy.ROSInterruptException:
        pass

