$search
00001 """autogenerated by genmsg_py from EstimateBBRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class EstimateBBRequest(roslib.message.Message): 00008 _md5sum = "b6dedd97dda8ffb14bb6ada07363c51a" 00009 _type = "srs_env_model_percp/EstimateBBRequest" 00010 _has_header = True #flag to mark the presence of a Header object 00011 _full_text = """ 00012 00013 00014 Header header 00015 00016 00017 00018 int16[2] p1 00019 int16[2] p2 00020 00021 00022 int8 mode 00023 00024 ================================================================================ 00025 MSG: std_msgs/Header 00026 # Standard metadata for higher-level stamped data types. 00027 # This is generally used to communicate timestamped data 00028 # in a particular coordinate frame. 00029 # 00030 # sequence ID: consecutively increasing ID 00031 uint32 seq 00032 #Two-integer timestamp that is expressed as: 00033 # * stamp.secs: seconds (stamp_secs) since epoch 00034 # * stamp.nsecs: nanoseconds since stamp_secs 00035 # time-handling sugar is provided by the client library 00036 time stamp 00037 #Frame this data is associated with 00038 # 0: no frame 00039 # 1: global frame 00040 string frame_id 00041 00042 """ 00043 __slots__ = ['header','p1','p2','mode'] 00044 _slot_types = ['Header','int16[2]','int16[2]','int8'] 00045 00046 def __init__(self, *args, **kwds): 00047 """ 00048 Constructor. Any message fields that are implicitly/explicitly 00049 set to None will be assigned a default value. The recommend 00050 use is keyword arguments as this is more robust to future message 00051 changes. You cannot mix in-order arguments and keyword arguments. 00052 00053 The available fields are: 00054 header,p1,p2,mode 00055 00056 @param args: complete set of field values, in .msg order 00057 @param kwds: use keyword arguments corresponding to message field names 00058 to set specific fields. 00059 """ 00060 if args or kwds: 00061 super(EstimateBBRequest, self).__init__(*args, **kwds) 00062 #message fields cannot be None, assign default values for those that are 00063 if self.header is None: 00064 self.header = std_msgs.msg._Header.Header() 00065 if self.p1 is None: 00066 self.p1 = [0,0] 00067 if self.p2 is None: 00068 self.p2 = [0,0] 00069 if self.mode is None: 00070 self.mode = 0 00071 else: 00072 self.header = std_msgs.msg._Header.Header() 00073 self.p1 = [0,0] 00074 self.p2 = [0,0] 00075 self.mode = 0 00076 00077 def _get_types(self): 00078 """ 00079 internal API method 00080 """ 00081 return self._slot_types 00082 00083 def serialize(self, buff): 00084 """ 00085 serialize message into buffer 00086 @param buff: buffer 00087 @type buff: StringIO 00088 """ 00089 try: 00090 _x = self 00091 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00092 _x = self.header.frame_id 00093 length = len(_x) 00094 buff.write(struct.pack('<I%ss'%length, length, _x)) 00095 buff.write(_struct_2h.pack(*self.p1)) 00096 buff.write(_struct_2h.pack(*self.p2)) 00097 buff.write(_struct_b.pack(self.mode)) 00098 except struct.error as se: self._check_types(se) 00099 except TypeError as te: self._check_types(te) 00100 00101 def deserialize(self, str): 00102 """ 00103 unpack serialized message in str into this message instance 00104 @param str: byte array of serialized message 00105 @type str: str 00106 """ 00107 try: 00108 if self.header is None: 00109 self.header = std_msgs.msg._Header.Header() 00110 end = 0 00111 _x = self 00112 start = end 00113 end += 12 00114 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00115 start = end 00116 end += 4 00117 (length,) = _struct_I.unpack(str[start:end]) 00118 start = end 00119 end += length 00120 self.header.frame_id = str[start:end] 00121 start = end 00122 end += 4 00123 self.p1 = _struct_2h.unpack(str[start:end]) 00124 start = end 00125 end += 4 00126 self.p2 = _struct_2h.unpack(str[start:end]) 00127 start = end 00128 end += 1 00129 (self.mode,) = _struct_b.unpack(str[start:end]) 00130 return self 00131 except struct.error as e: 00132 raise roslib.message.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 00139 @type buff: StringIO 00140 @param numpy: numpy python module 00141 @type numpy module 00142 """ 00143 try: 00144 _x = self 00145 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00146 _x = self.header.frame_id 00147 length = len(_x) 00148 buff.write(struct.pack('<I%ss'%length, length, _x)) 00149 buff.write(self.p1.tostring()) 00150 buff.write(self.p2.tostring()) 00151 buff.write(_struct_b.pack(self.mode)) 00152 except struct.error as se: self._check_types(se) 00153 except TypeError as te: self._check_types(te) 00154 00155 def deserialize_numpy(self, str, numpy): 00156 """ 00157 unpack serialized message in str into this message instance using numpy for array types 00158 @param str: byte array of serialized message 00159 @type str: str 00160 @param numpy: numpy python module 00161 @type numpy: module 00162 """ 00163 try: 00164 if self.header is None: 00165 self.header = std_msgs.msg._Header.Header() 00166 end = 0 00167 _x = self 00168 start = end 00169 end += 12 00170 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00171 start = end 00172 end += 4 00173 (length,) = _struct_I.unpack(str[start:end]) 00174 start = end 00175 end += length 00176 self.header.frame_id = str[start:end] 00177 start = end 00178 end += 4 00179 self.p1 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2) 00180 start = end 00181 end += 4 00182 self.p2 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2) 00183 start = end 00184 end += 1 00185 (self.mode,) = _struct_b.unpack(str[start:end]) 00186 return self 00187 except struct.error as e: 00188 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00189 00190 _struct_I = roslib.message.struct_I 00191 _struct_3I = struct.Struct("<3I") 00192 _struct_b = struct.Struct("<b") 00193 _struct_2h = struct.Struct("<2h") 00194 """autogenerated by genmsg_py from EstimateBBResponse.msg. Do not edit.""" 00195 import roslib.message 00196 import struct 00197 00198 import geometry_msgs.msg 00199 00200 class EstimateBBResponse(roslib.message.Message): 00201 _md5sum = "67df431f59611afc0dd11ada2e7229f3" 00202 _type = "srs_env_model_percp/EstimateBBResponse" 00203 _has_header = False #flag to mark the presence of a Header object 00204 _full_text = """ 00205 00206 00207 00208 00209 float32[3] p1 00210 float32[3] p2 00211 float32[3] p3 00212 float32[3] p4 00213 float32[3] p5 00214 float32[3] p6 00215 float32[3] p7 00216 float32[3] p8 00217 00218 00219 geometry_msgs/Pose pose 00220 00221 00222 00223 geometry_msgs/Vector3 scale 00224 00225 00226 00227 ================================================================================ 00228 MSG: geometry_msgs/Pose 00229 # A representation of pose in free space, composed of postion and orientation. 00230 Point position 00231 Quaternion orientation 00232 00233 ================================================================================ 00234 MSG: geometry_msgs/Point 00235 # This contains the position of a point in free space 00236 float64 x 00237 float64 y 00238 float64 z 00239 00240 ================================================================================ 00241 MSG: geometry_msgs/Quaternion 00242 # This represents an orientation in free space in quaternion form. 00243 00244 float64 x 00245 float64 y 00246 float64 z 00247 float64 w 00248 00249 ================================================================================ 00250 MSG: geometry_msgs/Vector3 00251 # This represents a vector in free space. 00252 00253 float64 x 00254 float64 y 00255 float64 z 00256 """ 00257 __slots__ = ['p1','p2','p3','p4','p5','p6','p7','p8','pose','scale'] 00258 _slot_types = ['float32[3]','float32[3]','float32[3]','float32[3]','float32[3]','float32[3]','float32[3]','float32[3]','geometry_msgs/Pose','geometry_msgs/Vector3'] 00259 00260 def __init__(self, *args, **kwds): 00261 """ 00262 Constructor. Any message fields that are implicitly/explicitly 00263 set to None will be assigned a default value. The recommend 00264 use is keyword arguments as this is more robust to future message 00265 changes. You cannot mix in-order arguments and keyword arguments. 00266 00267 The available fields are: 00268 p1,p2,p3,p4,p5,p6,p7,p8,pose,scale 00269 00270 @param args: complete set of field values, in .msg order 00271 @param kwds: use keyword arguments corresponding to message field names 00272 to set specific fields. 00273 """ 00274 if args or kwds: 00275 super(EstimateBBResponse, self).__init__(*args, **kwds) 00276 #message fields cannot be None, assign default values for those that are 00277 if self.p1 is None: 00278 self.p1 = [0.,0.,0.] 00279 if self.p2 is None: 00280 self.p2 = [0.,0.,0.] 00281 if self.p3 is None: 00282 self.p3 = [0.,0.,0.] 00283 if self.p4 is None: 00284 self.p4 = [0.,0.,0.] 00285 if self.p5 is None: 00286 self.p5 = [0.,0.,0.] 00287 if self.p6 is None: 00288 self.p6 = [0.,0.,0.] 00289 if self.p7 is None: 00290 self.p7 = [0.,0.,0.] 00291 if self.p8 is None: 00292 self.p8 = [0.,0.,0.] 00293 if self.pose is None: 00294 self.pose = geometry_msgs.msg.Pose() 00295 if self.scale is None: 00296 self.scale = geometry_msgs.msg.Vector3() 00297 else: 00298 self.p1 = [0.,0.,0.] 00299 self.p2 = [0.,0.,0.] 00300 self.p3 = [0.,0.,0.] 00301 self.p4 = [0.,0.,0.] 00302 self.p5 = [0.,0.,0.] 00303 self.p6 = [0.,0.,0.] 00304 self.p7 = [0.,0.,0.] 00305 self.p8 = [0.,0.,0.] 00306 self.pose = geometry_msgs.msg.Pose() 00307 self.scale = geometry_msgs.msg.Vector3() 00308 00309 def _get_types(self): 00310 """ 00311 internal API method 00312 """ 00313 return self._slot_types 00314 00315 def serialize(self, buff): 00316 """ 00317 serialize message into buffer 00318 @param buff: buffer 00319 @type buff: StringIO 00320 """ 00321 try: 00322 buff.write(_struct_3f.pack(*self.p1)) 00323 buff.write(_struct_3f.pack(*self.p2)) 00324 buff.write(_struct_3f.pack(*self.p3)) 00325 buff.write(_struct_3f.pack(*self.p4)) 00326 buff.write(_struct_3f.pack(*self.p5)) 00327 buff.write(_struct_3f.pack(*self.p6)) 00328 buff.write(_struct_3f.pack(*self.p7)) 00329 buff.write(_struct_3f.pack(*self.p8)) 00330 _x = self 00331 buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z)) 00332 except struct.error as se: self._check_types(se) 00333 except TypeError as te: self._check_types(te) 00334 00335 def deserialize(self, str): 00336 """ 00337 unpack serialized message in str into this message instance 00338 @param str: byte array of serialized message 00339 @type str: str 00340 """ 00341 try: 00342 if self.pose is None: 00343 self.pose = geometry_msgs.msg.Pose() 00344 if self.scale is None: 00345 self.scale = geometry_msgs.msg.Vector3() 00346 end = 0 00347 start = end 00348 end += 12 00349 self.p1 = _struct_3f.unpack(str[start:end]) 00350 start = end 00351 end += 12 00352 self.p2 = _struct_3f.unpack(str[start:end]) 00353 start = end 00354 end += 12 00355 self.p3 = _struct_3f.unpack(str[start:end]) 00356 start = end 00357 end += 12 00358 self.p4 = _struct_3f.unpack(str[start:end]) 00359 start = end 00360 end += 12 00361 self.p5 = _struct_3f.unpack(str[start:end]) 00362 start = end 00363 end += 12 00364 self.p6 = _struct_3f.unpack(str[start:end]) 00365 start = end 00366 end += 12 00367 self.p7 = _struct_3f.unpack(str[start:end]) 00368 start = end 00369 end += 12 00370 self.p8 = _struct_3f.unpack(str[start:end]) 00371 _x = self 00372 start = end 00373 end += 80 00374 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_10d.unpack(str[start:end]) 00375 return self 00376 except struct.error as e: 00377 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00378 00379 00380 def serialize_numpy(self, buff, numpy): 00381 """ 00382 serialize message with numpy array types into buffer 00383 @param buff: buffer 00384 @type buff: StringIO 00385 @param numpy: numpy python module 00386 @type numpy module 00387 """ 00388 try: 00389 buff.write(self.p1.tostring()) 00390 buff.write(self.p2.tostring()) 00391 buff.write(self.p3.tostring()) 00392 buff.write(self.p4.tostring()) 00393 buff.write(self.p5.tostring()) 00394 buff.write(self.p6.tostring()) 00395 buff.write(self.p7.tostring()) 00396 buff.write(self.p8.tostring()) 00397 _x = self 00398 buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z)) 00399 except struct.error as se: self._check_types(se) 00400 except TypeError as te: self._check_types(te) 00401 00402 def deserialize_numpy(self, str, numpy): 00403 """ 00404 unpack serialized message in str into this message instance using numpy for array types 00405 @param str: byte array of serialized message 00406 @type str: str 00407 @param numpy: numpy python module 00408 @type numpy: module 00409 """ 00410 try: 00411 if self.pose is None: 00412 self.pose = geometry_msgs.msg.Pose() 00413 if self.scale is None: 00414 self.scale = geometry_msgs.msg.Vector3() 00415 end = 0 00416 start = end 00417 end += 12 00418 self.p1 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00419 start = end 00420 end += 12 00421 self.p2 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00422 start = end 00423 end += 12 00424 self.p3 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00425 start = end 00426 end += 12 00427 self.p4 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00428 start = end 00429 end += 12 00430 self.p5 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00431 start = end 00432 end += 12 00433 self.p6 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00434 start = end 00435 end += 12 00436 self.p7 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00437 start = end 00438 end += 12 00439 self.p8 = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3) 00440 _x = self 00441 start = end 00442 end += 80 00443 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_10d.unpack(str[start:end]) 00444 return self 00445 except struct.error as e: 00446 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00447 00448 _struct_I = roslib.message.struct_I 00449 _struct_3f = struct.Struct("<3f") 00450 _struct_10d = struct.Struct("<10d") 00451 class EstimateBB(roslib.message.ServiceDefinition): 00452 _type = 'srs_env_model_percp/EstimateBB' 00453 _md5sum = '130e4ca67ba701ca993f4e53a24d3b9e' 00454 _request_class = EstimateBBRequest 00455 _response_class = EstimateBBResponse