$search
00001 """autogenerated by genmsg_py from GetPclRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetPclRequest(roslib.message.Message): 00007 _md5sum = "80afe6caba30c992d2e7ff6ff0e0d51e" 00008 _type = "srs_object_database_msgs/GetPclRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 int32[] model_ids 00013 00014 00015 """ 00016 __slots__ = ['model_ids'] 00017 _slot_types = ['int32[]'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 model_ids 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(GetPclRequest, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.model_ids is None: 00037 self.model_ids = [] 00038 else: 00039 self.model_ids = [] 00040 00041 def _get_types(self): 00042 """ 00043 internal API method 00044 """ 00045 return self._slot_types 00046 00047 def serialize(self, buff): 00048 """ 00049 serialize message into buffer 00050 @param buff: buffer 00051 @type buff: StringIO 00052 """ 00053 try: 00054 length = len(self.model_ids) 00055 buff.write(_struct_I.pack(length)) 00056 pattern = '<%si'%length 00057 buff.write(struct.pack(pattern, *self.model_ids)) 00058 except struct.error as se: self._check_types(se) 00059 except TypeError as te: self._check_types(te) 00060 00061 def deserialize(self, str): 00062 """ 00063 unpack serialized message in str into this message instance 00064 @param str: byte array of serialized message 00065 @type str: str 00066 """ 00067 try: 00068 end = 0 00069 start = end 00070 end += 4 00071 (length,) = _struct_I.unpack(str[start:end]) 00072 pattern = '<%si'%length 00073 start = end 00074 end += struct.calcsize(pattern) 00075 self.model_ids = struct.unpack(pattern, str[start:end]) 00076 return self 00077 except struct.error as e: 00078 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00079 00080 00081 def serialize_numpy(self, buff, numpy): 00082 """ 00083 serialize message with numpy array types into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 @param numpy: numpy python module 00087 @type numpy module 00088 """ 00089 try: 00090 length = len(self.model_ids) 00091 buff.write(_struct_I.pack(length)) 00092 pattern = '<%si'%length 00093 buff.write(self.model_ids.tostring()) 00094 except struct.error as se: self._check_types(se) 00095 except TypeError as te: self._check_types(te) 00096 00097 def deserialize_numpy(self, str, numpy): 00098 """ 00099 unpack serialized message in str into this message instance using numpy for array types 00100 @param str: byte array of serialized message 00101 @type str: str 00102 @param numpy: numpy python module 00103 @type numpy: module 00104 """ 00105 try: 00106 end = 0 00107 start = end 00108 end += 4 00109 (length,) = _struct_I.unpack(str[start:end]) 00110 pattern = '<%si'%length 00111 start = end 00112 end += struct.calcsize(pattern) 00113 self.model_ids = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00114 return self 00115 except struct.error as e: 00116 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00117 00118 _struct_I = roslib.message.struct_I 00119 """autogenerated by genmsg_py from GetPclResponse.msg. Do not edit.""" 00120 import roslib.message 00121 import struct 00122 00123 import srs_object_database_msgs.msg 00124 import std_msgs.msg 00125 import sensor_msgs.msg 00126 00127 class GetPclResponse(roslib.message.Message): 00128 _md5sum = "62e77027d0abe4e41f991a54bd0bcc09" 00129 _type = "srs_object_database_msgs/GetPclResponse" 00130 _has_header = False #flag to mark the presence of a Header object 00131 _full_text = """ 00132 00133 string return_response 00134 00135 srs_object_database_msgs/pcl[] msg 00136 00137 00138 ================================================================================ 00139 MSG: srs_object_database_msgs/pcl 00140 int32 objectId 00141 sensor_msgs/PointCloud2 pcl 00142 00143 ================================================================================ 00144 MSG: sensor_msgs/PointCloud2 00145 # This message holds a collection of N-dimensional points, which may 00146 # contain additional information such as normals, intensity, etc. The 00147 # point data is stored as a binary blob, its layout described by the 00148 # contents of the "fields" array. 00149 00150 # The point cloud data may be organized 2d (image-like) or 1d 00151 # (unordered). Point clouds organized as 2d images may be produced by 00152 # camera depth sensors such as stereo or time-of-flight. 00153 00154 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00155 # points). 00156 Header header 00157 00158 # 2D structure of the point cloud. If the cloud is unordered, height is 00159 # 1 and width is the length of the point cloud. 00160 uint32 height 00161 uint32 width 00162 00163 # Describes the channels and their layout in the binary data blob. 00164 PointField[] fields 00165 00166 bool is_bigendian # Is this data bigendian? 00167 uint32 point_step # Length of a point in bytes 00168 uint32 row_step # Length of a row in bytes 00169 uint8[] data # Actual point data, size is (row_step*height) 00170 00171 bool is_dense # True if there are no invalid points 00172 00173 ================================================================================ 00174 MSG: std_msgs/Header 00175 # Standard metadata for higher-level stamped data types. 00176 # This is generally used to communicate timestamped data 00177 # in a particular coordinate frame. 00178 # 00179 # sequence ID: consecutively increasing ID 00180 uint32 seq 00181 #Two-integer timestamp that is expressed as: 00182 # * stamp.secs: seconds (stamp_secs) since epoch 00183 # * stamp.nsecs: nanoseconds since stamp_secs 00184 # time-handling sugar is provided by the client library 00185 time stamp 00186 #Frame this data is associated with 00187 # 0: no frame 00188 # 1: global frame 00189 string frame_id 00190 00191 ================================================================================ 00192 MSG: sensor_msgs/PointField 00193 # This message holds the description of one point entry in the 00194 # PointCloud2 message format. 00195 uint8 INT8 = 1 00196 uint8 UINT8 = 2 00197 uint8 INT16 = 3 00198 uint8 UINT16 = 4 00199 uint8 INT32 = 5 00200 uint8 UINT32 = 6 00201 uint8 FLOAT32 = 7 00202 uint8 FLOAT64 = 8 00203 00204 string name # Name of field 00205 uint32 offset # Offset from start of point struct 00206 uint8 datatype # Datatype enumeration, see above 00207 uint32 count # How many elements in the field 00208 00209 """ 00210 __slots__ = ['return_response','msg'] 00211 _slot_types = ['string','srs_object_database_msgs/pcl[]'] 00212 00213 def __init__(self, *args, **kwds): 00214 """ 00215 Constructor. Any message fields that are implicitly/explicitly 00216 set to None will be assigned a default value. The recommend 00217 use is keyword arguments as this is more robust to future message 00218 changes. You cannot mix in-order arguments and keyword arguments. 00219 00220 The available fields are: 00221 return_response,msg 00222 00223 @param args: complete set of field values, in .msg order 00224 @param kwds: use keyword arguments corresponding to message field names 00225 to set specific fields. 00226 """ 00227 if args or kwds: 00228 super(GetPclResponse, self).__init__(*args, **kwds) 00229 #message fields cannot be None, assign default values for those that are 00230 if self.return_response is None: 00231 self.return_response = '' 00232 if self.msg is None: 00233 self.msg = [] 00234 else: 00235 self.return_response = '' 00236 self.msg = [] 00237 00238 def _get_types(self): 00239 """ 00240 internal API method 00241 """ 00242 return self._slot_types 00243 00244 def serialize(self, buff): 00245 """ 00246 serialize message into buffer 00247 @param buff: buffer 00248 @type buff: StringIO 00249 """ 00250 try: 00251 _x = self.return_response 00252 length = len(_x) 00253 buff.write(struct.pack('<I%ss'%length, length, _x)) 00254 length = len(self.msg) 00255 buff.write(_struct_I.pack(length)) 00256 for val1 in self.msg: 00257 buff.write(_struct_i.pack(val1.objectId)) 00258 _v1 = val1.pcl 00259 _v2 = _v1.header 00260 buff.write(_struct_I.pack(_v2.seq)) 00261 _v3 = _v2.stamp 00262 _x = _v3 00263 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00264 _x = _v2.frame_id 00265 length = len(_x) 00266 buff.write(struct.pack('<I%ss'%length, length, _x)) 00267 _x = _v1 00268 buff.write(_struct_2I.pack(_x.height, _x.width)) 00269 length = len(_v1.fields) 00270 buff.write(_struct_I.pack(length)) 00271 for val3 in _v1.fields: 00272 _x = val3.name 00273 length = len(_x) 00274 buff.write(struct.pack('<I%ss'%length, length, _x)) 00275 _x = val3 00276 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00277 _x = _v1 00278 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00279 _x = _v1.data 00280 length = len(_x) 00281 # - if encoded as a list instead, serialize as bytes instead of string 00282 if type(_x) in [list, tuple]: 00283 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00284 else: 00285 buff.write(struct.pack('<I%ss'%length, length, _x)) 00286 buff.write(_struct_B.pack(_v1.is_dense)) 00287 except struct.error as se: self._check_types(se) 00288 except TypeError as te: self._check_types(te) 00289 00290 def deserialize(self, str): 00291 """ 00292 unpack serialized message in str into this message instance 00293 @param str: byte array of serialized message 00294 @type str: str 00295 """ 00296 try: 00297 end = 0 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 start = end 00302 end += length 00303 self.return_response = str[start:end] 00304 start = end 00305 end += 4 00306 (length,) = _struct_I.unpack(str[start:end]) 00307 self.msg = [] 00308 for i in range(0, length): 00309 val1 = srs_object_database_msgs.msg.pcl() 00310 start = end 00311 end += 4 00312 (val1.objectId,) = _struct_i.unpack(str[start:end]) 00313 _v4 = val1.pcl 00314 _v5 = _v4.header 00315 start = end 00316 end += 4 00317 (_v5.seq,) = _struct_I.unpack(str[start:end]) 00318 _v6 = _v5.stamp 00319 _x = _v6 00320 start = end 00321 end += 8 00322 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00323 start = end 00324 end += 4 00325 (length,) = _struct_I.unpack(str[start:end]) 00326 start = end 00327 end += length 00328 _v5.frame_id = str[start:end] 00329 _x = _v4 00330 start = end 00331 end += 8 00332 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00333 start = end 00334 end += 4 00335 (length,) = _struct_I.unpack(str[start:end]) 00336 _v4.fields = [] 00337 for i in range(0, length): 00338 val3 = sensor_msgs.msg.PointField() 00339 start = end 00340 end += 4 00341 (length,) = _struct_I.unpack(str[start:end]) 00342 start = end 00343 end += length 00344 val3.name = str[start:end] 00345 _x = val3 00346 start = end 00347 end += 9 00348 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00349 _v4.fields.append(val3) 00350 _x = _v4 00351 start = end 00352 end += 9 00353 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00354 _v4.is_bigendian = bool(_v4.is_bigendian) 00355 start = end 00356 end += 4 00357 (length,) = _struct_I.unpack(str[start:end]) 00358 start = end 00359 end += length 00360 _v4.data = str[start:end] 00361 start = end 00362 end += 1 00363 (_v4.is_dense,) = _struct_B.unpack(str[start:end]) 00364 _v4.is_dense = bool(_v4.is_dense) 00365 self.msg.append(val1) 00366 return self 00367 except struct.error as e: 00368 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00369 00370 00371 def serialize_numpy(self, buff, numpy): 00372 """ 00373 serialize message with numpy array types into buffer 00374 @param buff: buffer 00375 @type buff: StringIO 00376 @param numpy: numpy python module 00377 @type numpy module 00378 """ 00379 try: 00380 _x = self.return_response 00381 length = len(_x) 00382 buff.write(struct.pack('<I%ss'%length, length, _x)) 00383 length = len(self.msg) 00384 buff.write(_struct_I.pack(length)) 00385 for val1 in self.msg: 00386 buff.write(_struct_i.pack(val1.objectId)) 00387 _v7 = val1.pcl 00388 _v8 = _v7.header 00389 buff.write(_struct_I.pack(_v8.seq)) 00390 _v9 = _v8.stamp 00391 _x = _v9 00392 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00393 _x = _v8.frame_id 00394 length = len(_x) 00395 buff.write(struct.pack('<I%ss'%length, length, _x)) 00396 _x = _v7 00397 buff.write(_struct_2I.pack(_x.height, _x.width)) 00398 length = len(_v7.fields) 00399 buff.write(_struct_I.pack(length)) 00400 for val3 in _v7.fields: 00401 _x = val3.name 00402 length = len(_x) 00403 buff.write(struct.pack('<I%ss'%length, length, _x)) 00404 _x = val3 00405 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00406 _x = _v7 00407 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00408 _x = _v7.data 00409 length = len(_x) 00410 # - if encoded as a list instead, serialize as bytes instead of string 00411 if type(_x) in [list, tuple]: 00412 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00413 else: 00414 buff.write(struct.pack('<I%ss'%length, length, _x)) 00415 buff.write(_struct_B.pack(_v7.is_dense)) 00416 except struct.error as se: self._check_types(se) 00417 except TypeError as te: self._check_types(te) 00418 00419 def deserialize_numpy(self, str, numpy): 00420 """ 00421 unpack serialized message in str into this message instance using numpy for array types 00422 @param str: byte array of serialized message 00423 @type str: str 00424 @param numpy: numpy python module 00425 @type numpy: module 00426 """ 00427 try: 00428 end = 0 00429 start = end 00430 end += 4 00431 (length,) = _struct_I.unpack(str[start:end]) 00432 start = end 00433 end += length 00434 self.return_response = str[start:end] 00435 start = end 00436 end += 4 00437 (length,) = _struct_I.unpack(str[start:end]) 00438 self.msg = [] 00439 for i in range(0, length): 00440 val1 = srs_object_database_msgs.msg.pcl() 00441 start = end 00442 end += 4 00443 (val1.objectId,) = _struct_i.unpack(str[start:end]) 00444 _v10 = val1.pcl 00445 _v11 = _v10.header 00446 start = end 00447 end += 4 00448 (_v11.seq,) = _struct_I.unpack(str[start:end]) 00449 _v12 = _v11.stamp 00450 _x = _v12 00451 start = end 00452 end += 8 00453 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00454 start = end 00455 end += 4 00456 (length,) = _struct_I.unpack(str[start:end]) 00457 start = end 00458 end += length 00459 _v11.frame_id = str[start:end] 00460 _x = _v10 00461 start = end 00462 end += 8 00463 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 _v10.fields = [] 00468 for i in range(0, length): 00469 val3 = sensor_msgs.msg.PointField() 00470 start = end 00471 end += 4 00472 (length,) = _struct_I.unpack(str[start:end]) 00473 start = end 00474 end += length 00475 val3.name = str[start:end] 00476 _x = val3 00477 start = end 00478 end += 9 00479 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00480 _v10.fields.append(val3) 00481 _x = _v10 00482 start = end 00483 end += 9 00484 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00485 _v10.is_bigendian = bool(_v10.is_bigendian) 00486 start = end 00487 end += 4 00488 (length,) = _struct_I.unpack(str[start:end]) 00489 start = end 00490 end += length 00491 _v10.data = str[start:end] 00492 start = end 00493 end += 1 00494 (_v10.is_dense,) = _struct_B.unpack(str[start:end]) 00495 _v10.is_dense = bool(_v10.is_dense) 00496 self.msg.append(val1) 00497 return self 00498 except struct.error as e: 00499 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00500 00501 _struct_I = roslib.message.struct_I 00502 _struct_IBI = struct.Struct("<IBI") 00503 _struct_B = struct.Struct("<B") 00504 _struct_i = struct.Struct("<i") 00505 _struct_B2I = struct.Struct("<B2I") 00506 _struct_2I = struct.Struct("<2I") 00507 class GetPcl(roslib.message.ServiceDefinition): 00508 _type = 'srs_object_database_msgs/GetPcl' 00509 _md5sum = '596db51a5c261da80fedfc7706fc8019' 00510 _request_class = GetPclRequest 00511 _response_class = GetPclResponse