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


iri_sift
Author(s): dmartinez
autogenerated on Fri Dec 6 2013 22:44:31