00001 """autogenerated by genpy from rfid_behaviors/RecorderReads.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import geometry_msgs.msg
00008 import hrl_rfid.msg
00009 import std_msgs.msg
00010
00011 class RecorderReads(genpy.Message):
00012 _md5sum = "49cfc9e168a5757e7fa211fcb2b0d5ac"
00013 _type = "rfid_behaviors/RecorderReads"
00014 _has_header = False
00015 _full_text = """hrl_rfid/RFIDread read
00016 geometry_msgs/PoseStamped ps_ant_map
00017 geometry_msgs/PoseStamped ps_base_map
00018 ================================================================================
00019 MSG: hrl_rfid/RFIDread
00020 Header header
00021 string antenna_name
00022 string tagID
00023 int32 rssi
00024
00025 ================================================================================
00026 MSG: std_msgs/Header
00027 # Standard metadata for higher-level stamped data types.
00028 # This is generally used to communicate timestamped data
00029 # in a particular coordinate frame.
00030 #
00031 # sequence ID: consecutively increasing ID
00032 uint32 seq
00033 #Two-integer timestamp that is expressed as:
00034 # * stamp.secs: seconds (stamp_secs) since epoch
00035 # * stamp.nsecs: nanoseconds since stamp_secs
00036 # time-handling sugar is provided by the client library
00037 time stamp
00038 #Frame this data is associated with
00039 # 0: no frame
00040 # 1: global frame
00041 string frame_id
00042
00043 ================================================================================
00044 MSG: geometry_msgs/PoseStamped
00045 # A Pose with reference coordinate frame and timestamp
00046 Header header
00047 Pose pose
00048
00049 ================================================================================
00050 MSG: geometry_msgs/Pose
00051 # A representation of pose in free space, composed of postion and orientation.
00052 Point position
00053 Quaternion orientation
00054
00055 ================================================================================
00056 MSG: geometry_msgs/Point
00057 # This contains the position of a point in free space
00058 float64 x
00059 float64 y
00060 float64 z
00061
00062 ================================================================================
00063 MSG: geometry_msgs/Quaternion
00064 # This represents an orientation in free space in quaternion form.
00065
00066 float64 x
00067 float64 y
00068 float64 z
00069 float64 w
00070
00071 """
00072 __slots__ = ['read','ps_ant_map','ps_base_map']
00073 _slot_types = ['hrl_rfid/RFIDread','geometry_msgs/PoseStamped','geometry_msgs/PoseStamped']
00074
00075 def __init__(self, *args, **kwds):
00076 """
00077 Constructor. Any message fields that are implicitly/explicitly
00078 set to None will be assigned a default value. The recommend
00079 use is keyword arguments as this is more robust to future message
00080 changes. You cannot mix in-order arguments and keyword arguments.
00081
00082 The available fields are:
00083 read,ps_ant_map,ps_base_map
00084
00085 :param args: complete set of field values, in .msg order
00086 :param kwds: use keyword arguments corresponding to message field names
00087 to set specific fields.
00088 """
00089 if args or kwds:
00090 super(RecorderReads, self).__init__(*args, **kwds)
00091
00092 if self.read is None:
00093 self.read = hrl_rfid.msg.RFIDread()
00094 if self.ps_ant_map is None:
00095 self.ps_ant_map = geometry_msgs.msg.PoseStamped()
00096 if self.ps_base_map is None:
00097 self.ps_base_map = geometry_msgs.msg.PoseStamped()
00098 else:
00099 self.read = hrl_rfid.msg.RFIDread()
00100 self.ps_ant_map = geometry_msgs.msg.PoseStamped()
00101 self.ps_base_map = geometry_msgs.msg.PoseStamped()
00102
00103 def _get_types(self):
00104 """
00105 internal API method
00106 """
00107 return self._slot_types
00108
00109 def serialize(self, buff):
00110 """
00111 serialize message into buffer
00112 :param buff: buffer, ``StringIO``
00113 """
00114 try:
00115 _x = self
00116 buff.write(_struct_3I.pack(_x.read.header.seq, _x.read.header.stamp.secs, _x.read.header.stamp.nsecs))
00117 _x = self.read.header.frame_id
00118 length = len(_x)
00119 if python3 or type(_x) == unicode:
00120 _x = _x.encode('utf-8')
00121 length = len(_x)
00122 buff.write(struct.pack('<I%ss'%length, length, _x))
00123 _x = self.read.antenna_name
00124 length = len(_x)
00125 if python3 or type(_x) == unicode:
00126 _x = _x.encode('utf-8')
00127 length = len(_x)
00128 buff.write(struct.pack('<I%ss'%length, length, _x))
00129 _x = self.read.tagID
00130 length = len(_x)
00131 if python3 or type(_x) == unicode:
00132 _x = _x.encode('utf-8')
00133 length = len(_x)
00134 buff.write(struct.pack('<I%ss'%length, length, _x))
00135 _x = self
00136 buff.write(_struct_i3I.pack(_x.read.rssi, _x.ps_ant_map.header.seq, _x.ps_ant_map.header.stamp.secs, _x.ps_ant_map.header.stamp.nsecs))
00137 _x = self.ps_ant_map.header.frame_id
00138 length = len(_x)
00139 if python3 or type(_x) == unicode:
00140 _x = _x.encode('utf-8')
00141 length = len(_x)
00142 buff.write(struct.pack('<I%ss'%length, length, _x))
00143 _x = self
00144 buff.write(_struct_7d3I.pack(_x.ps_ant_map.pose.position.x, _x.ps_ant_map.pose.position.y, _x.ps_ant_map.pose.position.z, _x.ps_ant_map.pose.orientation.x, _x.ps_ant_map.pose.orientation.y, _x.ps_ant_map.pose.orientation.z, _x.ps_ant_map.pose.orientation.w, _x.ps_base_map.header.seq, _x.ps_base_map.header.stamp.secs, _x.ps_base_map.header.stamp.nsecs))
00145 _x = self.ps_base_map.header.frame_id
00146 length = len(_x)
00147 if python3 or type(_x) == unicode:
00148 _x = _x.encode('utf-8')
00149 length = len(_x)
00150 buff.write(struct.pack('<I%ss'%length, length, _x))
00151 _x = self
00152 buff.write(_struct_7d.pack(_x.ps_base_map.pose.position.x, _x.ps_base_map.pose.position.y, _x.ps_base_map.pose.position.z, _x.ps_base_map.pose.orientation.x, _x.ps_base_map.pose.orientation.y, _x.ps_base_map.pose.orientation.z, _x.ps_base_map.pose.orientation.w))
00153 except struct.error as se: self._check_types(se)
00154 except TypeError as te: self._check_types(te)
00155
00156 def deserialize(self, str):
00157 """
00158 unpack serialized message in str into this message instance
00159 :param str: byte array of serialized message, ``str``
00160 """
00161 try:
00162 if self.read is None:
00163 self.read = hrl_rfid.msg.RFIDread()
00164 if self.ps_ant_map is None:
00165 self.ps_ant_map = geometry_msgs.msg.PoseStamped()
00166 if self.ps_base_map is None:
00167 self.ps_base_map = geometry_msgs.msg.PoseStamped()
00168 end = 0
00169 _x = self
00170 start = end
00171 end += 12
00172 (_x.read.header.seq, _x.read.header.stamp.secs, _x.read.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00173 start = end
00174 end += 4
00175 (length,) = _struct_I.unpack(str[start:end])
00176 start = end
00177 end += length
00178 if python3:
00179 self.read.header.frame_id = str[start:end].decode('utf-8')
00180 else:
00181 self.read.header.frame_id = str[start:end]
00182 start = end
00183 end += 4
00184 (length,) = _struct_I.unpack(str[start:end])
00185 start = end
00186 end += length
00187 if python3:
00188 self.read.antenna_name = str[start:end].decode('utf-8')
00189 else:
00190 self.read.antenna_name = str[start:end]
00191 start = end
00192 end += 4
00193 (length,) = _struct_I.unpack(str[start:end])
00194 start = end
00195 end += length
00196 if python3:
00197 self.read.tagID = str[start:end].decode('utf-8')
00198 else:
00199 self.read.tagID = str[start:end]
00200 _x = self
00201 start = end
00202 end += 16
00203 (_x.read.rssi, _x.ps_ant_map.header.seq, _x.ps_ant_map.header.stamp.secs, _x.ps_ant_map.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00204 start = end
00205 end += 4
00206 (length,) = _struct_I.unpack(str[start:end])
00207 start = end
00208 end += length
00209 if python3:
00210 self.ps_ant_map.header.frame_id = str[start:end].decode('utf-8')
00211 else:
00212 self.ps_ant_map.header.frame_id = str[start:end]
00213 _x = self
00214 start = end
00215 end += 68
00216 (_x.ps_ant_map.pose.position.x, _x.ps_ant_map.pose.position.y, _x.ps_ant_map.pose.position.z, _x.ps_ant_map.pose.orientation.x, _x.ps_ant_map.pose.orientation.y, _x.ps_ant_map.pose.orientation.z, _x.ps_ant_map.pose.orientation.w, _x.ps_base_map.header.seq, _x.ps_base_map.header.stamp.secs, _x.ps_base_map.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00217 start = end
00218 end += 4
00219 (length,) = _struct_I.unpack(str[start:end])
00220 start = end
00221 end += length
00222 if python3:
00223 self.ps_base_map.header.frame_id = str[start:end].decode('utf-8')
00224 else:
00225 self.ps_base_map.header.frame_id = str[start:end]
00226 _x = self
00227 start = end
00228 end += 56
00229 (_x.ps_base_map.pose.position.x, _x.ps_base_map.pose.position.y, _x.ps_base_map.pose.position.z, _x.ps_base_map.pose.orientation.x, _x.ps_base_map.pose.orientation.y, _x.ps_base_map.pose.orientation.z, _x.ps_base_map.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00230 return self
00231 except struct.error as e:
00232 raise genpy.DeserializationError(e)
00233
00234
00235 def serialize_numpy(self, buff, numpy):
00236 """
00237 serialize message with numpy array types into buffer
00238 :param buff: buffer, ``StringIO``
00239 :param numpy: numpy python module
00240 """
00241 try:
00242 _x = self
00243 buff.write(_struct_3I.pack(_x.read.header.seq, _x.read.header.stamp.secs, _x.read.header.stamp.nsecs))
00244 _x = self.read.header.frame_id
00245 length = len(_x)
00246 if python3 or type(_x) == unicode:
00247 _x = _x.encode('utf-8')
00248 length = len(_x)
00249 buff.write(struct.pack('<I%ss'%length, length, _x))
00250 _x = self.read.antenna_name
00251 length = len(_x)
00252 if python3 or type(_x) == unicode:
00253 _x = _x.encode('utf-8')
00254 length = len(_x)
00255 buff.write(struct.pack('<I%ss'%length, length, _x))
00256 _x = self.read.tagID
00257 length = len(_x)
00258 if python3 or type(_x) == unicode:
00259 _x = _x.encode('utf-8')
00260 length = len(_x)
00261 buff.write(struct.pack('<I%ss'%length, length, _x))
00262 _x = self
00263 buff.write(_struct_i3I.pack(_x.read.rssi, _x.ps_ant_map.header.seq, _x.ps_ant_map.header.stamp.secs, _x.ps_ant_map.header.stamp.nsecs))
00264 _x = self.ps_ant_map.header.frame_id
00265 length = len(_x)
00266 if python3 or type(_x) == unicode:
00267 _x = _x.encode('utf-8')
00268 length = len(_x)
00269 buff.write(struct.pack('<I%ss'%length, length, _x))
00270 _x = self
00271 buff.write(_struct_7d3I.pack(_x.ps_ant_map.pose.position.x, _x.ps_ant_map.pose.position.y, _x.ps_ant_map.pose.position.z, _x.ps_ant_map.pose.orientation.x, _x.ps_ant_map.pose.orientation.y, _x.ps_ant_map.pose.orientation.z, _x.ps_ant_map.pose.orientation.w, _x.ps_base_map.header.seq, _x.ps_base_map.header.stamp.secs, _x.ps_base_map.header.stamp.nsecs))
00272 _x = self.ps_base_map.header.frame_id
00273 length = len(_x)
00274 if python3 or type(_x) == unicode:
00275 _x = _x.encode('utf-8')
00276 length = len(_x)
00277 buff.write(struct.pack('<I%ss'%length, length, _x))
00278 _x = self
00279 buff.write(_struct_7d.pack(_x.ps_base_map.pose.position.x, _x.ps_base_map.pose.position.y, _x.ps_base_map.pose.position.z, _x.ps_base_map.pose.orientation.x, _x.ps_base_map.pose.orientation.y, _x.ps_base_map.pose.orientation.z, _x.ps_base_map.pose.orientation.w))
00280 except struct.error as se: self._check_types(se)
00281 except TypeError as te: self._check_types(te)
00282
00283 def deserialize_numpy(self, str, numpy):
00284 """
00285 unpack serialized message in str into this message instance using numpy for array types
00286 :param str: byte array of serialized message, ``str``
00287 :param numpy: numpy python module
00288 """
00289 try:
00290 if self.read is None:
00291 self.read = hrl_rfid.msg.RFIDread()
00292 if self.ps_ant_map is None:
00293 self.ps_ant_map = geometry_msgs.msg.PoseStamped()
00294 if self.ps_base_map is None:
00295 self.ps_base_map = geometry_msgs.msg.PoseStamped()
00296 end = 0
00297 _x = self
00298 start = end
00299 end += 12
00300 (_x.read.header.seq, _x.read.header.stamp.secs, _x.read.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00301 start = end
00302 end += 4
00303 (length,) = _struct_I.unpack(str[start:end])
00304 start = end
00305 end += length
00306 if python3:
00307 self.read.header.frame_id = str[start:end].decode('utf-8')
00308 else:
00309 self.read.header.frame_id = str[start:end]
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 if python3:
00316 self.read.antenna_name = str[start:end].decode('utf-8')
00317 else:
00318 self.read.antenna_name = str[start:end]
00319 start = end
00320 end += 4
00321 (length,) = _struct_I.unpack(str[start:end])
00322 start = end
00323 end += length
00324 if python3:
00325 self.read.tagID = str[start:end].decode('utf-8')
00326 else:
00327 self.read.tagID = str[start:end]
00328 _x = self
00329 start = end
00330 end += 16
00331 (_x.read.rssi, _x.ps_ant_map.header.seq, _x.ps_ant_map.header.stamp.secs, _x.ps_ant_map.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00332 start = end
00333 end += 4
00334 (length,) = _struct_I.unpack(str[start:end])
00335 start = end
00336 end += length
00337 if python3:
00338 self.ps_ant_map.header.frame_id = str[start:end].decode('utf-8')
00339 else:
00340 self.ps_ant_map.header.frame_id = str[start:end]
00341 _x = self
00342 start = end
00343 end += 68
00344 (_x.ps_ant_map.pose.position.x, _x.ps_ant_map.pose.position.y, _x.ps_ant_map.pose.position.z, _x.ps_ant_map.pose.orientation.x, _x.ps_ant_map.pose.orientation.y, _x.ps_ant_map.pose.orientation.z, _x.ps_ant_map.pose.orientation.w, _x.ps_base_map.header.seq, _x.ps_base_map.header.stamp.secs, _x.ps_base_map.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00345 start = end
00346 end += 4
00347 (length,) = _struct_I.unpack(str[start:end])
00348 start = end
00349 end += length
00350 if python3:
00351 self.ps_base_map.header.frame_id = str[start:end].decode('utf-8')
00352 else:
00353 self.ps_base_map.header.frame_id = str[start:end]
00354 _x = self
00355 start = end
00356 end += 56
00357 (_x.ps_base_map.pose.position.x, _x.ps_base_map.pose.position.y, _x.ps_base_map.pose.position.z, _x.ps_base_map.pose.orientation.x, _x.ps_base_map.pose.orientation.y, _x.ps_base_map.pose.orientation.z, _x.ps_base_map.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00358 return self
00359 except struct.error as e:
00360 raise genpy.DeserializationError(e)
00361
00362 _struct_I = genpy.struct_I
00363 _struct_3I = struct.Struct("<3I")
00364 _struct_7d = struct.Struct("<7d")
00365 _struct_i3I = struct.Struct("<i3I")
00366 _struct_7d3I = struct.Struct("<7d3I")