_FkTest.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_calibration_launch/FkTestRequest.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 FkTestRequest(genpy.Message):
00009   _md5sum = "708e14f98ff72822d3442bcaef9c218d"
00010   _type = "pr2_calibration_launch/FkTestRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string root
00013 string tip
00014 float64[] joint_positions
00015 
00016 """
00017   __slots__ = ['root','tip','joint_positions']
00018   _slot_types = ['string','string','float64[]']
00019 
00020   def __init__(self, *args, **kwds):
00021     """
00022     Constructor. Any message fields that are implicitly/explicitly
00023     set to None will be assigned a default value. The recommend
00024     use is keyword arguments as this is more robust to future message
00025     changes.  You cannot mix in-order arguments and keyword arguments.
00026 
00027     The available fields are:
00028        root,tip,joint_positions
00029 
00030     :param args: complete set of field values, in .msg order
00031     :param kwds: use keyword arguments corresponding to message field names
00032     to set specific fields.
00033     """
00034     if args or kwds:
00035       super(FkTestRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.root is None:
00038         self.root = ''
00039       if self.tip is None:
00040         self.tip = ''
00041       if self.joint_positions is None:
00042         self.joint_positions = []
00043     else:
00044       self.root = ''
00045       self.tip = ''
00046       self.joint_positions = []
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.root
00061       length = len(_x)
00062       if python3 or type(_x) == unicode:
00063         _x = _x.encode('utf-8')
00064         length = len(_x)
00065       buff.write(struct.pack('<I%ss'%length, length, _x))
00066       _x = self.tip
00067       length = len(_x)
00068       if python3 or type(_x) == unicode:
00069         _x = _x.encode('utf-8')
00070         length = len(_x)
00071       buff.write(struct.pack('<I%ss'%length, length, _x))
00072       length = len(self.joint_positions)
00073       buff.write(_struct_I.pack(length))
00074       pattern = '<%sd'%length
00075       buff.write(struct.pack(pattern, *self.joint_positions))
00076     except struct.error as se: self._check_types(se)
00077     except TypeError as te: self._check_types(te)
00078 
00079   def deserialize(self, str):
00080     """
00081     unpack serialized message in str into this message instance
00082     :param str: byte array of serialized message, ``str``
00083     """
00084     try:
00085       end = 0
00086       start = end
00087       end += 4
00088       (length,) = _struct_I.unpack(str[start:end])
00089       start = end
00090       end += length
00091       if python3:
00092         self.root = str[start:end].decode('utf-8')
00093       else:
00094         self.root = str[start:end]
00095       start = end
00096       end += 4
00097       (length,) = _struct_I.unpack(str[start:end])
00098       start = end
00099       end += length
00100       if python3:
00101         self.tip = str[start:end].decode('utf-8')
00102       else:
00103         self.tip = str[start:end]
00104       start = end
00105       end += 4
00106       (length,) = _struct_I.unpack(str[start:end])
00107       pattern = '<%sd'%length
00108       start = end
00109       end += struct.calcsize(pattern)
00110       self.joint_positions = struct.unpack(pattern, str[start:end])
00111       return self
00112     except struct.error as e:
00113       raise genpy.DeserializationError(e) #most likely buffer underfill
00114 
00115 
00116   def serialize_numpy(self, buff, numpy):
00117     """
00118     serialize message with numpy array types into buffer
00119     :param buff: buffer, ``StringIO``
00120     :param numpy: numpy python module
00121     """
00122     try:
00123       _x = self.root
00124       length = len(_x)
00125       if python3 or type(_x) == unicode:
00126         _x = _x.encode('utf-8')
00127         length = len(_x)
00128       buff.write(struct.pack('<I%ss'%length, length, _x))
00129       _x = self.tip
00130       length = len(_x)
00131       if python3 or type(_x) == unicode:
00132         _x = _x.encode('utf-8')
00133         length = len(_x)
00134       buff.write(struct.pack('<I%ss'%length, length, _x))
00135       length = len(self.joint_positions)
00136       buff.write(_struct_I.pack(length))
00137       pattern = '<%sd'%length
00138       buff.write(self.joint_positions.tostring())
00139     except struct.error as se: self._check_types(se)
00140     except TypeError as te: self._check_types(te)
00141 
00142   def deserialize_numpy(self, str, numpy):
00143     """
00144     unpack serialized message in str into this message instance using numpy for array types
00145     :param str: byte array of serialized message, ``str``
00146     :param numpy: numpy python module
00147     """
00148     try:
00149       end = 0
00150       start = end
00151       end += 4
00152       (length,) = _struct_I.unpack(str[start:end])
00153       start = end
00154       end += length
00155       if python3:
00156         self.root = str[start:end].decode('utf-8')
00157       else:
00158         self.root = str[start:end]
00159       start = end
00160       end += 4
00161       (length,) = _struct_I.unpack(str[start:end])
00162       start = end
00163       end += length
00164       if python3:
00165         self.tip = str[start:end].decode('utf-8')
00166       else:
00167         self.tip = str[start:end]
00168       start = end
00169       end += 4
00170       (length,) = _struct_I.unpack(str[start:end])
00171       pattern = '<%sd'%length
00172       start = end
00173       end += struct.calcsize(pattern)
00174       self.joint_positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00175       return self
00176     except struct.error as e:
00177       raise genpy.DeserializationError(e) #most likely buffer underfill
00178 
00179 _struct_I = genpy.struct_I
00180 """autogenerated by genpy from pr2_calibration_launch/FkTestResponse.msg. Do not edit."""
00181 import sys
00182 python3 = True if sys.hexversion > 0x03000000 else False
00183 import genpy
00184 import struct
00185 
00186 
00187 class FkTestResponse(genpy.Message):
00188   _md5sum = "e2248c2f30c5f3e010ed2e9434015c6e"
00189   _type = "pr2_calibration_launch/FkTestResponse"
00190   _has_header = False #flag to mark the presence of a Header object
00191   _full_text = """float64[] pos
00192 float64[] rot
00193 
00194 
00195 """
00196   __slots__ = ['pos','rot']
00197   _slot_types = ['float64[]','float64[]']
00198 
00199   def __init__(self, *args, **kwds):
00200     """
00201     Constructor. Any message fields that are implicitly/explicitly
00202     set to None will be assigned a default value. The recommend
00203     use is keyword arguments as this is more robust to future message
00204     changes.  You cannot mix in-order arguments and keyword arguments.
00205 
00206     The available fields are:
00207        pos,rot
00208 
00209     :param args: complete set of field values, in .msg order
00210     :param kwds: use keyword arguments corresponding to message field names
00211     to set specific fields.
00212     """
00213     if args or kwds:
00214       super(FkTestResponse, self).__init__(*args, **kwds)
00215       #message fields cannot be None, assign default values for those that are
00216       if self.pos is None:
00217         self.pos = []
00218       if self.rot is None:
00219         self.rot = []
00220     else:
00221       self.pos = []
00222       self.rot = []
00223 
00224   def _get_types(self):
00225     """
00226     internal API method
00227     """
00228     return self._slot_types
00229 
00230   def serialize(self, buff):
00231     """
00232     serialize message into buffer
00233     :param buff: buffer, ``StringIO``
00234     """
00235     try:
00236       length = len(self.pos)
00237       buff.write(_struct_I.pack(length))
00238       pattern = '<%sd'%length
00239       buff.write(struct.pack(pattern, *self.pos))
00240       length = len(self.rot)
00241       buff.write(_struct_I.pack(length))
00242       pattern = '<%sd'%length
00243       buff.write(struct.pack(pattern, *self.rot))
00244     except struct.error as se: self._check_types(se)
00245     except TypeError as te: self._check_types(te)
00246 
00247   def deserialize(self, str):
00248     """
00249     unpack serialized message in str into this message instance
00250     :param str: byte array of serialized message, ``str``
00251     """
00252     try:
00253       end = 0
00254       start = end
00255       end += 4
00256       (length,) = _struct_I.unpack(str[start:end])
00257       pattern = '<%sd'%length
00258       start = end
00259       end += struct.calcsize(pattern)
00260       self.pos = struct.unpack(pattern, str[start:end])
00261       start = end
00262       end += 4
00263       (length,) = _struct_I.unpack(str[start:end])
00264       pattern = '<%sd'%length
00265       start = end
00266       end += struct.calcsize(pattern)
00267       self.rot = struct.unpack(pattern, str[start:end])
00268       return self
00269     except struct.error as e:
00270       raise genpy.DeserializationError(e) #most likely buffer underfill
00271 
00272 
00273   def serialize_numpy(self, buff, numpy):
00274     """
00275     serialize message with numpy array types into buffer
00276     :param buff: buffer, ``StringIO``
00277     :param numpy: numpy python module
00278     """
00279     try:
00280       length = len(self.pos)
00281       buff.write(_struct_I.pack(length))
00282       pattern = '<%sd'%length
00283       buff.write(self.pos.tostring())
00284       length = len(self.rot)
00285       buff.write(_struct_I.pack(length))
00286       pattern = '<%sd'%length
00287       buff.write(self.rot.tostring())
00288     except struct.error as se: self._check_types(se)
00289     except TypeError as te: self._check_types(te)
00290 
00291   def deserialize_numpy(self, str, numpy):
00292     """
00293     unpack serialized message in str into this message instance using numpy for array types
00294     :param str: byte array of serialized message, ``str``
00295     :param numpy: numpy python module
00296     """
00297     try:
00298       end = 0
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       pattern = '<%sd'%length
00303       start = end
00304       end += struct.calcsize(pattern)
00305       self.pos = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00306       start = end
00307       end += 4
00308       (length,) = _struct_I.unpack(str[start:end])
00309       pattern = '<%sd'%length
00310       start = end
00311       end += struct.calcsize(pattern)
00312       self.rot = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00313       return self
00314     except struct.error as e:
00315       raise genpy.DeserializationError(e) #most likely buffer underfill
00316 
00317 _struct_I = genpy.struct_I
00318 class FkTest(object):
00319   _type          = 'pr2_calibration_launch/FkTest'
00320   _md5sum = 'd0aebb48bb1f10495921a75dfb81a75a'
00321   _request_class  = FkTestRequest
00322   _response_class = FkTestResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


pr2_calibration_launch
Author(s): Vijay Pradeep
autogenerated on Thu Aug 15 2013 13:02:00