$search
00001 """autogenerated by genmsg_py from PoseStampedScriptedGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class PoseStampedScriptedGoal(roslib.message.Message): 00009 _md5sum = "a6cf8bca3220fd47abb2c1783444110d" 00010 _type = "pr2_object_manipulation_msgs/PoseStampedScriptedGoal" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00013 geometry_msgs/PoseStamped pose_stamped 00014 00015 00016 ================================================================================ 00017 MSG: geometry_msgs/PoseStamped 00018 # A Pose with reference coordinate frame and timestamp 00019 Header header 00020 Pose pose 00021 00022 ================================================================================ 00023 MSG: std_msgs/Header 00024 # Standard metadata for higher-level stamped data types. 00025 # This is generally used to communicate timestamped data 00026 # in a particular coordinate frame. 00027 # 00028 # sequence ID: consecutively increasing ID 00029 uint32 seq 00030 #Two-integer timestamp that is expressed as: 00031 # * stamp.secs: seconds (stamp_secs) since epoch 00032 # * stamp.nsecs: nanoseconds since stamp_secs 00033 # time-handling sugar is provided by the client library 00034 time stamp 00035 #Frame this data is associated with 00036 # 0: no frame 00037 # 1: global frame 00038 string frame_id 00039 00040 ================================================================================ 00041 MSG: geometry_msgs/Pose 00042 # A representation of pose in free space, composed of postion and orientation. 00043 Point position 00044 Quaternion orientation 00045 00046 ================================================================================ 00047 MSG: geometry_msgs/Point 00048 # This contains the position of a point in free space 00049 float64 x 00050 float64 y 00051 float64 z 00052 00053 ================================================================================ 00054 MSG: geometry_msgs/Quaternion 00055 # This represents an orientation in free space in quaternion form. 00056 00057 float64 x 00058 float64 y 00059 float64 z 00060 float64 w 00061 00062 """ 00063 __slots__ = ['pose_stamped'] 00064 _slot_types = ['geometry_msgs/PoseStamped'] 00065 00066 def __init__(self, *args, **kwds): 00067 """ 00068 Constructor. Any message fields that are implicitly/explicitly 00069 set to None will be assigned a default value. The recommend 00070 use is keyword arguments as this is more robust to future message 00071 changes. You cannot mix in-order arguments and keyword arguments. 00072 00073 The available fields are: 00074 pose_stamped 00075 00076 @param args: complete set of field values, in .msg order 00077 @param kwds: use keyword arguments corresponding to message field names 00078 to set specific fields. 00079 """ 00080 if args or kwds: 00081 super(PoseStampedScriptedGoal, self).__init__(*args, **kwds) 00082 #message fields cannot be None, assign default values for those that are 00083 if self.pose_stamped is None: 00084 self.pose_stamped = geometry_msgs.msg.PoseStamped() 00085 else: 00086 self.pose_stamped = geometry_msgs.msg.PoseStamped() 00087 00088 def _get_types(self): 00089 """ 00090 internal API method 00091 """ 00092 return self._slot_types 00093 00094 def serialize(self, buff): 00095 """ 00096 serialize message into buffer 00097 @param buff: buffer 00098 @type buff: StringIO 00099 """ 00100 try: 00101 _x = self 00102 buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs)) 00103 _x = self.pose_stamped.header.frame_id 00104 length = len(_x) 00105 buff.write(struct.pack('<I%ss'%length, length, _x)) 00106 _x = self 00107 buff.write(_struct_7d.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w)) 00108 except struct.error as se: self._check_types(se) 00109 except TypeError as te: self._check_types(te) 00110 00111 def deserialize(self, str): 00112 """ 00113 unpack serialized message in str into this message instance 00114 @param str: byte array of serialized message 00115 @type str: str 00116 """ 00117 try: 00118 if self.pose_stamped is None: 00119 self.pose_stamped = geometry_msgs.msg.PoseStamped() 00120 end = 0 00121 _x = self 00122 start = end 00123 end += 12 00124 (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00125 start = end 00126 end += 4 00127 (length,) = _struct_I.unpack(str[start:end]) 00128 start = end 00129 end += length 00130 self.pose_stamped.header.frame_id = str[start:end] 00131 _x = self 00132 start = end 00133 end += 56 00134 (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00135 return self 00136 except struct.error as e: 00137 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00138 00139 00140 def serialize_numpy(self, buff, numpy): 00141 """ 00142 serialize message with numpy array types into buffer 00143 @param buff: buffer 00144 @type buff: StringIO 00145 @param numpy: numpy python module 00146 @type numpy module 00147 """ 00148 try: 00149 _x = self 00150 buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs)) 00151 _x = self.pose_stamped.header.frame_id 00152 length = len(_x) 00153 buff.write(struct.pack('<I%ss'%length, length, _x)) 00154 _x = self 00155 buff.write(_struct_7d.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w)) 00156 except struct.error as se: self._check_types(se) 00157 except TypeError as te: self._check_types(te) 00158 00159 def deserialize_numpy(self, str, numpy): 00160 """ 00161 unpack serialized message in str into this message instance using numpy for array types 00162 @param str: byte array of serialized message 00163 @type str: str 00164 @param numpy: numpy python module 00165 @type numpy: module 00166 """ 00167 try: 00168 if self.pose_stamped is None: 00169 self.pose_stamped = geometry_msgs.msg.PoseStamped() 00170 end = 0 00171 _x = self 00172 start = end 00173 end += 12 00174 (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 start = end 00179 end += length 00180 self.pose_stamped.header.frame_id = str[start:end] 00181 _x = self 00182 start = end 00183 end += 56 00184 (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00185 return self 00186 except struct.error as e: 00187 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00188 00189 _struct_I = roslib.message.struct_I 00190 _struct_3I = struct.Struct("<3I") 00191 _struct_7d = struct.Struct("<7d")