posearray.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import roslib; roslib.load_manifest('rviz')
00004 from geometry_msgs.msg import Pose
00005 from geometry_msgs.msg import PoseArray
00006 import rospy
00007 
00008 topic = 'test_poses'
00009 publisher = rospy.Publisher(topic, PoseArray)
00010 
00011 rospy.init_node('posearray')
00012 
00013 while not rospy.is_shutdown():
00014 
00015    ps = PoseArray()
00016    ps.header.frame_id = "/base_link"
00017    ps.header.stamp = rospy.Time.now()
00018    
00019    pose = Pose()
00020    pose.position.x = 2
00021    pose.position.y = 2
00022    pose.position.z = 0
00023    pose.orientation.x = 0
00024    pose.orientation.y = 0
00025    pose.orientation.z = .7071
00026    pose.orientation.w = .7071
00027 
00028    ps.poses.append( pose )
00029 
00030    pose = Pose()
00031    pose.position.x = 1
00032    pose.position.y = 1
00033    pose.position.z = 0
00034    pose.orientation.x = 0
00035    pose.orientation.y = 0
00036    pose.orientation.z = 0
00037    pose.orientation.w = 1
00038 
00039    ps.poses.append( pose )
00040 
00041    publisher.publish( ps )
00042 
00043    rospy.sleep(0.1)


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Mon Jan 6 2014 11:54:32