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