random_point.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import roslib
00004 import rospy
00005 from geometry_msgs.msg import PointStamped
00006 from random import random
00007 def main():
00008     rospy.init_node("random_point")
00009     pub = rospy.Publisher("/random_point", PointStamped)
00010     while not rospy.is_shutdown():
00011         msg = PointStamped()
00012         msg.header.stamp = rospy.Time.now()
00013         msg.point.x = random() * 100;
00014         msg.point.y = random() * 100 + 100;
00015         msg.point.z = random() * 100 + 200;
00016         pub.publish(msg)
00017         rospy.sleep(0.01)
00018 
00019 
00020 if __name__ == "__main__":
00021     main()
00022     


rwt_plot
Author(s): Ryohei Ueda
autogenerated on Wed Aug 26 2015 16:45:43