00001 #!/usr/bin/env python 00002 import roslib; roslib.load_manifest('relay_node') 00003 import rospy 00004 from demo_msgs.msg import * 00005 00006 def callback(data): 00007 pub.publish(data) 00008 00009 if __name__ == '__main__': 00010 rospy.init_node('relay') 00011 pub = rospy.Publisher('out', Goto) 00012 sub = rospy.Subscriber('in', Goto, callback) 00013 rospy.spin()