$search
00001 """autogenerated by genmsg_py from getBodyDetectionsRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class getBodyDetectionsRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "srs_body_detector/getBodyDetectionsRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 """ 00013 __slots__ = [] 00014 _slot_types = [] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(getBodyDetectionsRequest, self).__init__(*args, **kwds) 00032 00033 def _get_types(self): 00034 """ 00035 internal API method 00036 """ 00037 return self._slot_types 00038 00039 def serialize(self, buff): 00040 """ 00041 serialize message into buffer 00042 @param buff: buffer 00043 @type buff: StringIO 00044 """ 00045 try: 00046 pass 00047 except struct.error as se: self._check_types(se) 00048 except TypeError as te: self._check_types(te) 00049 00050 def deserialize(self, str): 00051 """ 00052 unpack serialized message in str into this message instance 00053 @param str: byte array of serialized message 00054 @type str: str 00055 """ 00056 try: 00057 end = 0 00058 return self 00059 except struct.error as e: 00060 raise roslib.message.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 00067 @type buff: StringIO 00068 @param numpy: numpy python module 00069 @type numpy module 00070 """ 00071 try: 00072 pass 00073 except struct.error as se: self._check_types(se) 00074 except TypeError as te: self._check_types(te) 00075 00076 def deserialize_numpy(self, str, numpy): 00077 """ 00078 unpack serialized message in str into this message instance using numpy for array types 00079 @param str: byte array of serialized message 00080 @type str: str 00081 @param numpy: numpy python module 00082 @type numpy: module 00083 """ 00084 try: 00085 end = 0 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 _struct_I = roslib.message.struct_I 00091 """autogenerated by genmsg_py from getBodyDetectionsResponse.msg. Do not edit.""" 00092 import roslib.message 00093 import struct 00094 00095 import geometry_msgs.msg 00096 00097 class getBodyDetectionsResponse(roslib.message.Message): 00098 _md5sum = "240e092e1ab6f63df32eca12154e1a3f" 00099 _type = "srs_body_detector/getBodyDetectionsResponse" 00100 _has_header = False #flag to mark the presence of a Header object 00101 _full_text = """ 00102 geometry_msgs/Pose[] bodies_list 00103 00104 00105 ================================================================================ 00106 MSG: geometry_msgs/Pose 00107 # A representation of pose in free space, composed of postion and orientation. 00108 Point position 00109 Quaternion orientation 00110 00111 ================================================================================ 00112 MSG: geometry_msgs/Point 00113 # This contains the position of a point in free space 00114 float64 x 00115 float64 y 00116 float64 z 00117 00118 ================================================================================ 00119 MSG: geometry_msgs/Quaternion 00120 # This represents an orientation in free space in quaternion form. 00121 00122 float64 x 00123 float64 y 00124 float64 z 00125 float64 w 00126 00127 """ 00128 __slots__ = ['bodies_list'] 00129 _slot_types = ['geometry_msgs/Pose[]'] 00130 00131 def __init__(self, *args, **kwds): 00132 """ 00133 Constructor. Any message fields that are implicitly/explicitly 00134 set to None will be assigned a default value. The recommend 00135 use is keyword arguments as this is more robust to future message 00136 changes. You cannot mix in-order arguments and keyword arguments. 00137 00138 The available fields are: 00139 bodies_list 00140 00141 @param args: complete set of field values, in .msg order 00142 @param kwds: use keyword arguments corresponding to message field names 00143 to set specific fields. 00144 """ 00145 if args or kwds: 00146 super(getBodyDetectionsResponse, self).__init__(*args, **kwds) 00147 #message fields cannot be None, assign default values for those that are 00148 if self.bodies_list is None: 00149 self.bodies_list = [] 00150 else: 00151 self.bodies_list = [] 00152 00153 def _get_types(self): 00154 """ 00155 internal API method 00156 """ 00157 return self._slot_types 00158 00159 def serialize(self, buff): 00160 """ 00161 serialize message into buffer 00162 @param buff: buffer 00163 @type buff: StringIO 00164 """ 00165 try: 00166 length = len(self.bodies_list) 00167 buff.write(_struct_I.pack(length)) 00168 for val1 in self.bodies_list: 00169 _v1 = val1.position 00170 _x = _v1 00171 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00172 _v2 = val1.orientation 00173 _x = _v2 00174 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00175 except struct.error as se: self._check_types(se) 00176 except TypeError as te: self._check_types(te) 00177 00178 def deserialize(self, str): 00179 """ 00180 unpack serialized message in str into this message instance 00181 @param str: byte array of serialized message 00182 @type str: str 00183 """ 00184 try: 00185 end = 0 00186 start = end 00187 end += 4 00188 (length,) = _struct_I.unpack(str[start:end]) 00189 self.bodies_list = [] 00190 for i in range(0, length): 00191 val1 = geometry_msgs.msg.Pose() 00192 _v3 = val1.position 00193 _x = _v3 00194 start = end 00195 end += 24 00196 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00197 _v4 = val1.orientation 00198 _x = _v4 00199 start = end 00200 end += 32 00201 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00202 self.bodies_list.append(val1) 00203 return self 00204 except struct.error as e: 00205 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00206 00207 00208 def serialize_numpy(self, buff, numpy): 00209 """ 00210 serialize message with numpy array types into buffer 00211 @param buff: buffer 00212 @type buff: StringIO 00213 @param numpy: numpy python module 00214 @type numpy module 00215 """ 00216 try: 00217 length = len(self.bodies_list) 00218 buff.write(_struct_I.pack(length)) 00219 for val1 in self.bodies_list: 00220 _v5 = val1.position 00221 _x = _v5 00222 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00223 _v6 = val1.orientation 00224 _x = _v6 00225 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00226 except struct.error as se: self._check_types(se) 00227 except TypeError as te: self._check_types(te) 00228 00229 def deserialize_numpy(self, str, numpy): 00230 """ 00231 unpack serialized message in str into this message instance using numpy for array types 00232 @param str: byte array of serialized message 00233 @type str: str 00234 @param numpy: numpy python module 00235 @type numpy: module 00236 """ 00237 try: 00238 end = 0 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 self.bodies_list = [] 00243 for i in range(0, length): 00244 val1 = geometry_msgs.msg.Pose() 00245 _v7 = val1.position 00246 _x = _v7 00247 start = end 00248 end += 24 00249 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00250 _v8 = val1.orientation 00251 _x = _v8 00252 start = end 00253 end += 32 00254 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00255 self.bodies_list.append(val1) 00256 return self 00257 except struct.error as e: 00258 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00259 00260 _struct_I = roslib.message.struct_I 00261 _struct_4d = struct.Struct("<4d") 00262 _struct_3d = struct.Struct("<3d") 00263 class getBodyDetections(roslib.message.ServiceDefinition): 00264 _type = 'srs_body_detector/getBodyDetections' 00265 _md5sum = '240e092e1ab6f63df32eca12154e1a3f' 00266 _request_class = getBodyDetectionsRequest 00267 _response_class = getBodyDetectionsResponse