00001 """autogenerated by genpy from camera_self_filter/maskRequest.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
00009 class maskRequest(genpy.Message):
00010 _md5sum = "d7be0bb39af8fb9129d5a76e6b63a290"
00011 _type = "camera_self_filter/maskRequest"
00012 _has_header = True
00013 _full_text = """std_msgs/Header header
00014
00015 ================================================================================
00016 MSG: std_msgs/Header
00017 # Standard metadata for higher-level stamped data types.
00018 # This is generally used to communicate timestamped data
00019 # in a particular coordinate frame.
00020 #
00021 # sequence ID: consecutively increasing ID
00022 uint32 seq
00023 #Two-integer timestamp that is expressed as:
00024 # * stamp.secs: seconds (stamp_secs) since epoch
00025 # * stamp.nsecs: nanoseconds since stamp_secs
00026 # time-handling sugar is provided by the client library
00027 time stamp
00028 #Frame this data is associated with
00029 # 0: no frame
00030 # 1: global frame
00031 string frame_id
00032
00033 """
00034 __slots__ = ['header']
00035 _slot_types = ['std_msgs/Header']
00036
00037 def __init__(self, *args, **kwds):
00038 """
00039 Constructor. Any message fields that are implicitly/explicitly
00040 set to None will be assigned a default value. The recommend
00041 use is keyword arguments as this is more robust to future message
00042 changes. You cannot mix in-order arguments and keyword arguments.
00043
00044 The available fields are:
00045 header
00046
00047 :param args: complete set of field values, in .msg order
00048 :param kwds: use keyword arguments corresponding to message field names
00049 to set specific fields.
00050 """
00051 if args or kwds:
00052 super(maskRequest, self).__init__(*args, **kwds)
00053
00054 if self.header is None:
00055 self.header = std_msgs.msg.Header()
00056 else:
00057 self.header = std_msgs.msg.Header()
00058
00059 def _get_types(self):
00060 """
00061 internal API method
00062 """
00063 return self._slot_types
00064
00065 def serialize(self, buff):
00066 """
00067 serialize message into buffer
00068 :param buff: buffer, ``StringIO``
00069 """
00070 try:
00071 _x = self
00072 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00073 _x = self.header.frame_id
00074 length = len(_x)
00075 if python3 or type(_x) == unicode:
00076 _x = _x.encode('utf-8')
00077 length = len(_x)
00078 buff.write(struct.pack('<I%ss'%length, length, _x))
00079 except struct.error as se: self._check_types(se)
00080 except TypeError as te: self._check_types(te)
00081
00082 def deserialize(self, str):
00083 """
00084 unpack serialized message in str into this message instance
00085 :param str: byte array of serialized message, ``str``
00086 """
00087 try:
00088 if self.header is None:
00089 self.header = std_msgs.msg.Header()
00090 end = 0
00091 _x = self
00092 start = end
00093 end += 12
00094 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00095 start = end
00096 end += 4
00097 (length,) = _struct_I.unpack(str[start:end])
00098 start = end
00099 end += length
00100 if python3:
00101 self.header.frame_id = str[start:end].decode('utf-8')
00102 else:
00103 self.header.frame_id = str[start:end]
00104 return self
00105 except struct.error as e:
00106 raise genpy.DeserializationError(e)
00107
00108
00109 def serialize_numpy(self, buff, numpy):
00110 """
00111 serialize message with numpy array types into buffer
00112 :param buff: buffer, ``StringIO``
00113 :param numpy: numpy python module
00114 """
00115 try:
00116 _x = self
00117 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00118 _x = self.header.frame_id
00119 length = len(_x)
00120 if python3 or type(_x) == unicode:
00121 _x = _x.encode('utf-8')
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 except struct.error as se: self._check_types(se)
00125 except TypeError as te: self._check_types(te)
00126
00127 def deserialize_numpy(self, str, numpy):
00128 """
00129 unpack serialized message in str into this message instance using numpy for array types
00130 :param str: byte array of serialized message, ``str``
00131 :param numpy: numpy python module
00132 """
00133 try:
00134 if self.header is None:
00135 self.header = std_msgs.msg.Header()
00136 end = 0
00137 _x = self
00138 start = end
00139 end += 12
00140 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 if python3:
00147 self.header.frame_id = str[start:end].decode('utf-8')
00148 else:
00149 self.header.frame_id = str[start:end]
00150 return self
00151 except struct.error as e:
00152 raise genpy.DeserializationError(e)
00153
00154 _struct_I = genpy.struct_I
00155 _struct_3I = struct.Struct("<3I")
00156 """autogenerated by genpy from camera_self_filter/maskResponse.msg. Do not edit."""
00157 import sys
00158 python3 = True if sys.hexversion > 0x03000000 else False
00159 import genpy
00160 import struct
00161
00162 import std_msgs.msg
00163 import sensor_msgs.msg
00164
00165 class maskResponse(genpy.Message):
00166 _md5sum = "39c74c093fa8b7c6d397ed7cbe6ce11f"
00167 _type = "camera_self_filter/maskResponse"
00168 _has_header = False
00169 _full_text = """sensor_msgs/Image mask_image
00170
00171 ================================================================================
00172 MSG: sensor_msgs/Image
00173 # This message contains an uncompressed image
00174 # (0, 0) is at top-left corner of image
00175 #
00176
00177 Header header # Header timestamp should be acquisition time of image
00178 # Header frame_id should be optical frame of camera
00179 # origin of frame should be optical center of cameara
00180 # +x should point to the right in the image
00181 # +y should point down in the image
00182 # +z should point into to plane of the image
00183 # If the frame_id here and the frame_id of the CameraInfo
00184 # message associated with the image conflict
00185 # the behavior is undefined
00186
00187 uint32 height # image height, that is, number of rows
00188 uint32 width # image width, that is, number of columns
00189
00190 # The legal values for encoding are in file src/image_encodings.cpp
00191 # If you want to standardize a new string format, join
00192 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00193
00194 string encoding # Encoding of pixels -- channel meaning, ordering, size
00195 # taken from the list of strings in src/image_encodings.cpp
00196
00197 uint8 is_bigendian # is this data bigendian?
00198 uint32 step # Full row length in bytes
00199 uint8[] data # actual matrix data, size is (step * rows)
00200
00201 ================================================================================
00202 MSG: std_msgs/Header
00203 # Standard metadata for higher-level stamped data types.
00204 # This is generally used to communicate timestamped data
00205 # in a particular coordinate frame.
00206 #
00207 # sequence ID: consecutively increasing ID
00208 uint32 seq
00209 #Two-integer timestamp that is expressed as:
00210 # * stamp.secs: seconds (stamp_secs) since epoch
00211 # * stamp.nsecs: nanoseconds since stamp_secs
00212 # time-handling sugar is provided by the client library
00213 time stamp
00214 #Frame this data is associated with
00215 # 0: no frame
00216 # 1: global frame
00217 string frame_id
00218
00219 """
00220 __slots__ = ['mask_image']
00221 _slot_types = ['sensor_msgs/Image']
00222
00223 def __init__(self, *args, **kwds):
00224 """
00225 Constructor. Any message fields that are implicitly/explicitly
00226 set to None will be assigned a default value. The recommend
00227 use is keyword arguments as this is more robust to future message
00228 changes. You cannot mix in-order arguments and keyword arguments.
00229
00230 The available fields are:
00231 mask_image
00232
00233 :param args: complete set of field values, in .msg order
00234 :param kwds: use keyword arguments corresponding to message field names
00235 to set specific fields.
00236 """
00237 if args or kwds:
00238 super(maskResponse, self).__init__(*args, **kwds)
00239
00240 if self.mask_image is None:
00241 self.mask_image = sensor_msgs.msg.Image()
00242 else:
00243 self.mask_image = sensor_msgs.msg.Image()
00244
00245 def _get_types(self):
00246 """
00247 internal API method
00248 """
00249 return self._slot_types
00250
00251 def serialize(self, buff):
00252 """
00253 serialize message into buffer
00254 :param buff: buffer, ``StringIO``
00255 """
00256 try:
00257 _x = self
00258 buff.write(_struct_3I.pack(_x.mask_image.header.seq, _x.mask_image.header.stamp.secs, _x.mask_image.header.stamp.nsecs))
00259 _x = self.mask_image.header.frame_id
00260 length = len(_x)
00261 if python3 or type(_x) == unicode:
00262 _x = _x.encode('utf-8')
00263 length = len(_x)
00264 buff.write(struct.pack('<I%ss'%length, length, _x))
00265 _x = self
00266 buff.write(_struct_2I.pack(_x.mask_image.height, _x.mask_image.width))
00267 _x = self.mask_image.encoding
00268 length = len(_x)
00269 if python3 or type(_x) == unicode:
00270 _x = _x.encode('utf-8')
00271 length = len(_x)
00272 buff.write(struct.pack('<I%ss'%length, length, _x))
00273 _x = self
00274 buff.write(_struct_BI.pack(_x.mask_image.is_bigendian, _x.mask_image.step))
00275 _x = self.mask_image.data
00276 length = len(_x)
00277
00278 if type(_x) in [list, tuple]:
00279 buff.write(struct.pack('<I%sB'%length, length, *_x))
00280 else:
00281 buff.write(struct.pack('<I%ss'%length, length, _x))
00282 except struct.error as se: self._check_types(se)
00283 except TypeError as te: self._check_types(te)
00284
00285 def deserialize(self, str):
00286 """
00287 unpack serialized message in str into this message instance
00288 :param str: byte array of serialized message, ``str``
00289 """
00290 try:
00291 if self.mask_image is None:
00292 self.mask_image = sensor_msgs.msg.Image()
00293 end = 0
00294 _x = self
00295 start = end
00296 end += 12
00297 (_x.mask_image.header.seq, _x.mask_image.header.stamp.secs, _x.mask_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00298 start = end
00299 end += 4
00300 (length,) = _struct_I.unpack(str[start:end])
00301 start = end
00302 end += length
00303 if python3:
00304 self.mask_image.header.frame_id = str[start:end].decode('utf-8')
00305 else:
00306 self.mask_image.header.frame_id = str[start:end]
00307 _x = self
00308 start = end
00309 end += 8
00310 (_x.mask_image.height, _x.mask_image.width,) = _struct_2I.unpack(str[start:end])
00311 start = end
00312 end += 4
00313 (length,) = _struct_I.unpack(str[start:end])
00314 start = end
00315 end += length
00316 if python3:
00317 self.mask_image.encoding = str[start:end].decode('utf-8')
00318 else:
00319 self.mask_image.encoding = str[start:end]
00320 _x = self
00321 start = end
00322 end += 5
00323 (_x.mask_image.is_bigendian, _x.mask_image.step,) = _struct_BI.unpack(str[start:end])
00324 start = end
00325 end += 4
00326 (length,) = _struct_I.unpack(str[start:end])
00327 start = end
00328 end += length
00329 if python3:
00330 self.mask_image.data = str[start:end].decode('utf-8')
00331 else:
00332 self.mask_image.data = str[start:end]
00333 return self
00334 except struct.error as e:
00335 raise genpy.DeserializationError(e)
00336
00337
00338 def serialize_numpy(self, buff, numpy):
00339 """
00340 serialize message with numpy array types into buffer
00341 :param buff: buffer, ``StringIO``
00342 :param numpy: numpy python module
00343 """
00344 try:
00345 _x = self
00346 buff.write(_struct_3I.pack(_x.mask_image.header.seq, _x.mask_image.header.stamp.secs, _x.mask_image.header.stamp.nsecs))
00347 _x = self.mask_image.header.frame_id
00348 length = len(_x)
00349 if python3 or type(_x) == unicode:
00350 _x = _x.encode('utf-8')
00351 length = len(_x)
00352 buff.write(struct.pack('<I%ss'%length, length, _x))
00353 _x = self
00354 buff.write(_struct_2I.pack(_x.mask_image.height, _x.mask_image.width))
00355 _x = self.mask_image.encoding
00356 length = len(_x)
00357 if python3 or type(_x) == unicode:
00358 _x = _x.encode('utf-8')
00359 length = len(_x)
00360 buff.write(struct.pack('<I%ss'%length, length, _x))
00361 _x = self
00362 buff.write(_struct_BI.pack(_x.mask_image.is_bigendian, _x.mask_image.step))
00363 _x = self.mask_image.data
00364 length = len(_x)
00365
00366 if type(_x) in [list, tuple]:
00367 buff.write(struct.pack('<I%sB'%length, length, *_x))
00368 else:
00369 buff.write(struct.pack('<I%ss'%length, length, _x))
00370 except struct.error as se: self._check_types(se)
00371 except TypeError as te: self._check_types(te)
00372
00373 def deserialize_numpy(self, str, numpy):
00374 """
00375 unpack serialized message in str into this message instance using numpy for array types
00376 :param str: byte array of serialized message, ``str``
00377 :param numpy: numpy python module
00378 """
00379 try:
00380 if self.mask_image is None:
00381 self.mask_image = sensor_msgs.msg.Image()
00382 end = 0
00383 _x = self
00384 start = end
00385 end += 12
00386 (_x.mask_image.header.seq, _x.mask_image.header.stamp.secs, _x.mask_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00387 start = end
00388 end += 4
00389 (length,) = _struct_I.unpack(str[start:end])
00390 start = end
00391 end += length
00392 if python3:
00393 self.mask_image.header.frame_id = str[start:end].decode('utf-8')
00394 else:
00395 self.mask_image.header.frame_id = str[start:end]
00396 _x = self
00397 start = end
00398 end += 8
00399 (_x.mask_image.height, _x.mask_image.width,) = _struct_2I.unpack(str[start:end])
00400 start = end
00401 end += 4
00402 (length,) = _struct_I.unpack(str[start:end])
00403 start = end
00404 end += length
00405 if python3:
00406 self.mask_image.encoding = str[start:end].decode('utf-8')
00407 else:
00408 self.mask_image.encoding = str[start:end]
00409 _x = self
00410 start = end
00411 end += 5
00412 (_x.mask_image.is_bigendian, _x.mask_image.step,) = _struct_BI.unpack(str[start:end])
00413 start = end
00414 end += 4
00415 (length,) = _struct_I.unpack(str[start:end])
00416 start = end
00417 end += length
00418 if python3:
00419 self.mask_image.data = str[start:end].decode('utf-8')
00420 else:
00421 self.mask_image.data = str[start:end]
00422 return self
00423 except struct.error as e:
00424 raise genpy.DeserializationError(e)
00425
00426 _struct_I = genpy.struct_I
00427 _struct_3I = struct.Struct("<3I")
00428 _struct_2I = struct.Struct("<2I")
00429 _struct_BI = struct.Struct("<BI")
00430 class mask(object):
00431 _type = 'camera_self_filter/mask'
00432 _md5sum = 'b38ab8ce976ae4b6660575f6d4ca1ee4'
00433 _request_class = maskRequest
00434 _response_class = maskResponse