Go to the documentation of this file.00001
00002
00003
00004 import roslib; roslib.load_manifest('opencv_ros_bridge_tutorial')
00005 import rospy;
00006 import math;
00007 from geometry_msgs.msg import PointStamped
00008
00009 pub = rospy.Publisher('/image_painted/screenpoint', PointStamped)
00010 rospy.init_node('publish_screenpoint')
00011 msg = PointStamped()
00012 i = 0;
00013 while not rospy.is_shutdown():
00014 msg.header.stamp = rospy.Time.now()
00015 msg.point.x = 320 + 180*math.sin(i)
00016 msg.point.y = 240 + 180*math.cos(i)
00017 i += 0.1
00018 print msg;
00019 pub.publish(msg)
00020 rospy.sleep(0.1)
00021
00022