Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import random
00019 import rospy
00020 import tf
00021
00022 if __name__ == '__main__':
00023 rospy.init_node("lookat_target_publisher")
00024 br = tf.TransformBroadcaster()
00025 rate = rospy.Rate(10.0)
00026 pose = (random.uniform(0.2, 1.5), random.uniform(-1.0, 1.0), 1.4+random.uniform(-0.5, 0.5))
00027 while not rospy.is_shutdown():
00028 br.sendTransform( pose,
00029 (0.0, 0.0, 0.0, 1.0),
00030 rospy.Time.now(),
00031 "lookat_target",
00032 "base_link")
00033
00034 try:
00035 rate.sleep()
00036 except rospy.ROSTimeMovedBackwardsException, e:
00037 rospy.logwarn("ROSTimeMovedBackwardsException during sleep(). Continue anyway...")
00038 except rospy.exceptions.ROSInterruptException as e:
00039 pass