_GazeboObjectState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_haptic_manipulation_in_clutter_srvs/GazeboObjectStateRequest.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 GazeboObjectStateRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "hrl_haptic_manipulation_in_clutter_srvs/GazeboObjectStateRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 """
00015   __slots__ = []
00016   _slot_types = []
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(GazeboObjectStateRequest, self).__init__(*args, **kwds)
00034 
00035   def _get_types(self):
00036     """
00037     internal API method
00038     """
00039     return self._slot_types
00040 
00041   def serialize(self, buff):
00042     """
00043     serialize message into buffer
00044     :param buff: buffer, ``StringIO``
00045     """
00046     try:
00047       pass
00048     except struct.error as se: self._check_types(se)
00049     except TypeError as te: self._check_types(te)
00050 
00051   def deserialize(self, str):
00052     """
00053     unpack serialized message in str into this message instance
00054     :param str: byte array of serialized message, ``str``
00055     """
00056     try:
00057       end = 0
00058       return self
00059     except struct.error as e:
00060       raise genpy.DeserializationError(e) #most likely buffer underfill
00061 
00062 
00063   def serialize_numpy(self, buff, numpy):
00064     """
00065     serialize message with numpy array types into buffer
00066     :param buff: buffer, ``StringIO``
00067     :param numpy: numpy python module
00068     """
00069     try:
00070       pass
00071     except struct.error as se: self._check_types(se)
00072     except TypeError as te: self._check_types(te)
00073 
00074   def deserialize_numpy(self, str, numpy):
00075     """
00076     unpack serialized message in str into this message instance using numpy for array types
00077     :param str: byte array of serialized message, ``str``
00078     :param numpy: numpy python module
00079     """
00080     try:
00081       end = 0
00082       return self
00083     except struct.error as e:
00084       raise genpy.DeserializationError(e) #most likely buffer underfill
00085 
00086 _struct_I = genpy.struct_I
00087 """autogenerated by genpy from hrl_haptic_manipulation_in_clutter_srvs/GazeboObjectStateResponse.msg. Do not edit."""
00088 import sys
00089 python3 = True if sys.hexversion > 0x03000000 else False
00090 import genpy
00091 import struct
00092 
00093 
00094 class GazeboObjectStateResponse(genpy.Message):
00095   _md5sum = "b6ebf1a89c13f9bca983dd7c449ac80a"
00096   _type = "hrl_haptic_manipulation_in_clutter_srvs/GazeboObjectStateResponse"
00097   _has_header = False #flag to mark the presence of a Header object
00098   _full_text = """string[] frame_names
00099 float64[] centers_x
00100 float64[] centers_y
00101 float64[] centers_z
00102 float64[] radius
00103 float64[] length
00104 bool[] static_flag
00105 
00106 
00107 """
00108   __slots__ = ['frame_names','centers_x','centers_y','centers_z','radius','length','static_flag']
00109   _slot_types = ['string[]','float64[]','float64[]','float64[]','float64[]','float64[]','bool[]']
00110 
00111   def __init__(self, *args, **kwds):
00112     """
00113     Constructor. Any message fields that are implicitly/explicitly
00114     set to None will be assigned a default value. The recommend
00115     use is keyword arguments as this is more robust to future message
00116     changes.  You cannot mix in-order arguments and keyword arguments.
00117 
00118     The available fields are:
00119        frame_names,centers_x,centers_y,centers_z,radius,length,static_flag
00120 
00121     :param args: complete set of field values, in .msg order
00122     :param kwds: use keyword arguments corresponding to message field names
00123     to set specific fields.
00124     """
00125     if args or kwds:
00126       super(GazeboObjectStateResponse, self).__init__(*args, **kwds)
00127       #message fields cannot be None, assign default values for those that are
00128       if self.frame_names is None:
00129         self.frame_names = []
00130       if self.centers_x is None:
00131         self.centers_x = []
00132       if self.centers_y is None:
00133         self.centers_y = []
00134       if self.centers_z is None:
00135         self.centers_z = []
00136       if self.radius is None:
00137         self.radius = []
00138       if self.length is None:
00139         self.length = []
00140       if self.static_flag is None:
00141         self.static_flag = []
00142     else:
00143       self.frame_names = []
00144       self.centers_x = []
00145       self.centers_y = []
00146       self.centers_z = []
00147       self.radius = []
00148       self.length = []
00149       self.static_flag = []
00150 
00151   def _get_types(self):
00152     """
00153     internal API method
00154     """
00155     return self._slot_types
00156 
00157   def serialize(self, buff):
00158     """
00159     serialize message into buffer
00160     :param buff: buffer, ``StringIO``
00161     """
00162     try:
00163       length = len(self.frame_names)
00164       buff.write(_struct_I.pack(length))
00165       for val1 in self.frame_names:
00166         length = len(val1)
00167         if python3 or type(val1) == unicode:
00168           val1 = val1.encode('utf-8')
00169           length = len(val1)
00170         buff.write(struct.pack('<I%ss'%length, length, val1))
00171       length = len(self.centers_x)
00172       buff.write(_struct_I.pack(length))
00173       pattern = '<%sd'%length
00174       buff.write(struct.pack(pattern, *self.centers_x))
00175       length = len(self.centers_y)
00176       buff.write(_struct_I.pack(length))
00177       pattern = '<%sd'%length
00178       buff.write(struct.pack(pattern, *self.centers_y))
00179       length = len(self.centers_z)
00180       buff.write(_struct_I.pack(length))
00181       pattern = '<%sd'%length
00182       buff.write(struct.pack(pattern, *self.centers_z))
00183       length = len(self.radius)
00184       buff.write(_struct_I.pack(length))
00185       pattern = '<%sd'%length
00186       buff.write(struct.pack(pattern, *self.radius))
00187       length = len(self.length)
00188       buff.write(_struct_I.pack(length))
00189       pattern = '<%sd'%length
00190       buff.write(struct.pack(pattern, *self.length))
00191       length = len(self.static_flag)
00192       buff.write(_struct_I.pack(length))
00193       pattern = '<%sB'%length
00194       buff.write(struct.pack(pattern, *self.static_flag))
00195     except struct.error as se: self._check_types(se)
00196     except TypeError as te: self._check_types(te)
00197 
00198   def deserialize(self, str):
00199     """
00200     unpack serialized message in str into this message instance
00201     :param str: byte array of serialized message, ``str``
00202     """
00203     try:
00204       end = 0
00205       start = end
00206       end += 4
00207       (length,) = _struct_I.unpack(str[start:end])
00208       self.frame_names = []
00209       for i in range(0, length):
00210         start = end
00211         end += 4
00212         (length,) = _struct_I.unpack(str[start:end])
00213         start = end
00214         end += length
00215         if python3:
00216           val1 = str[start:end].decode('utf-8')
00217         else:
00218           val1 = str[start:end]
00219         self.frame_names.append(val1)
00220       start = end
00221       end += 4
00222       (length,) = _struct_I.unpack(str[start:end])
00223       pattern = '<%sd'%length
00224       start = end
00225       end += struct.calcsize(pattern)
00226       self.centers_x = struct.unpack(pattern, str[start:end])
00227       start = end
00228       end += 4
00229       (length,) = _struct_I.unpack(str[start:end])
00230       pattern = '<%sd'%length
00231       start = end
00232       end += struct.calcsize(pattern)
00233       self.centers_y = struct.unpack(pattern, str[start:end])
00234       start = end
00235       end += 4
00236       (length,) = _struct_I.unpack(str[start:end])
00237       pattern = '<%sd'%length
00238       start = end
00239       end += struct.calcsize(pattern)
00240       self.centers_z = struct.unpack(pattern, str[start:end])
00241       start = end
00242       end += 4
00243       (length,) = _struct_I.unpack(str[start:end])
00244       pattern = '<%sd'%length
00245       start = end
00246       end += struct.calcsize(pattern)
00247       self.radius = struct.unpack(pattern, str[start:end])
00248       start = end
00249       end += 4
00250       (length,) = _struct_I.unpack(str[start:end])
00251       pattern = '<%sd'%length
00252       start = end
00253       end += struct.calcsize(pattern)
00254       self.length = struct.unpack(pattern, str[start:end])
00255       start = end
00256       end += 4
00257       (length,) = _struct_I.unpack(str[start:end])
00258       pattern = '<%sB'%length
00259       start = end
00260       end += struct.calcsize(pattern)
00261       self.static_flag = struct.unpack(pattern, str[start:end])
00262       self.static_flag = map(bool, self.static_flag)
00263       return self
00264     except struct.error as e:
00265       raise genpy.DeserializationError(e) #most likely buffer underfill
00266 
00267 
00268   def serialize_numpy(self, buff, numpy):
00269     """
00270     serialize message with numpy array types into buffer
00271     :param buff: buffer, ``StringIO``
00272     :param numpy: numpy python module
00273     """
00274     try:
00275       length = len(self.frame_names)
00276       buff.write(_struct_I.pack(length))
00277       for val1 in self.frame_names:
00278         length = len(val1)
00279         if python3 or type(val1) == unicode:
00280           val1 = val1.encode('utf-8')
00281           length = len(val1)
00282         buff.write(struct.pack('<I%ss'%length, length, val1))
00283       length = len(self.centers_x)
00284       buff.write(_struct_I.pack(length))
00285       pattern = '<%sd'%length
00286       buff.write(self.centers_x.tostring())
00287       length = len(self.centers_y)
00288       buff.write(_struct_I.pack(length))
00289       pattern = '<%sd'%length
00290       buff.write(self.centers_y.tostring())
00291       length = len(self.centers_z)
00292       buff.write(_struct_I.pack(length))
00293       pattern = '<%sd'%length
00294       buff.write(self.centers_z.tostring())
00295       length = len(self.radius)
00296       buff.write(_struct_I.pack(length))
00297       pattern = '<%sd'%length
00298       buff.write(self.radius.tostring())
00299       length = len(self.length)
00300       buff.write(_struct_I.pack(length))
00301       pattern = '<%sd'%length
00302       buff.write(self.length.tostring())
00303       length = len(self.static_flag)
00304       buff.write(_struct_I.pack(length))
00305       pattern = '<%sB'%length
00306       buff.write(self.static_flag.tostring())
00307     except struct.error as se: self._check_types(se)
00308     except TypeError as te: self._check_types(te)
00309 
00310   def deserialize_numpy(self, str, numpy):
00311     """
00312     unpack serialized message in str into this message instance using numpy for array types
00313     :param str: byte array of serialized message, ``str``
00314     :param numpy: numpy python module
00315     """
00316     try:
00317       end = 0
00318       start = end
00319       end += 4
00320       (length,) = _struct_I.unpack(str[start:end])
00321       self.frame_names = []
00322       for i in range(0, length):
00323         start = end
00324         end += 4
00325         (length,) = _struct_I.unpack(str[start:end])
00326         start = end
00327         end += length
00328         if python3:
00329           val1 = str[start:end].decode('utf-8')
00330         else:
00331           val1 = str[start:end]
00332         self.frame_names.append(val1)
00333       start = end
00334       end += 4
00335       (length,) = _struct_I.unpack(str[start:end])
00336       pattern = '<%sd'%length
00337       start = end
00338       end += struct.calcsize(pattern)
00339       self.centers_x = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00340       start = end
00341       end += 4
00342       (length,) = _struct_I.unpack(str[start:end])
00343       pattern = '<%sd'%length
00344       start = end
00345       end += struct.calcsize(pattern)
00346       self.centers_y = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00347       start = end
00348       end += 4
00349       (length,) = _struct_I.unpack(str[start:end])
00350       pattern = '<%sd'%length
00351       start = end
00352       end += struct.calcsize(pattern)
00353       self.centers_z = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00354       start = end
00355       end += 4
00356       (length,) = _struct_I.unpack(str[start:end])
00357       pattern = '<%sd'%length
00358       start = end
00359       end += struct.calcsize(pattern)
00360       self.radius = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00361       start = end
00362       end += 4
00363       (length,) = _struct_I.unpack(str[start:end])
00364       pattern = '<%sd'%length
00365       start = end
00366       end += struct.calcsize(pattern)
00367       self.length = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00368       start = end
00369       end += 4
00370       (length,) = _struct_I.unpack(str[start:end])
00371       pattern = '<%sB'%length
00372       start = end
00373       end += struct.calcsize(pattern)
00374       self.static_flag = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length)
00375       self.static_flag = map(bool, self.static_flag)
00376       return self
00377     except struct.error as e:
00378       raise genpy.DeserializationError(e) #most likely buffer underfill
00379 
00380 _struct_I = genpy.struct_I
00381 class GazeboObjectState(object):
00382   _type          = 'hrl_haptic_manipulation_in_clutter_srvs/GazeboObjectState'
00383   _md5sum = 'b6ebf1a89c13f9bca983dd7c449ac80a'
00384   _request_class  = GazeboObjectStateRequest
00385   _response_class = GazeboObjectStateResponse


hrl_haptic_manipulation_in_clutter_srvs
Author(s): Advait Jain. Advisor: Prof. Charlie Kemp. Healthcare Robotics Lab, Georgia Tech
autogenerated on Wed Nov 27 2013 12:08:22