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


youbot_overhead_vision
Author(s): Fred Clinckemaillie, Maintained by David Kent
autogenerated on Thu Jan 2 2014 12:14:12