_srvjlo.py
Go to the documentation of this file.
00001 """autogenerated by genpy from vision_srvs/srvjloRequest.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 vision_msgs.msg
00008 
00009 class srvjloRequest(genpy.Message):
00010   _md5sum = "448f8517a06ac844e556609aee938e74"
00011   _type = "vision_srvs/srvjloRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 string command
00015 vision_msgs/partial_lo query
00016 
00017 ================================================================================
00018 MSG: vision_msgs/partial_lo
00019 # Message to quiey the lo-service, U. Klank klank@in.tum.de
00020 uint64 id                           #id of a frame, there should be unique mapping from a tf-name-string to such an id
00021 string name                     #optional parameter name representing a tf and knowledgebase correspondence
00022 uint64 parent_id        #id of parent frame
00023 float64[16] pose              #pose matrix, fully projective 4x4 matrix
00024 float64[36] cov         #covariance for 6 dof (xyz, rpy)
00025 uint16 type             #fixed connection with the parent (1) or free in space (0 = default)
00026 
00027 """
00028   __slots__ = ['command','query']
00029   _slot_types = ['string','vision_msgs/partial_lo']
00030 
00031   def __init__(self, *args, **kwds):
00032     """
00033     Constructor. Any message fields that are implicitly/explicitly
00034     set to None will be assigned a default value. The recommend
00035     use is keyword arguments as this is more robust to future message
00036     changes.  You cannot mix in-order arguments and keyword arguments.
00037 
00038     The available fields are:
00039        command,query
00040 
00041     :param args: complete set of field values, in .msg order
00042     :param kwds: use keyword arguments corresponding to message field names
00043     to set specific fields.
00044     """
00045     if args or kwds:
00046       super(srvjloRequest, self).__init__(*args, **kwds)
00047       #message fields cannot be None, assign default values for those that are
00048       if self.command is None:
00049         self.command = ''
00050       if self.query is None:
00051         self.query = vision_msgs.msg.partial_lo()
00052     else:
00053       self.command = ''
00054       self.query = vision_msgs.msg.partial_lo()
00055 
00056   def _get_types(self):
00057     """
00058     internal API method
00059     """
00060     return self._slot_types
00061 
00062   def serialize(self, buff):
00063     """
00064     serialize message into buffer
00065     :param buff: buffer, ``StringIO``
00066     """
00067     try:
00068       _x = self.command
00069       length = len(_x)
00070       if python3 or type(_x) == unicode:
00071         _x = _x.encode('utf-8')
00072         length = len(_x)
00073       buff.write(struct.pack('<I%ss'%length, length, _x))
00074       buff.write(_struct_Q.pack(self.query.id))
00075       _x = self.query.name
00076       length = len(_x)
00077       if python3 or type(_x) == unicode:
00078         _x = _x.encode('utf-8')
00079         length = len(_x)
00080       buff.write(struct.pack('<I%ss'%length, length, _x))
00081       buff.write(_struct_Q.pack(self.query.parent_id))
00082       buff.write(_struct_16d.pack(*self.query.pose))
00083       buff.write(_struct_36d.pack(*self.query.cov))
00084       buff.write(_struct_H.pack(self.query.type))
00085     except struct.error as se: self._check_types(se)
00086     except TypeError as te: self._check_types(te)
00087 
00088   def deserialize(self, str):
00089     """
00090     unpack serialized message in str into this message instance
00091     :param str: byte array of serialized message, ``str``
00092     """
00093     try:
00094       if self.query is None:
00095         self.query = vision_msgs.msg.partial_lo()
00096       end = 0
00097       start = end
00098       end += 4
00099       (length,) = _struct_I.unpack(str[start:end])
00100       start = end
00101       end += length
00102       if python3:
00103         self.command = str[start:end].decode('utf-8')
00104       else:
00105         self.command = str[start:end]
00106       start = end
00107       end += 8
00108       (self.query.id,) = _struct_Q.unpack(str[start:end])
00109       start = end
00110       end += 4
00111       (length,) = _struct_I.unpack(str[start:end])
00112       start = end
00113       end += length
00114       if python3:
00115         self.query.name = str[start:end].decode('utf-8')
00116       else:
00117         self.query.name = str[start:end]
00118       start = end
00119       end += 8
00120       (self.query.parent_id,) = _struct_Q.unpack(str[start:end])
00121       start = end
00122       end += 128
00123       self.query.pose = _struct_16d.unpack(str[start:end])
00124       start = end
00125       end += 288
00126       self.query.cov = _struct_36d.unpack(str[start:end])
00127       start = end
00128       end += 2
00129       (self.query.type,) = _struct_H.unpack(str[start:end])
00130       return self
00131     except struct.error as e:
00132       raise genpy.DeserializationError(e) #most likely buffer underfill
00133 
00134 
00135   def serialize_numpy(self, buff, numpy):
00136     """
00137     serialize message with numpy array types into buffer
00138     :param buff: buffer, ``StringIO``
00139     :param numpy: numpy python module
00140     """
00141     try:
00142       _x = self.command
00143       length = len(_x)
00144       if python3 or type(_x) == unicode:
00145         _x = _x.encode('utf-8')
00146         length = len(_x)
00147       buff.write(struct.pack('<I%ss'%length, length, _x))
00148       buff.write(_struct_Q.pack(self.query.id))
00149       _x = self.query.name
00150       length = len(_x)
00151       if python3 or type(_x) == unicode:
00152         _x = _x.encode('utf-8')
00153         length = len(_x)
00154       buff.write(struct.pack('<I%ss'%length, length, _x))
00155       buff.write(_struct_Q.pack(self.query.parent_id))
00156       buff.write(self.query.pose.tostring())
00157       buff.write(self.query.cov.tostring())
00158       buff.write(_struct_H.pack(self.query.type))
00159     except struct.error as se: self._check_types(se)
00160     except TypeError as te: self._check_types(te)
00161 
00162   def deserialize_numpy(self, str, numpy):
00163     """
00164     unpack serialized message in str into this message instance using numpy for array types
00165     :param str: byte array of serialized message, ``str``
00166     :param numpy: numpy python module
00167     """
00168     try:
00169       if self.query is None:
00170         self.query = vision_msgs.msg.partial_lo()
00171       end = 0
00172       start = end
00173       end += 4
00174       (length,) = _struct_I.unpack(str[start:end])
00175       start = end
00176       end += length
00177       if python3:
00178         self.command = str[start:end].decode('utf-8')
00179       else:
00180         self.command = str[start:end]
00181       start = end
00182       end += 8
00183       (self.query.id,) = _struct_Q.unpack(str[start:end])
00184       start = end
00185       end += 4
00186       (length,) = _struct_I.unpack(str[start:end])
00187       start = end
00188       end += length
00189       if python3:
00190         self.query.name = str[start:end].decode('utf-8')
00191       else:
00192         self.query.name = str[start:end]
00193       start = end
00194       end += 8
00195       (self.query.parent_id,) = _struct_Q.unpack(str[start:end])
00196       start = end
00197       end += 128
00198       self.query.pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=16)
00199       start = end
00200       end += 288
00201       self.query.cov = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00202       start = end
00203       end += 2
00204       (self.query.type,) = _struct_H.unpack(str[start:end])
00205       return self
00206     except struct.error as e:
00207       raise genpy.DeserializationError(e) #most likely buffer underfill
00208 
00209 _struct_I = genpy.struct_I
00210 _struct_Q = struct.Struct("<Q")
00211 _struct_16d = struct.Struct("<16d")
00212 _struct_36d = struct.Struct("<36d")
00213 _struct_H = struct.Struct("<H")
00214 """autogenerated by genpy from vision_srvs/srvjloResponse.msg. Do not edit."""
00215 import sys
00216 python3 = True if sys.hexversion > 0x03000000 else False
00217 import genpy
00218 import struct
00219 
00220 import vision_msgs.msg
00221 
00222 class srvjloResponse(genpy.Message):
00223   _md5sum = "8a198b249660f62ab3353dd7d0ba18d4"
00224   _type = "vision_srvs/srvjloResponse"
00225   _has_header = False #flag to mark the presence of a Header object
00226   _full_text = """string error
00227 vision_msgs/partial_lo answer
00228 
00229 
00230 ================================================================================
00231 MSG: vision_msgs/partial_lo
00232 # Message to quiey the lo-service, U. Klank klank@in.tum.de
00233 uint64 id                           #id of a frame, there should be unique mapping from a tf-name-string to such an id
00234 string name                     #optional parameter name representing a tf and knowledgebase correspondence
00235 uint64 parent_id        #id of parent frame
00236 float64[16] pose              #pose matrix, fully projective 4x4 matrix
00237 float64[36] cov         #covariance for 6 dof (xyz, rpy)
00238 uint16 type             #fixed connection with the parent (1) or free in space (0 = default)
00239 
00240 """
00241   __slots__ = ['error','answer']
00242   _slot_types = ['string','vision_msgs/partial_lo']
00243 
00244   def __init__(self, *args, **kwds):
00245     """
00246     Constructor. Any message fields that are implicitly/explicitly
00247     set to None will be assigned a default value. The recommend
00248     use is keyword arguments as this is more robust to future message
00249     changes.  You cannot mix in-order arguments and keyword arguments.
00250 
00251     The available fields are:
00252        error,answer
00253 
00254     :param args: complete set of field values, in .msg order
00255     :param kwds: use keyword arguments corresponding to message field names
00256     to set specific fields.
00257     """
00258     if args or kwds:
00259       super(srvjloResponse, self).__init__(*args, **kwds)
00260       #message fields cannot be None, assign default values for those that are
00261       if self.error is None:
00262         self.error = ''
00263       if self.answer is None:
00264         self.answer = vision_msgs.msg.partial_lo()
00265     else:
00266       self.error = ''
00267       self.answer = vision_msgs.msg.partial_lo()
00268 
00269   def _get_types(self):
00270     """
00271     internal API method
00272     """
00273     return self._slot_types
00274 
00275   def serialize(self, buff):
00276     """
00277     serialize message into buffer
00278     :param buff: buffer, ``StringIO``
00279     """
00280     try:
00281       _x = self.error
00282       length = len(_x)
00283       if python3 or type(_x) == unicode:
00284         _x = _x.encode('utf-8')
00285         length = len(_x)
00286       buff.write(struct.pack('<I%ss'%length, length, _x))
00287       buff.write(_struct_Q.pack(self.answer.id))
00288       _x = self.answer.name
00289       length = len(_x)
00290       if python3 or type(_x) == unicode:
00291         _x = _x.encode('utf-8')
00292         length = len(_x)
00293       buff.write(struct.pack('<I%ss'%length, length, _x))
00294       buff.write(_struct_Q.pack(self.answer.parent_id))
00295       buff.write(_struct_16d.pack(*self.answer.pose))
00296       buff.write(_struct_36d.pack(*self.answer.cov))
00297       buff.write(_struct_H.pack(self.answer.type))
00298     except struct.error as se: self._check_types(se)
00299     except TypeError as te: self._check_types(te)
00300 
00301   def deserialize(self, str):
00302     """
00303     unpack serialized message in str into this message instance
00304     :param str: byte array of serialized message, ``str``
00305     """
00306     try:
00307       if self.answer is None:
00308         self.answer = vision_msgs.msg.partial_lo()
00309       end = 0
00310       start = end
00311       end += 4
00312       (length,) = _struct_I.unpack(str[start:end])
00313       start = end
00314       end += length
00315       if python3:
00316         self.error = str[start:end].decode('utf-8')
00317       else:
00318         self.error = str[start:end]
00319       start = end
00320       end += 8
00321       (self.answer.id,) = _struct_Q.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       if python3:
00328         self.answer.name = str[start:end].decode('utf-8')
00329       else:
00330         self.answer.name = str[start:end]
00331       start = end
00332       end += 8
00333       (self.answer.parent_id,) = _struct_Q.unpack(str[start:end])
00334       start = end
00335       end += 128
00336       self.answer.pose = _struct_16d.unpack(str[start:end])
00337       start = end
00338       end += 288
00339       self.answer.cov = _struct_36d.unpack(str[start:end])
00340       start = end
00341       end += 2
00342       (self.answer.type,) = _struct_H.unpack(str[start:end])
00343       return self
00344     except struct.error as e:
00345       raise genpy.DeserializationError(e) #most likely buffer underfill
00346 
00347 
00348   def serialize_numpy(self, buff, numpy):
00349     """
00350     serialize message with numpy array types into buffer
00351     :param buff: buffer, ``StringIO``
00352     :param numpy: numpy python module
00353     """
00354     try:
00355       _x = self.error
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       buff.write(_struct_Q.pack(self.answer.id))
00362       _x = self.answer.name
00363       length = len(_x)
00364       if python3 or type(_x) == unicode:
00365         _x = _x.encode('utf-8')
00366         length = len(_x)
00367       buff.write(struct.pack('<I%ss'%length, length, _x))
00368       buff.write(_struct_Q.pack(self.answer.parent_id))
00369       buff.write(self.answer.pose.tostring())
00370       buff.write(self.answer.cov.tostring())
00371       buff.write(_struct_H.pack(self.answer.type))
00372     except struct.error as se: self._check_types(se)
00373     except TypeError as te: self._check_types(te)
00374 
00375   def deserialize_numpy(self, str, numpy):
00376     """
00377     unpack serialized message in str into this message instance using numpy for array types
00378     :param str: byte array of serialized message, ``str``
00379     :param numpy: numpy python module
00380     """
00381     try:
00382       if self.answer is None:
00383         self.answer = vision_msgs.msg.partial_lo()
00384       end = 0
00385       start = end
00386       end += 4
00387       (length,) = _struct_I.unpack(str[start:end])
00388       start = end
00389       end += length
00390       if python3:
00391         self.error = str[start:end].decode('utf-8')
00392       else:
00393         self.error = str[start:end]
00394       start = end
00395       end += 8
00396       (self.answer.id,) = _struct_Q.unpack(str[start:end])
00397       start = end
00398       end += 4
00399       (length,) = _struct_I.unpack(str[start:end])
00400       start = end
00401       end += length
00402       if python3:
00403         self.answer.name = str[start:end].decode('utf-8')
00404       else:
00405         self.answer.name = str[start:end]
00406       start = end
00407       end += 8
00408       (self.answer.parent_id,) = _struct_Q.unpack(str[start:end])
00409       start = end
00410       end += 128
00411       self.answer.pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=16)
00412       start = end
00413       end += 288
00414       self.answer.cov = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00415       start = end
00416       end += 2
00417       (self.answer.type,) = _struct_H.unpack(str[start:end])
00418       return self
00419     except struct.error as e:
00420       raise genpy.DeserializationError(e) #most likely buffer underfill
00421 
00422 _struct_I = genpy.struct_I
00423 _struct_Q = struct.Struct("<Q")
00424 _struct_16d = struct.Struct("<16d")
00425 _struct_36d = struct.Struct("<36d")
00426 _struct_H = struct.Struct("<H")
00427 class srvjlo(object):
00428   _type          = 'vision_srvs/srvjlo'
00429   _md5sum = '572b4b0c75f505639d3bf0845a2758bc'
00430   _request_class  = srvjloRequest
00431   _response_class = srvjloResponse


vision_srvs
Author(s): Ulrich F Klank
autogenerated on Thu Jan 2 2014 11:22:38