_getBodyDetections.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_body_detector/getBodyDetectionsRequest.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 getBodyDetectionsRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "srs_body_detector/getBodyDetectionsRequest"
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(getBodyDetectionsRequest, 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00049     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00072     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 srs_body_detector/getBodyDetectionsResponse.msg. Do not edit."""
00088 import sys
00089 python3 = True if sys.hexversion > 0x03000000 else False
00090 import genpy
00091 import struct
00092 
00093 import geometry_msgs.msg
00094 
00095 class getBodyDetectionsResponse(genpy.Message):
00096   _md5sum = "240e092e1ab6f63df32eca12154e1a3f"
00097   _type = "srs_body_detector/getBodyDetectionsResponse"
00098   _has_header = False #flag to mark the presence of a Header object
00099   _full_text = """
00100 geometry_msgs/Pose[] bodies_list
00101 
00102 
00103 ================================================================================
00104 MSG: geometry_msgs/Pose
00105 # A representation of pose in free space, composed of postion and orientation. 
00106 Point position
00107 Quaternion orientation
00108 
00109 ================================================================================
00110 MSG: geometry_msgs/Point
00111 # This contains the position of a point in free space
00112 float64 x
00113 float64 y
00114 float64 z
00115 
00116 ================================================================================
00117 MSG: geometry_msgs/Quaternion
00118 # This represents an orientation in free space in quaternion form.
00119 
00120 float64 x
00121 float64 y
00122 float64 z
00123 float64 w
00124 
00125 """
00126   __slots__ = ['bodies_list']
00127   _slot_types = ['geometry_msgs/Pose[]']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        bodies_list
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(getBodyDetectionsResponse, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.bodies_list is None:
00147         self.bodies_list = []
00148     else:
00149       self.bodies_list = []
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.bodies_list)
00164       buff.write(_struct_I.pack(length))
00165       for val1 in self.bodies_list:
00166         _v1 = val1.position
00167         _x = _v1
00168         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00169         _v2 = val1.orientation
00170         _x = _v2
00171         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00172     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00173     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00174 
00175   def deserialize(self, str):
00176     """
00177     unpack serialized message in str into this message instance
00178     :param str: byte array of serialized message, ``str``
00179     """
00180     try:
00181       if self.bodies_list is None:
00182         self.bodies_list = None
00183       end = 0
00184       start = end
00185       end += 4
00186       (length,) = _struct_I.unpack(str[start:end])
00187       self.bodies_list = []
00188       for i in range(0, length):
00189         val1 = geometry_msgs.msg.Pose()
00190         _v3 = val1.position
00191         _x = _v3
00192         start = end
00193         end += 24
00194         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00195         _v4 = val1.orientation
00196         _x = _v4
00197         start = end
00198         end += 32
00199         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00200         self.bodies_list.append(val1)
00201       return self
00202     except struct.error as e:
00203       raise genpy.DeserializationError(e) #most likely buffer underfill
00204 
00205 
00206   def serialize_numpy(self, buff, numpy):
00207     """
00208     serialize message with numpy array types into buffer
00209     :param buff: buffer, ``StringIO``
00210     :param numpy: numpy python module
00211     """
00212     try:
00213       length = len(self.bodies_list)
00214       buff.write(_struct_I.pack(length))
00215       for val1 in self.bodies_list:
00216         _v5 = val1.position
00217         _x = _v5
00218         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00219         _v6 = val1.orientation
00220         _x = _v6
00221         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00222     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00223     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00224 
00225   def deserialize_numpy(self, str, numpy):
00226     """
00227     unpack serialized message in str into this message instance using numpy for array types
00228     :param str: byte array of serialized message, ``str``
00229     :param numpy: numpy python module
00230     """
00231     try:
00232       if self.bodies_list is None:
00233         self.bodies_list = None
00234       end = 0
00235       start = end
00236       end += 4
00237       (length,) = _struct_I.unpack(str[start:end])
00238       self.bodies_list = []
00239       for i in range(0, length):
00240         val1 = geometry_msgs.msg.Pose()
00241         _v7 = val1.position
00242         _x = _v7
00243         start = end
00244         end += 24
00245         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00246         _v8 = val1.orientation
00247         _x = _v8
00248         start = end
00249         end += 32
00250         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00251         self.bodies_list.append(val1)
00252       return self
00253     except struct.error as e:
00254       raise genpy.DeserializationError(e) #most likely buffer underfill
00255 
00256 _struct_I = genpy.struct_I
00257 _struct_4d = struct.Struct("<4d")
00258 _struct_3d = struct.Struct("<3d")
00259 class getBodyDetections(object):
00260   _type          = 'srs_body_detector/getBodyDetections'
00261   _md5sum = '240e092e1ab6f63df32eca12154e1a3f'
00262   _request_class  = getBodyDetectionsRequest
00263   _response_class = getBodyDetectionsResponse


srs_body_detector
Author(s): Alex
autogenerated on Mon Oct 6 2014 09:12:44