_FindClosestAnnotation.py
Go to the documentation of this file.
00001 """autogenerated by genpy from map_annotation/FindClosestAnnotationRequest.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 geometry_msgs.msg
00008 
00009 class FindClosestAnnotationRequest(genpy.Message):
00010   _md5sum = "a7c84ff13976aa04656e56e300124444"
00011   _type = "map_annotation/FindClosestAnnotationRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """geometry_msgs/Point point
00014 
00015 ================================================================================
00016 MSG: geometry_msgs/Point
00017 # This contains the position of a point in free space
00018 float64 x
00019 float64 y
00020 float64 z
00021 
00022 """
00023   __slots__ = ['point']
00024   _slot_types = ['geometry_msgs/Point']
00025 
00026   def __init__(self, *args, **kwds):
00027     """
00028     Constructor. Any message fields that are implicitly/explicitly
00029     set to None will be assigned a default value. The recommend
00030     use is keyword arguments as this is more robust to future message
00031     changes.  You cannot mix in-order arguments and keyword arguments.
00032 
00033     The available fields are:
00034        point
00035 
00036     :param args: complete set of field values, in .msg order
00037     :param kwds: use keyword arguments corresponding to message field names
00038     to set specific fields.
00039     """
00040     if args or kwds:
00041       super(FindClosestAnnotationRequest, self).__init__(*args, **kwds)
00042       #message fields cannot be None, assign default values for those that are
00043       if self.point is None:
00044         self.point = geometry_msgs.msg.Point()
00045     else:
00046       self.point = geometry_msgs.msg.Point()
00047 
00048   def _get_types(self):
00049     """
00050     internal API method
00051     """
00052     return self._slot_types
00053 
00054   def serialize(self, buff):
00055     """
00056     serialize message into buffer
00057     :param buff: buffer, ``StringIO``
00058     """
00059     try:
00060       _x = self
00061       buff.write(_struct_3d.pack(_x.point.x, _x.point.y, _x.point.z))
00062     except struct.error as se: self._check_types(se)
00063     except TypeError as te: self._check_types(te)
00064 
00065   def deserialize(self, str):
00066     """
00067     unpack serialized message in str into this message instance
00068     :param str: byte array of serialized message, ``str``
00069     """
00070     try:
00071       if self.point is None:
00072         self.point = geometry_msgs.msg.Point()
00073       end = 0
00074       _x = self
00075       start = end
00076       end += 24
00077       (_x.point.x, _x.point.y, _x.point.z,) = _struct_3d.unpack(str[start:end])
00078       return self
00079     except struct.error as e:
00080       raise genpy.DeserializationError(e) #most likely buffer underfill
00081 
00082 
00083   def serialize_numpy(self, buff, numpy):
00084     """
00085     serialize message with numpy array types into buffer
00086     :param buff: buffer, ``StringIO``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       _x = self
00091       buff.write(_struct_3d.pack(_x.point.x, _x.point.y, _x.point.z))
00092     except struct.error as se: self._check_types(se)
00093     except TypeError as te: self._check_types(te)
00094 
00095   def deserialize_numpy(self, str, numpy):
00096     """
00097     unpack serialized message in str into this message instance using numpy for array types
00098     :param str: byte array of serialized message, ``str``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       if self.point is None:
00103         self.point = geometry_msgs.msg.Point()
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 24
00108       (_x.point.x, _x.point.y, _x.point.z,) = _struct_3d.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 _struct_I = genpy.struct_I
00114 _struct_3d = struct.Struct("<3d")
00115 """autogenerated by genpy from map_annotation/FindClosestAnnotationResponse.msg. Do not edit."""
00116 import sys
00117 python3 = True if sys.hexversion > 0x03000000 else False
00118 import genpy
00119 import struct
00120 
00121 
00122 class FindClosestAnnotationResponse(genpy.Message):
00123   _md5sum = "ea23f97416b04c6151d2b576c0665ac1"
00124   _type = "map_annotation/FindClosestAnnotationResponse"
00125   _has_header = False #flag to mark the presence of a Header object
00126   _full_text = """string label
00127 
00128 
00129 """
00130   __slots__ = ['label']
00131   _slot_types = ['string']
00132 
00133   def __init__(self, *args, **kwds):
00134     """
00135     Constructor. Any message fields that are implicitly/explicitly
00136     set to None will be assigned a default value. The recommend
00137     use is keyword arguments as this is more robust to future message
00138     changes.  You cannot mix in-order arguments and keyword arguments.
00139 
00140     The available fields are:
00141        label
00142 
00143     :param args: complete set of field values, in .msg order
00144     :param kwds: use keyword arguments corresponding to message field names
00145     to set specific fields.
00146     """
00147     if args or kwds:
00148       super(FindClosestAnnotationResponse, self).__init__(*args, **kwds)
00149       #message fields cannot be None, assign default values for those that are
00150       if self.label is None:
00151         self.label = ''
00152     else:
00153       self.label = ''
00154 
00155   def _get_types(self):
00156     """
00157     internal API method
00158     """
00159     return self._slot_types
00160 
00161   def serialize(self, buff):
00162     """
00163     serialize message into buffer
00164     :param buff: buffer, ``StringIO``
00165     """
00166     try:
00167       _x = self.label
00168       length = len(_x)
00169       if python3 or type(_x) == unicode:
00170         _x = _x.encode('utf-8')
00171         length = len(_x)
00172       buff.write(struct.pack('<I%ss'%length, length, _x))
00173     except struct.error as se: self._check_types(se)
00174     except TypeError as te: self._check_types(te)
00175 
00176   def deserialize(self, str):
00177     """
00178     unpack serialized message in str into this message instance
00179     :param str: byte array of serialized message, ``str``
00180     """
00181     try:
00182       end = 0
00183       start = end
00184       end += 4
00185       (length,) = _struct_I.unpack(str[start:end])
00186       start = end
00187       end += length
00188       if python3:
00189         self.label = str[start:end].decode('utf-8')
00190       else:
00191         self.label = str[start:end]
00192       return self
00193     except struct.error as e:
00194       raise genpy.DeserializationError(e) #most likely buffer underfill
00195 
00196 
00197   def serialize_numpy(self, buff, numpy):
00198     """
00199     serialize message with numpy array types into buffer
00200     :param buff: buffer, ``StringIO``
00201     :param numpy: numpy python module
00202     """
00203     try:
00204       _x = self.label
00205       length = len(_x)
00206       if python3 or type(_x) == unicode:
00207         _x = _x.encode('utf-8')
00208         length = len(_x)
00209       buff.write(struct.pack('<I%ss'%length, length, _x))
00210     except struct.error as se: self._check_types(se)
00211     except TypeError as te: self._check_types(te)
00212 
00213   def deserialize_numpy(self, str, numpy):
00214     """
00215     unpack serialized message in str into this message instance using numpy for array types
00216     :param str: byte array of serialized message, ``str``
00217     :param numpy: numpy python module
00218     """
00219     try:
00220       end = 0
00221       start = end
00222       end += 4
00223       (length,) = _struct_I.unpack(str[start:end])
00224       start = end
00225       end += length
00226       if python3:
00227         self.label = str[start:end].decode('utf-8')
00228       else:
00229         self.label = str[start:end]
00230       return self
00231     except struct.error as e:
00232       raise genpy.DeserializationError(e) #most likely buffer underfill
00233 
00234 _struct_I = genpy.struct_I
00235 class FindClosestAnnotation(object):
00236   _type          = 'map_annotation/FindClosestAnnotation'
00237   _md5sum = 'f73be94045bf318f23790ee3e1b270db'
00238   _request_class  = FindClosestAnnotationRequest
00239   _response_class = FindClosestAnnotationResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


map_annotation
Author(s): Lorenz Moesenlechner
autogenerated on Thu May 23 2013 12:37:31