testheader_publisher.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 from ros import rospy
00003 from ros import rosjava_test_msgs
00004 import rosjava_test_msgs.msg
00005 
00006 def publisher():
00007   rospy.init_node('testheader_publisher')
00008   pub = rospy.Publisher('test_header_in', rosjava_test_msgs.msg.TestHeader)
00009   r = rospy.Rate(10)
00010   m = rosjava_test_msgs.msg.TestHeader()
00011   m.caller_id = rospy.get_name()
00012   m.header.stamp = rospy.get_rostime()
00013   while not rospy.is_shutdown():
00014     pub.publish(m)
00015     r.sleep()
00016 
00017 if __name__ == '__main__':
00018   publisher()


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:49