test_node.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 from std_msgs.msg import String
5 
6 
7 rospy.init_node('test_node')
8 
9 pub = rospy.Publisher('~output', String, queue_size=10)
10 
11 def callback(data):
12  print "Test node got", repr(data)
13  pub.publish(data.data)
14 
15 sub = rospy.Subscriber('~input', String, callback)
16 
17 rospy.spin()
def callback(data)
Definition: test_node.py:11


rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Jul 10 2019 03:10:12