set_pose.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 import roslib
00004 roslib.load_manifest('room_explore')
00005 import rospy
00006 
00007 from geometry_msgs.msg import PoseWithCovarianceStamped
00008 
00009 # header: 
00010 #   seq: 7
00011 #   stamp: 
00012 #     secs: 0
00013 #     nsecs: 0
00014 #   frame_id: /map
00015 # pose: 
00016 #   pose: 
00017 #     position: 
00018 #       x: -0.324687451124
00019 #       y: 0.183924600482
00020 #       z: 0.0
00021 #     orientation: 
00022 #       x: 0.0
00023 #       y: 0.0
00024 #       z: -0.054315002133
00025 #       w: 0.998523850763
00026 #   covariance: [0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06853891945200942, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
00027 
00028 if __name__ == '__main__':
00029     rospy.init_node( 'pose_setter' )
00030 
00031     pub = rospy.Publisher( '/initialpose', PoseWithCovarianceStamped )
00032     rospy.sleep( 1.0 )
00033 
00034     ps = PoseWithCovarianceStamped()
00035     ps.header.stamp = rospy.Time(0)
00036     ps.header.frame_id = '/base_link'
00037     ps.pose.pose.orientation.w = 1.0
00038     ps.pose.covariance = [0.01, 0.0, 0.0, 0.0, 0.0,
00039                           0.0, 0.0, 0.01, 0.0, 0.0,
00040                           0.0, 0.0, 0.0, 0.0, 0.0,
00041                           0.0, 0.0, 0.0, 0.0, 0.0,
00042                           0.0, 0.005, 0.0, 0.0, 0.0, 0.0, 0.0,
00043                           0.0, 0.0, 0.0, 0.0, 0.0,
00044                           0.0, 0.0, 0.0, 0.0]
00045     print ps
00046     pub.publish( ps )
00047     
00048 
00049     


room_explore
Author(s): Travis Deyle
autogenerated on Wed Nov 27 2013 11:48:25