$search
00001 """autogenerated by genmsg_py from InsertObjectRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 import sensor_msgs.msg 00007 00008 class InsertObjectRequest(roslib.message.Message): 00009 _md5sum = "4045f8a3a36be31cf6b0274a21ca2bb4" 00010 _type = "srs_object_database_msgs/InsertObjectRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """ 00013 00014 00015 00016 string function 00017 00018 00019 int32 model_id 00020 00021 00022 string model_name 00023 00024 00025 string model_desc 00026 00027 00028 string model_category 00029 00030 00031 float32 model_x_size 00032 00033 00034 float32 model_y_size 00035 00036 00037 float32 model_z_size 00038 00039 00040 string model_basic_shape 00041 00042 00043 bool graspable 00044 00045 00046 00047 uint8[] pcl 00048 uint8[] fpt 00049 sensor_msgs/Image img 00050 string image_type 00051 uint8[] data_grasp 00052 00053 uint8[] data_mesh 00054 string meshType 00055 uint8[] urdf 00056 00057 00058 ================================================================================ 00059 MSG: sensor_msgs/Image 00060 # This message contains an uncompressed image 00061 # (0, 0) is at top-left corner of image 00062 # 00063 00064 Header header # Header timestamp should be acquisition time of image 00065 # Header frame_id should be optical frame of camera 00066 # origin of frame should be optical center of cameara 00067 # +x should point to the right in the image 00068 # +y should point down in the image 00069 # +z should point into to plane of the image 00070 # If the frame_id here and the frame_id of the CameraInfo 00071 # message associated with the image conflict 00072 # the behavior is undefined 00073 00074 uint32 height # image height, that is, number of rows 00075 uint32 width # image width, that is, number of columns 00076 00077 # The legal values for encoding are in file src/image_encodings.cpp 00078 # If you want to standardize a new string format, join 00079 # ros-users@lists.sourceforge.net and send an email proposing a new encoding. 00080 00081 string encoding # Encoding of pixels -- channel meaning, ordering, size 00082 # taken from the list of strings in src/image_encodings.cpp 00083 00084 uint8 is_bigendian # is this data bigendian? 00085 uint32 step # Full row length in bytes 00086 uint8[] data # actual matrix data, size is (step * rows) 00087 00088 ================================================================================ 00089 MSG: std_msgs/Header 00090 # Standard metadata for higher-level stamped data types. 00091 # This is generally used to communicate timestamped data 00092 # in a particular coordinate frame. 00093 # 00094 # sequence ID: consecutively increasing ID 00095 uint32 seq 00096 #Two-integer timestamp that is expressed as: 00097 # * stamp.secs: seconds (stamp_secs) since epoch 00098 # * stamp.nsecs: nanoseconds since stamp_secs 00099 # time-handling sugar is provided by the client library 00100 time stamp 00101 #Frame this data is associated with 00102 # 0: no frame 00103 # 1: global frame 00104 string frame_id 00105 00106 """ 00107 __slots__ = ['function','model_id','model_name','model_desc','model_category','model_x_size','model_y_size','model_z_size','model_basic_shape','graspable','pcl','fpt','img','image_type','data_grasp','data_mesh','meshType','urdf'] 00108 _slot_types = ['string','int32','string','string','string','float32','float32','float32','string','bool','uint8[]','uint8[]','sensor_msgs/Image','string','uint8[]','uint8[]','string','uint8[]'] 00109 00110 def __init__(self, *args, **kwds): 00111 """ 00112 Constructor. Any message fields that are implicitly/explicitly 00113 set to None will be assigned a default value. The recommend 00114 use is keyword arguments as this is more robust to future message 00115 changes. You cannot mix in-order arguments and keyword arguments. 00116 00117 The available fields are: 00118 function,model_id,model_name,model_desc,model_category,model_x_size,model_y_size,model_z_size,model_basic_shape,graspable,pcl,fpt,img,image_type,data_grasp,data_mesh,meshType,urdf 00119 00120 @param args: complete set of field values, in .msg order 00121 @param kwds: use keyword arguments corresponding to message field names 00122 to set specific fields. 00123 """ 00124 if args or kwds: 00125 super(InsertObjectRequest, self).__init__(*args, **kwds) 00126 #message fields cannot be None, assign default values for those that are 00127 if self.function is None: 00128 self.function = '' 00129 if self.model_id is None: 00130 self.model_id = 0 00131 if self.model_name is None: 00132 self.model_name = '' 00133 if self.model_desc is None: 00134 self.model_desc = '' 00135 if self.model_category is None: 00136 self.model_category = '' 00137 if self.model_x_size is None: 00138 self.model_x_size = 0. 00139 if self.model_y_size is None: 00140 self.model_y_size = 0. 00141 if self.model_z_size is None: 00142 self.model_z_size = 0. 00143 if self.model_basic_shape is None: 00144 self.model_basic_shape = '' 00145 if self.graspable is None: 00146 self.graspable = False 00147 if self.pcl is None: 00148 self.pcl = '' 00149 if self.fpt is None: 00150 self.fpt = '' 00151 if self.img is None: 00152 self.img = sensor_msgs.msg.Image() 00153 if self.image_type is None: 00154 self.image_type = '' 00155 if self.data_grasp is None: 00156 self.data_grasp = '' 00157 if self.data_mesh is None: 00158 self.data_mesh = '' 00159 if self.meshType is None: 00160 self.meshType = '' 00161 if self.urdf is None: 00162 self.urdf = '' 00163 else: 00164 self.function = '' 00165 self.model_id = 0 00166 self.model_name = '' 00167 self.model_desc = '' 00168 self.model_category = '' 00169 self.model_x_size = 0. 00170 self.model_y_size = 0. 00171 self.model_z_size = 0. 00172 self.model_basic_shape = '' 00173 self.graspable = False 00174 self.pcl = '' 00175 self.fpt = '' 00176 self.img = sensor_msgs.msg.Image() 00177 self.image_type = '' 00178 self.data_grasp = '' 00179 self.data_mesh = '' 00180 self.meshType = '' 00181 self.urdf = '' 00182 00183 def _get_types(self): 00184 """ 00185 internal API method 00186 """ 00187 return self._slot_types 00188 00189 def serialize(self, buff): 00190 """ 00191 serialize message into buffer 00192 @param buff: buffer 00193 @type buff: StringIO 00194 """ 00195 try: 00196 _x = self.function 00197 length = len(_x) 00198 buff.write(struct.pack('<I%ss'%length, length, _x)) 00199 buff.write(_struct_i.pack(self.model_id)) 00200 _x = self.model_name 00201 length = len(_x) 00202 buff.write(struct.pack('<I%ss'%length, length, _x)) 00203 _x = self.model_desc 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = self.model_category 00207 length = len(_x) 00208 buff.write(struct.pack('<I%ss'%length, length, _x)) 00209 _x = self 00210 buff.write(_struct_3f.pack(_x.model_x_size, _x.model_y_size, _x.model_z_size)) 00211 _x = self.model_basic_shape 00212 length = len(_x) 00213 buff.write(struct.pack('<I%ss'%length, length, _x)) 00214 buff.write(_struct_B.pack(self.graspable)) 00215 _x = self.pcl 00216 length = len(_x) 00217 # - if encoded as a list instead, serialize as bytes instead of string 00218 if type(_x) in [list, tuple]: 00219 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00220 else: 00221 buff.write(struct.pack('<I%ss'%length, length, _x)) 00222 _x = self.fpt 00223 length = len(_x) 00224 # - if encoded as a list instead, serialize as bytes instead of string 00225 if type(_x) in [list, tuple]: 00226 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00227 else: 00228 buff.write(struct.pack('<I%ss'%length, length, _x)) 00229 _x = self 00230 buff.write(_struct_3I.pack(_x.img.header.seq, _x.img.header.stamp.secs, _x.img.header.stamp.nsecs)) 00231 _x = self.img.header.frame_id 00232 length = len(_x) 00233 buff.write(struct.pack('<I%ss'%length, length, _x)) 00234 _x = self 00235 buff.write(_struct_2I.pack(_x.img.height, _x.img.width)) 00236 _x = self.img.encoding 00237 length = len(_x) 00238 buff.write(struct.pack('<I%ss'%length, length, _x)) 00239 _x = self 00240 buff.write(_struct_BI.pack(_x.img.is_bigendian, _x.img.step)) 00241 _x = self.img.data 00242 length = len(_x) 00243 # - if encoded as a list instead, serialize as bytes instead of string 00244 if type(_x) in [list, tuple]: 00245 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00246 else: 00247 buff.write(struct.pack('<I%ss'%length, length, _x)) 00248 _x = self.image_type 00249 length = len(_x) 00250 buff.write(struct.pack('<I%ss'%length, length, _x)) 00251 _x = self.data_grasp 00252 length = len(_x) 00253 # - if encoded as a list instead, serialize as bytes instead of string 00254 if type(_x) in [list, tuple]: 00255 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00256 else: 00257 buff.write(struct.pack('<I%ss'%length, length, _x)) 00258 _x = self.data_mesh 00259 length = len(_x) 00260 # - if encoded as a list instead, serialize as bytes instead of string 00261 if type(_x) in [list, tuple]: 00262 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00263 else: 00264 buff.write(struct.pack('<I%ss'%length, length, _x)) 00265 _x = self.meshType 00266 length = len(_x) 00267 buff.write(struct.pack('<I%ss'%length, length, _x)) 00268 _x = self.urdf 00269 length = len(_x) 00270 # - if encoded as a list instead, serialize as bytes instead of string 00271 if type(_x) in [list, tuple]: 00272 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00273 else: 00274 buff.write(struct.pack('<I%ss'%length, length, _x)) 00275 except struct.error as se: self._check_types(se) 00276 except TypeError as te: self._check_types(te) 00277 00278 def deserialize(self, str): 00279 """ 00280 unpack serialized message in str into this message instance 00281 @param str: byte array of serialized message 00282 @type str: str 00283 """ 00284 try: 00285 if self.img is None: 00286 self.img = sensor_msgs.msg.Image() 00287 end = 0 00288 start = end 00289 end += 4 00290 (length,) = _struct_I.unpack(str[start:end]) 00291 start = end 00292 end += length 00293 self.function = str[start:end] 00294 start = end 00295 end += 4 00296 (self.model_id,) = _struct_i.unpack(str[start:end]) 00297 start = end 00298 end += 4 00299 (length,) = _struct_I.unpack(str[start:end]) 00300 start = end 00301 end += length 00302 self.model_name = str[start:end] 00303 start = end 00304 end += 4 00305 (length,) = _struct_I.unpack(str[start:end]) 00306 start = end 00307 end += length 00308 self.model_desc = str[start:end] 00309 start = end 00310 end += 4 00311 (length,) = _struct_I.unpack(str[start:end]) 00312 start = end 00313 end += length 00314 self.model_category = str[start:end] 00315 _x = self 00316 start = end 00317 end += 12 00318 (_x.model_x_size, _x.model_y_size, _x.model_z_size,) = _struct_3f.unpack(str[start:end]) 00319 start = end 00320 end += 4 00321 (length,) = _struct_I.unpack(str[start:end]) 00322 start = end 00323 end += length 00324 self.model_basic_shape = str[start:end] 00325 start = end 00326 end += 1 00327 (self.graspable,) = _struct_B.unpack(str[start:end]) 00328 self.graspable = bool(self.graspable) 00329 start = end 00330 end += 4 00331 (length,) = _struct_I.unpack(str[start:end]) 00332 start = end 00333 end += length 00334 self.pcl = str[start:end] 00335 start = end 00336 end += 4 00337 (length,) = _struct_I.unpack(str[start:end]) 00338 start = end 00339 end += length 00340 self.fpt = str[start:end] 00341 _x = self 00342 start = end 00343 end += 12 00344 (_x.img.header.seq, _x.img.header.stamp.secs, _x.img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00345 start = end 00346 end += 4 00347 (length,) = _struct_I.unpack(str[start:end]) 00348 start = end 00349 end += length 00350 self.img.header.frame_id = str[start:end] 00351 _x = self 00352 start = end 00353 end += 8 00354 (_x.img.height, _x.img.width,) = _struct_2I.unpack(str[start:end]) 00355 start = end 00356 end += 4 00357 (length,) = _struct_I.unpack(str[start:end]) 00358 start = end 00359 end += length 00360 self.img.encoding = str[start:end] 00361 _x = self 00362 start = end 00363 end += 5 00364 (_x.img.is_bigendian, _x.img.step,) = _struct_BI.unpack(str[start:end]) 00365 start = end 00366 end += 4 00367 (length,) = _struct_I.unpack(str[start:end]) 00368 start = end 00369 end += length 00370 self.img.data = str[start:end] 00371 start = end 00372 end += 4 00373 (length,) = _struct_I.unpack(str[start:end]) 00374 start = end 00375 end += length 00376 self.image_type = str[start:end] 00377 start = end 00378 end += 4 00379 (length,) = _struct_I.unpack(str[start:end]) 00380 start = end 00381 end += length 00382 self.data_grasp = str[start:end] 00383 start = end 00384 end += 4 00385 (length,) = _struct_I.unpack(str[start:end]) 00386 start = end 00387 end += length 00388 self.data_mesh = str[start:end] 00389 start = end 00390 end += 4 00391 (length,) = _struct_I.unpack(str[start:end]) 00392 start = end 00393 end += length 00394 self.meshType = str[start:end] 00395 start = end 00396 end += 4 00397 (length,) = _struct_I.unpack(str[start:end]) 00398 start = end 00399 end += length 00400 self.urdf = str[start:end] 00401 return self 00402 except struct.error as e: 00403 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00404 00405 00406 def serialize_numpy(self, buff, numpy): 00407 """ 00408 serialize message with numpy array types into buffer 00409 @param buff: buffer 00410 @type buff: StringIO 00411 @param numpy: numpy python module 00412 @type numpy module 00413 """ 00414 try: 00415 _x = self.function 00416 length = len(_x) 00417 buff.write(struct.pack('<I%ss'%length, length, _x)) 00418 buff.write(_struct_i.pack(self.model_id)) 00419 _x = self.model_name 00420 length = len(_x) 00421 buff.write(struct.pack('<I%ss'%length, length, _x)) 00422 _x = self.model_desc 00423 length = len(_x) 00424 buff.write(struct.pack('<I%ss'%length, length, _x)) 00425 _x = self.model_category 00426 length = len(_x) 00427 buff.write(struct.pack('<I%ss'%length, length, _x)) 00428 _x = self 00429 buff.write(_struct_3f.pack(_x.model_x_size, _x.model_y_size, _x.model_z_size)) 00430 _x = self.model_basic_shape 00431 length = len(_x) 00432 buff.write(struct.pack('<I%ss'%length, length, _x)) 00433 buff.write(_struct_B.pack(self.graspable)) 00434 _x = self.pcl 00435 length = len(_x) 00436 # - if encoded as a list instead, serialize as bytes instead of string 00437 if type(_x) in [list, tuple]: 00438 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00439 else: 00440 buff.write(struct.pack('<I%ss'%length, length, _x)) 00441 _x = self.fpt 00442 length = len(_x) 00443 # - if encoded as a list instead, serialize as bytes instead of string 00444 if type(_x) in [list, tuple]: 00445 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00446 else: 00447 buff.write(struct.pack('<I%ss'%length, length, _x)) 00448 _x = self 00449 buff.write(_struct_3I.pack(_x.img.header.seq, _x.img.header.stamp.secs, _x.img.header.stamp.nsecs)) 00450 _x = self.img.header.frame_id 00451 length = len(_x) 00452 buff.write(struct.pack('<I%ss'%length, length, _x)) 00453 _x = self 00454 buff.write(_struct_2I.pack(_x.img.height, _x.img.width)) 00455 _x = self.img.encoding 00456 length = len(_x) 00457 buff.write(struct.pack('<I%ss'%length, length, _x)) 00458 _x = self 00459 buff.write(_struct_BI.pack(_x.img.is_bigendian, _x.img.step)) 00460 _x = self.img.data 00461 length = len(_x) 00462 # - if encoded as a list instead, serialize as bytes instead of string 00463 if type(_x) in [list, tuple]: 00464 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00465 else: 00466 buff.write(struct.pack('<I%ss'%length, length, _x)) 00467 _x = self.image_type 00468 length = len(_x) 00469 buff.write(struct.pack('<I%ss'%length, length, _x)) 00470 _x = self.data_grasp 00471 length = len(_x) 00472 # - if encoded as a list instead, serialize as bytes instead of string 00473 if type(_x) in [list, tuple]: 00474 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00475 else: 00476 buff.write(struct.pack('<I%ss'%length, length, _x)) 00477 _x = self.data_mesh 00478 length = len(_x) 00479 # - if encoded as a list instead, serialize as bytes instead of string 00480 if type(_x) in [list, tuple]: 00481 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00482 else: 00483 buff.write(struct.pack('<I%ss'%length, length, _x)) 00484 _x = self.meshType 00485 length = len(_x) 00486 buff.write(struct.pack('<I%ss'%length, length, _x)) 00487 _x = self.urdf 00488 length = len(_x) 00489 # - if encoded as a list instead, serialize as bytes instead of string 00490 if type(_x) in [list, tuple]: 00491 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00492 else: 00493 buff.write(struct.pack('<I%ss'%length, length, _x)) 00494 except struct.error as se: self._check_types(se) 00495 except TypeError as te: self._check_types(te) 00496 00497 def deserialize_numpy(self, str, numpy): 00498 """ 00499 unpack serialized message in str into this message instance using numpy for array types 00500 @param str: byte array of serialized message 00501 @type str: str 00502 @param numpy: numpy python module 00503 @type numpy: module 00504 """ 00505 try: 00506 if self.img is None: 00507 self.img = sensor_msgs.msg.Image() 00508 end = 0 00509 start = end 00510 end += 4 00511 (length,) = _struct_I.unpack(str[start:end]) 00512 start = end 00513 end += length 00514 self.function = str[start:end] 00515 start = end 00516 end += 4 00517 (self.model_id,) = _struct_i.unpack(str[start:end]) 00518 start = end 00519 end += 4 00520 (length,) = _struct_I.unpack(str[start:end]) 00521 start = end 00522 end += length 00523 self.model_name = str[start:end] 00524 start = end 00525 end += 4 00526 (length,) = _struct_I.unpack(str[start:end]) 00527 start = end 00528 end += length 00529 self.model_desc = str[start:end] 00530 start = end 00531 end += 4 00532 (length,) = _struct_I.unpack(str[start:end]) 00533 start = end 00534 end += length 00535 self.model_category = str[start:end] 00536 _x = self 00537 start = end 00538 end += 12 00539 (_x.model_x_size, _x.model_y_size, _x.model_z_size,) = _struct_3f.unpack(str[start:end]) 00540 start = end 00541 end += 4 00542 (length,) = _struct_I.unpack(str[start:end]) 00543 start = end 00544 end += length 00545 self.model_basic_shape = str[start:end] 00546 start = end 00547 end += 1 00548 (self.graspable,) = _struct_B.unpack(str[start:end]) 00549 self.graspable = bool(self.graspable) 00550 start = end 00551 end += 4 00552 (length,) = _struct_I.unpack(str[start:end]) 00553 start = end 00554 end += length 00555 self.pcl = str[start:end] 00556 start = end 00557 end += 4 00558 (length,) = _struct_I.unpack(str[start:end]) 00559 start = end 00560 end += length 00561 self.fpt = str[start:end] 00562 _x = self 00563 start = end 00564 end += 12 00565 (_x.img.header.seq, _x.img.header.stamp.secs, _x.img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00566 start = end 00567 end += 4 00568 (length,) = _struct_I.unpack(str[start:end]) 00569 start = end 00570 end += length 00571 self.img.header.frame_id = str[start:end] 00572 _x = self 00573 start = end 00574 end += 8 00575 (_x.img.height, _x.img.width,) = _struct_2I.unpack(str[start:end]) 00576 start = end 00577 end += 4 00578 (length,) = _struct_I.unpack(str[start:end]) 00579 start = end 00580 end += length 00581 self.img.encoding = str[start:end] 00582 _x = self 00583 start = end 00584 end += 5 00585 (_x.img.is_bigendian, _x.img.step,) = _struct_BI.unpack(str[start:end]) 00586 start = end 00587 end += 4 00588 (length,) = _struct_I.unpack(str[start:end]) 00589 start = end 00590 end += length 00591 self.img.data = str[start:end] 00592 start = end 00593 end += 4 00594 (length,) = _struct_I.unpack(str[start:end]) 00595 start = end 00596 end += length 00597 self.image_type = str[start:end] 00598 start = end 00599 end += 4 00600 (length,) = _struct_I.unpack(str[start:end]) 00601 start = end 00602 end += length 00603 self.data_grasp = str[start:end] 00604 start = end 00605 end += 4 00606 (length,) = _struct_I.unpack(str[start:end]) 00607 start = end 00608 end += length 00609 self.data_mesh = str[start:end] 00610 start = end 00611 end += 4 00612 (length,) = _struct_I.unpack(str[start:end]) 00613 start = end 00614 end += length 00615 self.meshType = str[start:end] 00616 start = end 00617 end += 4 00618 (length,) = _struct_I.unpack(str[start:end]) 00619 start = end 00620 end += length 00621 self.urdf = str[start:end] 00622 return self 00623 except struct.error as e: 00624 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00625 00626 _struct_I = roslib.message.struct_I 00627 _struct_B = struct.Struct("<B") 00628 _struct_i = struct.Struct("<i") 00629 _struct_BI = struct.Struct("<BI") 00630 _struct_2I = struct.Struct("<2I") 00631 _struct_3I = struct.Struct("<3I") 00632 _struct_3f = struct.Struct("<3f") 00633 """autogenerated by genmsg_py from InsertObjectResponse.msg. Do not edit.""" 00634 import roslib.message 00635 import struct 00636 00637 00638 class InsertObjectResponse(roslib.message.Message): 00639 _md5sum = "bcd4a8cb19bdcae33e0a74fc2d3b2e46" 00640 _type = "srs_object_database_msgs/InsertObjectResponse" 00641 _has_header = False #flag to mark the presence of a Header object 00642 _full_text = """ 00643 00644 string return_response 00645 00646 int32 model_id 00647 00648 00649 00650 """ 00651 __slots__ = ['return_response','model_id'] 00652 _slot_types = ['string','int32'] 00653 00654 def __init__(self, *args, **kwds): 00655 """ 00656 Constructor. Any message fields that are implicitly/explicitly 00657 set to None will be assigned a default value. The recommend 00658 use is keyword arguments as this is more robust to future message 00659 changes. You cannot mix in-order arguments and keyword arguments. 00660 00661 The available fields are: 00662 return_response,model_id 00663 00664 @param args: complete set of field values, in .msg order 00665 @param kwds: use keyword arguments corresponding to message field names 00666 to set specific fields. 00667 """ 00668 if args or kwds: 00669 super(InsertObjectResponse, self).__init__(*args, **kwds) 00670 #message fields cannot be None, assign default values for those that are 00671 if self.return_response is None: 00672 self.return_response = '' 00673 if self.model_id is None: 00674 self.model_id = 0 00675 else: 00676 self.return_response = '' 00677 self.model_id = 0 00678 00679 def _get_types(self): 00680 """ 00681 internal API method 00682 """ 00683 return self._slot_types 00684 00685 def serialize(self, buff): 00686 """ 00687 serialize message into buffer 00688 @param buff: buffer 00689 @type buff: StringIO 00690 """ 00691 try: 00692 _x = self.return_response 00693 length = len(_x) 00694 buff.write(struct.pack('<I%ss'%length, length, _x)) 00695 buff.write(_struct_i.pack(self.model_id)) 00696 except struct.error as se: self._check_types(se) 00697 except TypeError as te: self._check_types(te) 00698 00699 def deserialize(self, str): 00700 """ 00701 unpack serialized message in str into this message instance 00702 @param str: byte array of serialized message 00703 @type str: str 00704 """ 00705 try: 00706 end = 0 00707 start = end 00708 end += 4 00709 (length,) = _struct_I.unpack(str[start:end]) 00710 start = end 00711 end += length 00712 self.return_response = str[start:end] 00713 start = end 00714 end += 4 00715 (self.model_id,) = _struct_i.unpack(str[start:end]) 00716 return self 00717 except struct.error as e: 00718 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00719 00720 00721 def serialize_numpy(self, buff, numpy): 00722 """ 00723 serialize message with numpy array types into buffer 00724 @param buff: buffer 00725 @type buff: StringIO 00726 @param numpy: numpy python module 00727 @type numpy module 00728 """ 00729 try: 00730 _x = self.return_response 00731 length = len(_x) 00732 buff.write(struct.pack('<I%ss'%length, length, _x)) 00733 buff.write(_struct_i.pack(self.model_id)) 00734 except struct.error as se: self._check_types(se) 00735 except TypeError as te: self._check_types(te) 00736 00737 def deserialize_numpy(self, str, numpy): 00738 """ 00739 unpack serialized message in str into this message instance using numpy for array types 00740 @param str: byte array of serialized message 00741 @type str: str 00742 @param numpy: numpy python module 00743 @type numpy: module 00744 """ 00745 try: 00746 end = 0 00747 start = end 00748 end += 4 00749 (length,) = _struct_I.unpack(str[start:end]) 00750 start = end 00751 end += length 00752 self.return_response = str[start:end] 00753 start = end 00754 end += 4 00755 (self.model_id,) = _struct_i.unpack(str[start:end]) 00756 return self 00757 except struct.error as e: 00758 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00759 00760 _struct_I = roslib.message.struct_I 00761 _struct_i = struct.Struct("<i") 00762 class InsertObject(roslib.message.ServiceDefinition): 00763 _type = 'srs_object_database_msgs/InsertObject' 00764 _md5sum = '665c5bed07e3c52611345e1782e947e1' 00765 _request_class = InsertObjectRequest 00766 _response_class = InsertObjectResponse