00001 """autogenerated by genpy from iri_bow_object_detector/GeoVwDetectionRequest.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 std_msgs.msg
00008 import iri_perception_msgs.msg
00009 import sensor_msgs.msg
00010
00011 class GeoVwDetectionRequest(genpy.Message):
00012 _md5sum = "7aed8ecdd54a142914f1d3b1b41af89d"
00013 _type = "iri_bow_object_detector/GeoVwDetectionRequest"
00014 _has_header = False
00015 _full_text = """iri_perception_msgs/GeoVwSet[] geo_vw_sets
00016 sensor_msgs/Image image
00017 sensor_msgs/Image mask
00018
00019 ================================================================================
00020 MSG: iri_perception_msgs/GeoVwSet
00021 iri_perception_msgs/GeoVw[] geo_vws
00022
00023 ================================================================================
00024 MSG: iri_perception_msgs/GeoVw
00025 uint32 x
00026 uint32 y
00027 uint32 word
00028 ================================================================================
00029 MSG: sensor_msgs/Image
00030 # This message contains an uncompressed image
00031 # (0, 0) is at top-left corner of image
00032 #
00033
00034 Header header # Header timestamp should be acquisition time of image
00035 # Header frame_id should be optical frame of camera
00036 # origin of frame should be optical center of cameara
00037 # +x should point to the right in the image
00038 # +y should point down in the image
00039 # +z should point into to plane of the image
00040 # If the frame_id here and the frame_id of the CameraInfo
00041 # message associated with the image conflict
00042 # the behavior is undefined
00043
00044 uint32 height # image height, that is, number of rows
00045 uint32 width # image width, that is, number of columns
00046
00047 # The legal values for encoding are in file src/image_encodings.cpp
00048 # If you want to standardize a new string format, join
00049 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00050
00051 string encoding # Encoding of pixels -- channel meaning, ordering, size
00052 # taken from the list of strings in src/image_encodings.cpp
00053
00054 uint8 is_bigendian # is this data bigendian?
00055 uint32 step # Full row length in bytes
00056 uint8[] data # actual matrix data, size is (step * rows)
00057
00058 ================================================================================
00059 MSG: std_msgs/Header
00060 # Standard metadata for higher-level stamped data types.
00061 # This is generally used to communicate timestamped data
00062 # in a particular coordinate frame.
00063 #
00064 # sequence ID: consecutively increasing ID
00065 uint32 seq
00066 #Two-integer timestamp that is expressed as:
00067 # * stamp.secs: seconds (stamp_secs) since epoch
00068 # * stamp.nsecs: nanoseconds since stamp_secs
00069 # time-handling sugar is provided by the client library
00070 time stamp
00071 #Frame this data is associated with
00072 # 0: no frame
00073 # 1: global frame
00074 string frame_id
00075
00076 """
00077 __slots__ = ['geo_vw_sets','image','mask']
00078 _slot_types = ['iri_perception_msgs/GeoVwSet[]','sensor_msgs/Image','sensor_msgs/Image']
00079
00080 def __init__(self, *args, **kwds):
00081 """
00082 Constructor. Any message fields that are implicitly/explicitly
00083 set to None will be assigned a default value. The recommend
00084 use is keyword arguments as this is more robust to future message
00085 changes. You cannot mix in-order arguments and keyword arguments.
00086
00087 The available fields are:
00088 geo_vw_sets,image,mask
00089
00090 :param args: complete set of field values, in .msg order
00091 :param kwds: use keyword arguments corresponding to message field names
00092 to set specific fields.
00093 """
00094 if args or kwds:
00095 super(GeoVwDetectionRequest, self).__init__(*args, **kwds)
00096
00097 if self.geo_vw_sets is None:
00098 self.geo_vw_sets = []
00099 if self.image is None:
00100 self.image = sensor_msgs.msg.Image()
00101 if self.mask is None:
00102 self.mask = sensor_msgs.msg.Image()
00103 else:
00104 self.geo_vw_sets = []
00105 self.image = sensor_msgs.msg.Image()
00106 self.mask = sensor_msgs.msg.Image()
00107
00108 def _get_types(self):
00109 """
00110 internal API method
00111 """
00112 return self._slot_types
00113
00114 def serialize(self, buff):
00115 """
00116 serialize message into buffer
00117 :param buff: buffer, ``StringIO``
00118 """
00119 try:
00120 length = len(self.geo_vw_sets)
00121 buff.write(_struct_I.pack(length))
00122 for val1 in self.geo_vw_sets:
00123 length = len(val1.geo_vws)
00124 buff.write(_struct_I.pack(length))
00125 for val2 in val1.geo_vws:
00126 _x = val2
00127 buff.write(_struct_3I.pack(_x.x, _x.y, _x.word))
00128 _x = self
00129 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00130 _x = self.image.header.frame_id
00131 length = len(_x)
00132 if python3 or type(_x) == unicode:
00133 _x = _x.encode('utf-8')
00134 length = len(_x)
00135 buff.write(struct.pack('<I%ss'%length, length, _x))
00136 _x = self
00137 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00138 _x = self.image.encoding
00139 length = len(_x)
00140 if python3 or type(_x) == unicode:
00141 _x = _x.encode('utf-8')
00142 length = len(_x)
00143 buff.write(struct.pack('<I%ss'%length, length, _x))
00144 _x = self
00145 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00146 _x = self.image.data
00147 length = len(_x)
00148
00149 if type(_x) in [list, tuple]:
00150 buff.write(struct.pack('<I%sB'%length, length, *_x))
00151 else:
00152 buff.write(struct.pack('<I%ss'%length, length, _x))
00153 _x = self
00154 buff.write(_struct_3I.pack(_x.mask.header.seq, _x.mask.header.stamp.secs, _x.mask.header.stamp.nsecs))
00155 _x = self.mask.header.frame_id
00156 length = len(_x)
00157 if python3 or type(_x) == unicode:
00158 _x = _x.encode('utf-8')
00159 length = len(_x)
00160 buff.write(struct.pack('<I%ss'%length, length, _x))
00161 _x = self
00162 buff.write(_struct_2I.pack(_x.mask.height, _x.mask.width))
00163 _x = self.mask.encoding
00164 length = len(_x)
00165 if python3 or type(_x) == unicode:
00166 _x = _x.encode('utf-8')
00167 length = len(_x)
00168 buff.write(struct.pack('<I%ss'%length, length, _x))
00169 _x = self
00170 buff.write(_struct_BI.pack(_x.mask.is_bigendian, _x.mask.step))
00171 _x = self.mask.data
00172 length = len(_x)
00173
00174 if type(_x) in [list, tuple]:
00175 buff.write(struct.pack('<I%sB'%length, length, *_x))
00176 else:
00177 buff.write(struct.pack('<I%ss'%length, length, _x))
00178 except struct.error as se: self._check_types(se)
00179 except TypeError as te: self._check_types(te)
00180
00181 def deserialize(self, str):
00182 """
00183 unpack serialized message in str into this message instance
00184 :param str: byte array of serialized message, ``str``
00185 """
00186 try:
00187 if self.geo_vw_sets is None:
00188 self.geo_vw_sets = None
00189 if self.image is None:
00190 self.image = sensor_msgs.msg.Image()
00191 if self.mask is None:
00192 self.mask = sensor_msgs.msg.Image()
00193 end = 0
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 self.geo_vw_sets = []
00198 for i in range(0, length):
00199 val1 = iri_perception_msgs.msg.GeoVwSet()
00200 start = end
00201 end += 4
00202 (length,) = _struct_I.unpack(str[start:end])
00203 val1.geo_vws = []
00204 for i in range(0, length):
00205 val2 = iri_perception_msgs.msg.GeoVw()
00206 _x = val2
00207 start = end
00208 end += 12
00209 (_x.x, _x.y, _x.word,) = _struct_3I.unpack(str[start:end])
00210 val1.geo_vws.append(val2)
00211 self.geo_vw_sets.append(val1)
00212 _x = self
00213 start = end
00214 end += 12
00215 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00216 start = end
00217 end += 4
00218 (length,) = _struct_I.unpack(str[start:end])
00219 start = end
00220 end += length
00221 if python3:
00222 self.image.header.frame_id = str[start:end].decode('utf-8')
00223 else:
00224 self.image.header.frame_id = str[start:end]
00225 _x = self
00226 start = end
00227 end += 8
00228 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 if python3:
00235 self.image.encoding = str[start:end].decode('utf-8')
00236 else:
00237 self.image.encoding = str[start:end]
00238 _x = self
00239 start = end
00240 end += 5
00241 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00242 start = end
00243 end += 4
00244 (length,) = _struct_I.unpack(str[start:end])
00245 start = end
00246 end += length
00247 if python3:
00248 self.image.data = str[start:end].decode('utf-8')
00249 else:
00250 self.image.data = str[start:end]
00251 _x = self
00252 start = end
00253 end += 12
00254 (_x.mask.header.seq, _x.mask.header.stamp.secs, _x.mask.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00255 start = end
00256 end += 4
00257 (length,) = _struct_I.unpack(str[start:end])
00258 start = end
00259 end += length
00260 if python3:
00261 self.mask.header.frame_id = str[start:end].decode('utf-8')
00262 else:
00263 self.mask.header.frame_id = str[start:end]
00264 _x = self
00265 start = end
00266 end += 8
00267 (_x.mask.height, _x.mask.width,) = _struct_2I.unpack(str[start:end])
00268 start = end
00269 end += 4
00270 (length,) = _struct_I.unpack(str[start:end])
00271 start = end
00272 end += length
00273 if python3:
00274 self.mask.encoding = str[start:end].decode('utf-8')
00275 else:
00276 self.mask.encoding = str[start:end]
00277 _x = self
00278 start = end
00279 end += 5
00280 (_x.mask.is_bigendian, _x.mask.step,) = _struct_BI.unpack(str[start:end])
00281 start = end
00282 end += 4
00283 (length,) = _struct_I.unpack(str[start:end])
00284 start = end
00285 end += length
00286 if python3:
00287 self.mask.data = str[start:end].decode('utf-8')
00288 else:
00289 self.mask.data = str[start:end]
00290 return self
00291 except struct.error as e:
00292 raise genpy.DeserializationError(e)
00293
00294
00295 def serialize_numpy(self, buff, numpy):
00296 """
00297 serialize message with numpy array types into buffer
00298 :param buff: buffer, ``StringIO``
00299 :param numpy: numpy python module
00300 """
00301 try:
00302 length = len(self.geo_vw_sets)
00303 buff.write(_struct_I.pack(length))
00304 for val1 in self.geo_vw_sets:
00305 length = len(val1.geo_vws)
00306 buff.write(_struct_I.pack(length))
00307 for val2 in val1.geo_vws:
00308 _x = val2
00309 buff.write(_struct_3I.pack(_x.x, _x.y, _x.word))
00310 _x = self
00311 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00312 _x = self.image.header.frame_id
00313 length = len(_x)
00314 if python3 or type(_x) == unicode:
00315 _x = _x.encode('utf-8')
00316 length = len(_x)
00317 buff.write(struct.pack('<I%ss'%length, length, _x))
00318 _x = self
00319 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00320 _x = self.image.encoding
00321 length = len(_x)
00322 if python3 or type(_x) == unicode:
00323 _x = _x.encode('utf-8')
00324 length = len(_x)
00325 buff.write(struct.pack('<I%ss'%length, length, _x))
00326 _x = self
00327 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00328 _x = self.image.data
00329 length = len(_x)
00330
00331 if type(_x) in [list, tuple]:
00332 buff.write(struct.pack('<I%sB'%length, length, *_x))
00333 else:
00334 buff.write(struct.pack('<I%ss'%length, length, _x))
00335 _x = self
00336 buff.write(_struct_3I.pack(_x.mask.header.seq, _x.mask.header.stamp.secs, _x.mask.header.stamp.nsecs))
00337 _x = self.mask.header.frame_id
00338 length = len(_x)
00339 if python3 or type(_x) == unicode:
00340 _x = _x.encode('utf-8')
00341 length = len(_x)
00342 buff.write(struct.pack('<I%ss'%length, length, _x))
00343 _x = self
00344 buff.write(_struct_2I.pack(_x.mask.height, _x.mask.width))
00345 _x = self.mask.encoding
00346 length = len(_x)
00347 if python3 or type(_x) == unicode:
00348 _x = _x.encode('utf-8')
00349 length = len(_x)
00350 buff.write(struct.pack('<I%ss'%length, length, _x))
00351 _x = self
00352 buff.write(_struct_BI.pack(_x.mask.is_bigendian, _x.mask.step))
00353 _x = self.mask.data
00354 length = len(_x)
00355
00356 if type(_x) in [list, tuple]:
00357 buff.write(struct.pack('<I%sB'%length, length, *_x))
00358 else:
00359 buff.write(struct.pack('<I%ss'%length, length, _x))
00360 except struct.error as se: self._check_types(se)
00361 except TypeError as te: self._check_types(te)
00362
00363 def deserialize_numpy(self, str, numpy):
00364 """
00365 unpack serialized message in str into this message instance using numpy for array types
00366 :param str: byte array of serialized message, ``str``
00367 :param numpy: numpy python module
00368 """
00369 try:
00370 if self.geo_vw_sets is None:
00371 self.geo_vw_sets = None
00372 if self.image is None:
00373 self.image = sensor_msgs.msg.Image()
00374 if self.mask is None:
00375 self.mask = sensor_msgs.msg.Image()
00376 end = 0
00377 start = end
00378 end += 4
00379 (length,) = _struct_I.unpack(str[start:end])
00380 self.geo_vw_sets = []
00381 for i in range(0, length):
00382 val1 = iri_perception_msgs.msg.GeoVwSet()
00383 start = end
00384 end += 4
00385 (length,) = _struct_I.unpack(str[start:end])
00386 val1.geo_vws = []
00387 for i in range(0, length):
00388 val2 = iri_perception_msgs.msg.GeoVw()
00389 _x = val2
00390 start = end
00391 end += 12
00392 (_x.x, _x.y, _x.word,) = _struct_3I.unpack(str[start:end])
00393 val1.geo_vws.append(val2)
00394 self.geo_vw_sets.append(val1)
00395 _x = self
00396 start = end
00397 end += 12
00398 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00399 start = end
00400 end += 4
00401 (length,) = _struct_I.unpack(str[start:end])
00402 start = end
00403 end += length
00404 if python3:
00405 self.image.header.frame_id = str[start:end].decode('utf-8')
00406 else:
00407 self.image.header.frame_id = str[start:end]
00408 _x = self
00409 start = end
00410 end += 8
00411 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00412 start = end
00413 end += 4
00414 (length,) = _struct_I.unpack(str[start:end])
00415 start = end
00416 end += length
00417 if python3:
00418 self.image.encoding = str[start:end].decode('utf-8')
00419 else:
00420 self.image.encoding = str[start:end]
00421 _x = self
00422 start = end
00423 end += 5
00424 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00425 start = end
00426 end += 4
00427 (length,) = _struct_I.unpack(str[start:end])
00428 start = end
00429 end += length
00430 if python3:
00431 self.image.data = str[start:end].decode('utf-8')
00432 else:
00433 self.image.data = str[start:end]
00434 _x = self
00435 start = end
00436 end += 12
00437 (_x.mask.header.seq, _x.mask.header.stamp.secs, _x.mask.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00438 start = end
00439 end += 4
00440 (length,) = _struct_I.unpack(str[start:end])
00441 start = end
00442 end += length
00443 if python3:
00444 self.mask.header.frame_id = str[start:end].decode('utf-8')
00445 else:
00446 self.mask.header.frame_id = str[start:end]
00447 _x = self
00448 start = end
00449 end += 8
00450 (_x.mask.height, _x.mask.width,) = _struct_2I.unpack(str[start:end])
00451 start = end
00452 end += 4
00453 (length,) = _struct_I.unpack(str[start:end])
00454 start = end
00455 end += length
00456 if python3:
00457 self.mask.encoding = str[start:end].decode('utf-8')
00458 else:
00459 self.mask.encoding = str[start:end]
00460 _x = self
00461 start = end
00462 end += 5
00463 (_x.mask.is_bigendian, _x.mask.step,) = _struct_BI.unpack(str[start:end])
00464 start = end
00465 end += 4
00466 (length,) = _struct_I.unpack(str[start:end])
00467 start = end
00468 end += length
00469 if python3:
00470 self.mask.data = str[start:end].decode('utf-8')
00471 else:
00472 self.mask.data = str[start:end]
00473 return self
00474 except struct.error as e:
00475 raise genpy.DeserializationError(e)
00476
00477 _struct_I = genpy.struct_I
00478 _struct_3I = struct.Struct("<3I")
00479 _struct_2I = struct.Struct("<2I")
00480 _struct_BI = struct.Struct("<BI")
00481 """autogenerated by genpy from iri_bow_object_detector/GeoVwDetectionResponse.msg. Do not edit."""
00482 import sys
00483 python3 = True if sys.hexversion > 0x03000000 else False
00484 import genpy
00485 import struct
00486
00487 import iri_bow_object_detector.msg
00488 import iri_perception_msgs.msg
00489
00490 class GeoVwDetectionResponse(genpy.Message):
00491 _md5sum = "f290dbb2dae33f32398c0b98cef0d841"
00492 _type = "iri_bow_object_detector/GeoVwDetectionResponse"
00493 _has_header = False
00494 _full_text = """iri_bow_object_detector/ObjectBox[] posible_solutions
00495
00496
00497 ================================================================================
00498 MSG: iri_bow_object_detector/ObjectBox
00499 iri_perception_msgs/ImagePoint point1
00500 iri_perception_msgs/ImagePoint point2
00501 float32 value
00502 ================================================================================
00503 MSG: iri_perception_msgs/ImagePoint
00504 uint32 x
00505 uint32 y
00506 """
00507 __slots__ = ['posible_solutions']
00508 _slot_types = ['iri_bow_object_detector/ObjectBox[]']
00509
00510 def __init__(self, *args, **kwds):
00511 """
00512 Constructor. Any message fields that are implicitly/explicitly
00513 set to None will be assigned a default value. The recommend
00514 use is keyword arguments as this is more robust to future message
00515 changes. You cannot mix in-order arguments and keyword arguments.
00516
00517 The available fields are:
00518 posible_solutions
00519
00520 :param args: complete set of field values, in .msg order
00521 :param kwds: use keyword arguments corresponding to message field names
00522 to set specific fields.
00523 """
00524 if args or kwds:
00525 super(GeoVwDetectionResponse, self).__init__(*args, **kwds)
00526
00527 if self.posible_solutions is None:
00528 self.posible_solutions = []
00529 else:
00530 self.posible_solutions = []
00531
00532 def _get_types(self):
00533 """
00534 internal API method
00535 """
00536 return self._slot_types
00537
00538 def serialize(self, buff):
00539 """
00540 serialize message into buffer
00541 :param buff: buffer, ``StringIO``
00542 """
00543 try:
00544 length = len(self.posible_solutions)
00545 buff.write(_struct_I.pack(length))
00546 for val1 in self.posible_solutions:
00547 _v1 = val1.point1
00548 _x = _v1
00549 buff.write(_struct_2I.pack(_x.x, _x.y))
00550 _v2 = val1.point2
00551 _x = _v2
00552 buff.write(_struct_2I.pack(_x.x, _x.y))
00553 buff.write(_struct_f.pack(val1.value))
00554 except struct.error as se: self._check_types(se)
00555 except TypeError as te: self._check_types(te)
00556
00557 def deserialize(self, str):
00558 """
00559 unpack serialized message in str into this message instance
00560 :param str: byte array of serialized message, ``str``
00561 """
00562 try:
00563 if self.posible_solutions is None:
00564 self.posible_solutions = None
00565 end = 0
00566 start = end
00567 end += 4
00568 (length,) = _struct_I.unpack(str[start:end])
00569 self.posible_solutions = []
00570 for i in range(0, length):
00571 val1 = iri_bow_object_detector.msg.ObjectBox()
00572 _v3 = val1.point1
00573 _x = _v3
00574 start = end
00575 end += 8
00576 (_x.x, _x.y,) = _struct_2I.unpack(str[start:end])
00577 _v4 = val1.point2
00578 _x = _v4
00579 start = end
00580 end += 8
00581 (_x.x, _x.y,) = _struct_2I.unpack(str[start:end])
00582 start = end
00583 end += 4
00584 (val1.value,) = _struct_f.unpack(str[start:end])
00585 self.posible_solutions.append(val1)
00586 return self
00587 except struct.error as e:
00588 raise genpy.DeserializationError(e)
00589
00590
00591 def serialize_numpy(self, buff, numpy):
00592 """
00593 serialize message with numpy array types into buffer
00594 :param buff: buffer, ``StringIO``
00595 :param numpy: numpy python module
00596 """
00597 try:
00598 length = len(self.posible_solutions)
00599 buff.write(_struct_I.pack(length))
00600 for val1 in self.posible_solutions:
00601 _v5 = val1.point1
00602 _x = _v5
00603 buff.write(_struct_2I.pack(_x.x, _x.y))
00604 _v6 = val1.point2
00605 _x = _v6
00606 buff.write(_struct_2I.pack(_x.x, _x.y))
00607 buff.write(_struct_f.pack(val1.value))
00608 except struct.error as se: self._check_types(se)
00609 except TypeError as te: self._check_types(te)
00610
00611 def deserialize_numpy(self, str, numpy):
00612 """
00613 unpack serialized message in str into this message instance using numpy for array types
00614 :param str: byte array of serialized message, ``str``
00615 :param numpy: numpy python module
00616 """
00617 try:
00618 if self.posible_solutions is None:
00619 self.posible_solutions = None
00620 end = 0
00621 start = end
00622 end += 4
00623 (length,) = _struct_I.unpack(str[start:end])
00624 self.posible_solutions = []
00625 for i in range(0, length):
00626 val1 = iri_bow_object_detector.msg.ObjectBox()
00627 _v7 = val1.point1
00628 _x = _v7
00629 start = end
00630 end += 8
00631 (_x.x, _x.y,) = _struct_2I.unpack(str[start:end])
00632 _v8 = val1.point2
00633 _x = _v8
00634 start = end
00635 end += 8
00636 (_x.x, _x.y,) = _struct_2I.unpack(str[start:end])
00637 start = end
00638 end += 4
00639 (val1.value,) = _struct_f.unpack(str[start:end])
00640 self.posible_solutions.append(val1)
00641 return self
00642 except struct.error as e:
00643 raise genpy.DeserializationError(e)
00644
00645 _struct_I = genpy.struct_I
00646 _struct_2I = struct.Struct("<2I")
00647 _struct_f = struct.Struct("<f")
00648 class GeoVwDetection(object):
00649 _type = 'iri_bow_object_detector/GeoVwDetection'
00650 _md5sum = 'a9527c0fdb9971ff28f08c026548c643'
00651 _request_class = GeoVwDetectionRequest
00652 _response_class = GeoVwDetectionResponse