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


cob_camera_sensors
Author(s): Jan Fischer
autogenerated on Sun Oct 5 2014 23:07:54