$search
00001 """autogenerated by genmsg_py from GetTablesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetTablesRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "cob_3d_mapping_msgs/GetTablesRequest" 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(GetTablesRequest, 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 GetTablesResponse.msg. Do not edit.""" 00091 import roslib.message 00092 import struct 00093 00094 import arm_navigation_msgs.msg 00095 import geometry_msgs.msg 00096 import cob_3d_mapping_msgs.msg 00097 import sensor_msgs.msg 00098 import std_msgs.msg 00099 import household_objects_database_msgs.msg 00100 00101 class GetTablesResponse(roslib.message.Message): 00102 _md5sum = "ab2fee081f22d553b7ebaf7fa0696d11" 00103 _type = "cob_3d_mapping_msgs/GetTablesResponse" 00104 _has_header = False #flag to mark the presence of a Header object 00105 _full_text = """cob_3d_mapping_msgs/TabletopDetectionResult[] tables 00106 00107 00108 ================================================================================ 00109 MSG: cob_3d_mapping_msgs/TabletopDetectionResult 00110 # Contains all the information from one run of the tabletop detection node 00111 00112 # The information for the plane that has been detected 00113 Table table 00114 00115 # The raw clusters detected in the scan 00116 sensor_msgs/PointCloud[] clusters 00117 00118 # The list of potential models that have been detected for each cluster 00119 # An empty list will be returned for a cluster that has no recognition results at all 00120 household_objects_database_msgs/DatabaseModelPoseList[] models 00121 00122 # For each cluster, the index of the list of models that was fit to that cluster 00123 # keep in mind that multiple raw clusters can correspond to a single fit 00124 int32[] cluster_model_indices 00125 00126 # Whether the detection has succeeded or failed 00127 int32 NO_CLOUD_RECEIVED = 1 00128 int32 NO_TABLE = 2 00129 int32 OTHER_ERROR = 3 00130 int32 SUCCESS = 4 00131 int32 result 00132 00133 ================================================================================ 00134 MSG: cob_3d_mapping_msgs/Table 00135 # Informs that a planar table has been detected at a given location 00136 00137 # The pose gives you the transform that take you to the coordinate system 00138 # of the table, with the origin somewhere in the table plane and the 00139 # z axis normal to the plane 00140 geometry_msgs/PoseStamped pose 00141 00142 # These values give you the observed extents of the table, along x and y, 00143 # in the table's own coordinate system (above) 00144 # there is no guarantee that the origin of the table coordinate system is 00145 # inside the boundary defined by these values. 00146 float32 x_min 00147 float32 x_max 00148 float32 y_min 00149 float32 y_max 00150 00151 # There is no guarantee that the table does NOT extend further than these 00152 # values; this is just as far as we've observed it. 00153 00154 00155 # Newer table definition as triangle mesh of convex hull (relative to pose) 00156 arm_navigation_msgs/Shape convex_hull 00157 00158 ================================================================================ 00159 MSG: geometry_msgs/PoseStamped 00160 # A Pose with reference coordinate frame and timestamp 00161 Header header 00162 Pose pose 00163 00164 ================================================================================ 00165 MSG: std_msgs/Header 00166 # Standard metadata for higher-level stamped data types. 00167 # This is generally used to communicate timestamped data 00168 # in a particular coordinate frame. 00169 # 00170 # sequence ID: consecutively increasing ID 00171 uint32 seq 00172 #Two-integer timestamp that is expressed as: 00173 # * stamp.secs: seconds (stamp_secs) since epoch 00174 # * stamp.nsecs: nanoseconds since stamp_secs 00175 # time-handling sugar is provided by the client library 00176 time stamp 00177 #Frame this data is associated with 00178 # 0: no frame 00179 # 1: global frame 00180 string frame_id 00181 00182 ================================================================================ 00183 MSG: geometry_msgs/Pose 00184 # A representation of pose in free space, composed of postion and orientation. 00185 Point position 00186 Quaternion orientation 00187 00188 ================================================================================ 00189 MSG: geometry_msgs/Point 00190 # This contains the position of a point in free space 00191 float64 x 00192 float64 y 00193 float64 z 00194 00195 ================================================================================ 00196 MSG: geometry_msgs/Quaternion 00197 # This represents an orientation in free space in quaternion form. 00198 00199 float64 x 00200 float64 y 00201 float64 z 00202 float64 w 00203 00204 ================================================================================ 00205 MSG: arm_navigation_msgs/Shape 00206 byte SPHERE=0 00207 byte BOX=1 00208 byte CYLINDER=2 00209 byte MESH=3 00210 00211 byte type 00212 00213 00214 #### define sphere, box, cylinder #### 00215 # the origin of each shape is considered at the shape's center 00216 00217 # for sphere 00218 # radius := dimensions[0] 00219 00220 # for cylinder 00221 # radius := dimensions[0] 00222 # length := dimensions[1] 00223 # the length is along the Z axis 00224 00225 # for box 00226 # size_x := dimensions[0] 00227 # size_y := dimensions[1] 00228 # size_z := dimensions[2] 00229 float64[] dimensions 00230 00231 00232 #### define mesh #### 00233 00234 # list of triangles; triangle k is defined by tre vertices located 00235 # at indices triangles[3k], triangles[3k+1], triangles[3k+2] 00236 int32[] triangles 00237 geometry_msgs/Point[] vertices 00238 00239 ================================================================================ 00240 MSG: sensor_msgs/PointCloud 00241 # This message holds a collection of 3d points, plus optional additional 00242 # information about each point. 00243 00244 # Time of sensor data acquisition, coordinate frame ID. 00245 Header header 00246 00247 # Array of 3d points. Each Point32 should be interpreted as a 3d point 00248 # in the frame given in the header. 00249 geometry_msgs/Point32[] points 00250 00251 # Each channel should have the same number of elements as points array, 00252 # and the data in each channel should correspond 1:1 with each point. 00253 # Channel names in common practice are listed in ChannelFloat32.msg. 00254 ChannelFloat32[] channels 00255 00256 ================================================================================ 00257 MSG: geometry_msgs/Point32 00258 # This contains the position of a point in free space(with 32 bits of precision). 00259 # It is recommeded to use Point wherever possible instead of Point32. 00260 # 00261 # This recommendation is to promote interoperability. 00262 # 00263 # This message is designed to take up less space when sending 00264 # lots of points at once, as in the case of a PointCloud. 00265 00266 float32 x 00267 float32 y 00268 float32 z 00269 ================================================================================ 00270 MSG: sensor_msgs/ChannelFloat32 00271 # This message is used by the PointCloud message to hold optional data 00272 # associated with each point in the cloud. The length of the values 00273 # array should be the same as the length of the points array in the 00274 # PointCloud, and each value should be associated with the corresponding 00275 # point. 00276 00277 # Channel names in existing practice include: 00278 # "u", "v" - row and column (respectively) in the left stereo image. 00279 # This is opposite to usual conventions but remains for 00280 # historical reasons. The newer PointCloud2 message has no 00281 # such problem. 00282 # "rgb" - For point clouds produced by color stereo cameras. uint8 00283 # (R,G,B) values packed into the least significant 24 bits, 00284 # in order. 00285 # "intensity" - laser or pixel intensity. 00286 # "distance" 00287 00288 # The channel name should give semantics of the channel (e.g. 00289 # "intensity" instead of "value"). 00290 string name 00291 00292 # The values array should be 1-1 with the elements of the associated 00293 # PointCloud. 00294 float32[] values 00295 00296 ================================================================================ 00297 MSG: household_objects_database_msgs/DatabaseModelPoseList 00298 # stores a list of possible database models recognition results 00299 DatabaseModelPose[] model_list 00300 ================================================================================ 00301 MSG: household_objects_database_msgs/DatabaseModelPose 00302 # Informs that a specific model from the Model Database has been 00303 # identified at a certain location 00304 00305 # the database id of the model 00306 int32 model_id 00307 00308 # the pose that it can be found in 00309 geometry_msgs/PoseStamped pose 00310 00311 # a measure of the confidence level in this detection result 00312 float32 confidence 00313 00314 # the name of the object detector that generated this detection result 00315 string detector_name 00316 00317 """ 00318 __slots__ = ['tables'] 00319 _slot_types = ['cob_3d_mapping_msgs/TabletopDetectionResult[]'] 00320 00321 def __init__(self, *args, **kwds): 00322 """ 00323 Constructor. Any message fields that are implicitly/explicitly 00324 set to None will be assigned a default value. The recommend 00325 use is keyword arguments as this is more robust to future message 00326 changes. You cannot mix in-order arguments and keyword arguments. 00327 00328 The available fields are: 00329 tables 00330 00331 @param args: complete set of field values, in .msg order 00332 @param kwds: use keyword arguments corresponding to message field names 00333 to set specific fields. 00334 """ 00335 if args or kwds: 00336 super(GetTablesResponse, self).__init__(*args, **kwds) 00337 #message fields cannot be None, assign default values for those that are 00338 if self.tables is None: 00339 self.tables = [] 00340 else: 00341 self.tables = [] 00342 00343 def _get_types(self): 00344 """ 00345 internal API method 00346 """ 00347 return self._slot_types 00348 00349 def serialize(self, buff): 00350 """ 00351 serialize message into buffer 00352 @param buff: buffer 00353 @type buff: StringIO 00354 """ 00355 try: 00356 length = len(self.tables) 00357 buff.write(_struct_I.pack(length)) 00358 for val1 in self.tables: 00359 _v1 = val1.table 00360 _v2 = _v1.pose 00361 _v3 = _v2.header 00362 buff.write(_struct_I.pack(_v3.seq)) 00363 _v4 = _v3.stamp 00364 _x = _v4 00365 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00366 _x = _v3.frame_id 00367 length = len(_x) 00368 buff.write(struct.pack('<I%ss'%length, length, _x)) 00369 _v5 = _v2.pose 00370 _v6 = _v5.position 00371 _x = _v6 00372 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00373 _v7 = _v5.orientation 00374 _x = _v7 00375 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00376 _x = _v1 00377 buff.write(_struct_4f.pack(_x.x_min, _x.x_max, _x.y_min, _x.y_max)) 00378 _v8 = _v1.convex_hull 00379 buff.write(_struct_b.pack(_v8.type)) 00380 length = len(_v8.dimensions) 00381 buff.write(_struct_I.pack(length)) 00382 pattern = '<%sd'%length 00383 buff.write(struct.pack(pattern, *_v8.dimensions)) 00384 length = len(_v8.triangles) 00385 buff.write(_struct_I.pack(length)) 00386 pattern = '<%si'%length 00387 buff.write(struct.pack(pattern, *_v8.triangles)) 00388 length = len(_v8.vertices) 00389 buff.write(_struct_I.pack(length)) 00390 for val4 in _v8.vertices: 00391 _x = val4 00392 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00393 length = len(val1.clusters) 00394 buff.write(_struct_I.pack(length)) 00395 for val2 in val1.clusters: 00396 _v9 = val2.header 00397 buff.write(_struct_I.pack(_v9.seq)) 00398 _v10 = _v9.stamp 00399 _x = _v10 00400 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00401 _x = _v9.frame_id 00402 length = len(_x) 00403 buff.write(struct.pack('<I%ss'%length, length, _x)) 00404 length = len(val2.points) 00405 buff.write(_struct_I.pack(length)) 00406 for val3 in val2.points: 00407 _x = val3 00408 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00409 length = len(val2.channels) 00410 buff.write(_struct_I.pack(length)) 00411 for val3 in val2.channels: 00412 _x = val3.name 00413 length = len(_x) 00414 buff.write(struct.pack('<I%ss'%length, length, _x)) 00415 length = len(val3.values) 00416 buff.write(_struct_I.pack(length)) 00417 pattern = '<%sf'%length 00418 buff.write(struct.pack(pattern, *val3.values)) 00419 length = len(val1.models) 00420 buff.write(_struct_I.pack(length)) 00421 for val2 in val1.models: 00422 length = len(val2.model_list) 00423 buff.write(_struct_I.pack(length)) 00424 for val3 in val2.model_list: 00425 buff.write(_struct_i.pack(val3.model_id)) 00426 _v11 = val3.pose 00427 _v12 = _v11.header 00428 buff.write(_struct_I.pack(_v12.seq)) 00429 _v13 = _v12.stamp 00430 _x = _v13 00431 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00432 _x = _v12.frame_id 00433 length = len(_x) 00434 buff.write(struct.pack('<I%ss'%length, length, _x)) 00435 _v14 = _v11.pose 00436 _v15 = _v14.position 00437 _x = _v15 00438 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00439 _v16 = _v14.orientation 00440 _x = _v16 00441 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00442 buff.write(_struct_f.pack(val3.confidence)) 00443 _x = val3.detector_name 00444 length = len(_x) 00445 buff.write(struct.pack('<I%ss'%length, length, _x)) 00446 length = len(val1.cluster_model_indices) 00447 buff.write(_struct_I.pack(length)) 00448 pattern = '<%si'%length 00449 buff.write(struct.pack(pattern, *val1.cluster_model_indices)) 00450 buff.write(_struct_i.pack(val1.result)) 00451 except struct.error as se: self._check_types(se) 00452 except TypeError as te: self._check_types(te) 00453 00454 def deserialize(self, str): 00455 """ 00456 unpack serialized message in str into this message instance 00457 @param str: byte array of serialized message 00458 @type str: str 00459 """ 00460 try: 00461 end = 0 00462 start = end 00463 end += 4 00464 (length,) = _struct_I.unpack(str[start:end]) 00465 self.tables = [] 00466 for i in range(0, length): 00467 val1 = cob_3d_mapping_msgs.msg.TabletopDetectionResult() 00468 _v17 = val1.table 00469 _v18 = _v17.pose 00470 _v19 = _v18.header 00471 start = end 00472 end += 4 00473 (_v19.seq,) = _struct_I.unpack(str[start:end]) 00474 _v20 = _v19.stamp 00475 _x = _v20 00476 start = end 00477 end += 8 00478 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00479 start = end 00480 end += 4 00481 (length,) = _struct_I.unpack(str[start:end]) 00482 start = end 00483 end += length 00484 _v19.frame_id = str[start:end] 00485 _v21 = _v18.pose 00486 _v22 = _v21.position 00487 _x = _v22 00488 start = end 00489 end += 24 00490 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00491 _v23 = _v21.orientation 00492 _x = _v23 00493 start = end 00494 end += 32 00495 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00496 _x = _v17 00497 start = end 00498 end += 16 00499 (_x.x_min, _x.x_max, _x.y_min, _x.y_max,) = _struct_4f.unpack(str[start:end]) 00500 _v24 = _v17.convex_hull 00501 start = end 00502 end += 1 00503 (_v24.type,) = _struct_b.unpack(str[start:end]) 00504 start = end 00505 end += 4 00506 (length,) = _struct_I.unpack(str[start:end]) 00507 pattern = '<%sd'%length 00508 start = end 00509 end += struct.calcsize(pattern) 00510 _v24.dimensions = struct.unpack(pattern, str[start:end]) 00511 start = end 00512 end += 4 00513 (length,) = _struct_I.unpack(str[start:end]) 00514 pattern = '<%si'%length 00515 start = end 00516 end += struct.calcsize(pattern) 00517 _v24.triangles = struct.unpack(pattern, str[start:end]) 00518 start = end 00519 end += 4 00520 (length,) = _struct_I.unpack(str[start:end]) 00521 _v24.vertices = [] 00522 for i in range(0, length): 00523 val4 = geometry_msgs.msg.Point() 00524 _x = val4 00525 start = end 00526 end += 24 00527 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00528 _v24.vertices.append(val4) 00529 start = end 00530 end += 4 00531 (length,) = _struct_I.unpack(str[start:end]) 00532 val1.clusters = [] 00533 for i in range(0, length): 00534 val2 = sensor_msgs.msg.PointCloud() 00535 _v25 = val2.header 00536 start = end 00537 end += 4 00538 (_v25.seq,) = _struct_I.unpack(str[start:end]) 00539 _v26 = _v25.stamp 00540 _x = _v26 00541 start = end 00542 end += 8 00543 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00544 start = end 00545 end += 4 00546 (length,) = _struct_I.unpack(str[start:end]) 00547 start = end 00548 end += length 00549 _v25.frame_id = str[start:end] 00550 start = end 00551 end += 4 00552 (length,) = _struct_I.unpack(str[start:end]) 00553 val2.points = [] 00554 for i in range(0, length): 00555 val3 = geometry_msgs.msg.Point32() 00556 _x = val3 00557 start = end 00558 end += 12 00559 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00560 val2.points.append(val3) 00561 start = end 00562 end += 4 00563 (length,) = _struct_I.unpack(str[start:end]) 00564 val2.channels = [] 00565 for i in range(0, length): 00566 val3 = sensor_msgs.msg.ChannelFloat32() 00567 start = end 00568 end += 4 00569 (length,) = _struct_I.unpack(str[start:end]) 00570 start = end 00571 end += length 00572 val3.name = str[start:end] 00573 start = end 00574 end += 4 00575 (length,) = _struct_I.unpack(str[start:end]) 00576 pattern = '<%sf'%length 00577 start = end 00578 end += struct.calcsize(pattern) 00579 val3.values = struct.unpack(pattern, str[start:end]) 00580 val2.channels.append(val3) 00581 val1.clusters.append(val2) 00582 start = end 00583 end += 4 00584 (length,) = _struct_I.unpack(str[start:end]) 00585 val1.models = [] 00586 for i in range(0, length): 00587 val2 = household_objects_database_msgs.msg.DatabaseModelPoseList() 00588 start = end 00589 end += 4 00590 (length,) = _struct_I.unpack(str[start:end]) 00591 val2.model_list = [] 00592 for i in range(0, length): 00593 val3 = household_objects_database_msgs.msg.DatabaseModelPose() 00594 start = end 00595 end += 4 00596 (val3.model_id,) = _struct_i.unpack(str[start:end]) 00597 _v27 = val3.pose 00598 _v28 = _v27.header 00599 start = end 00600 end += 4 00601 (_v28.seq,) = _struct_I.unpack(str[start:end]) 00602 _v29 = _v28.stamp 00603 _x = _v29 00604 start = end 00605 end += 8 00606 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00607 start = end 00608 end += 4 00609 (length,) = _struct_I.unpack(str[start:end]) 00610 start = end 00611 end += length 00612 _v28.frame_id = str[start:end] 00613 _v30 = _v27.pose 00614 _v31 = _v30.position 00615 _x = _v31 00616 start = end 00617 end += 24 00618 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00619 _v32 = _v30.orientation 00620 _x = _v32 00621 start = end 00622 end += 32 00623 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00624 start = end 00625 end += 4 00626 (val3.confidence,) = _struct_f.unpack(str[start:end]) 00627 start = end 00628 end += 4 00629 (length,) = _struct_I.unpack(str[start:end]) 00630 start = end 00631 end += length 00632 val3.detector_name = str[start:end] 00633 val2.model_list.append(val3) 00634 val1.models.append(val2) 00635 start = end 00636 end += 4 00637 (length,) = _struct_I.unpack(str[start:end]) 00638 pattern = '<%si'%length 00639 start = end 00640 end += struct.calcsize(pattern) 00641 val1.cluster_model_indices = struct.unpack(pattern, str[start:end]) 00642 start = end 00643 end += 4 00644 (val1.result,) = _struct_i.unpack(str[start:end]) 00645 self.tables.append(val1) 00646 return self 00647 except struct.error as e: 00648 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00649 00650 00651 def serialize_numpy(self, buff, numpy): 00652 """ 00653 serialize message with numpy array types into buffer 00654 @param buff: buffer 00655 @type buff: StringIO 00656 @param numpy: numpy python module 00657 @type numpy module 00658 """ 00659 try: 00660 length = len(self.tables) 00661 buff.write(_struct_I.pack(length)) 00662 for val1 in self.tables: 00663 _v33 = val1.table 00664 _v34 = _v33.pose 00665 _v35 = _v34.header 00666 buff.write(_struct_I.pack(_v35.seq)) 00667 _v36 = _v35.stamp 00668 _x = _v36 00669 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00670 _x = _v35.frame_id 00671 length = len(_x) 00672 buff.write(struct.pack('<I%ss'%length, length, _x)) 00673 _v37 = _v34.pose 00674 _v38 = _v37.position 00675 _x = _v38 00676 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00677 _v39 = _v37.orientation 00678 _x = _v39 00679 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00680 _x = _v33 00681 buff.write(_struct_4f.pack(_x.x_min, _x.x_max, _x.y_min, _x.y_max)) 00682 _v40 = _v33.convex_hull 00683 buff.write(_struct_b.pack(_v40.type)) 00684 length = len(_v40.dimensions) 00685 buff.write(_struct_I.pack(length)) 00686 pattern = '<%sd'%length 00687 buff.write(_v40.dimensions.tostring()) 00688 length = len(_v40.triangles) 00689 buff.write(_struct_I.pack(length)) 00690 pattern = '<%si'%length 00691 buff.write(_v40.triangles.tostring()) 00692 length = len(_v40.vertices) 00693 buff.write(_struct_I.pack(length)) 00694 for val4 in _v40.vertices: 00695 _x = val4 00696 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00697 length = len(val1.clusters) 00698 buff.write(_struct_I.pack(length)) 00699 for val2 in val1.clusters: 00700 _v41 = val2.header 00701 buff.write(_struct_I.pack(_v41.seq)) 00702 _v42 = _v41.stamp 00703 _x = _v42 00704 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00705 _x = _v41.frame_id 00706 length = len(_x) 00707 buff.write(struct.pack('<I%ss'%length, length, _x)) 00708 length = len(val2.points) 00709 buff.write(_struct_I.pack(length)) 00710 for val3 in val2.points: 00711 _x = val3 00712 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00713 length = len(val2.channels) 00714 buff.write(_struct_I.pack(length)) 00715 for val3 in val2.channels: 00716 _x = val3.name 00717 length = len(_x) 00718 buff.write(struct.pack('<I%ss'%length, length, _x)) 00719 length = len(val3.values) 00720 buff.write(_struct_I.pack(length)) 00721 pattern = '<%sf'%length 00722 buff.write(val3.values.tostring()) 00723 length = len(val1.models) 00724 buff.write(_struct_I.pack(length)) 00725 for val2 in val1.models: 00726 length = len(val2.model_list) 00727 buff.write(_struct_I.pack(length)) 00728 for val3 in val2.model_list: 00729 buff.write(_struct_i.pack(val3.model_id)) 00730 _v43 = val3.pose 00731 _v44 = _v43.header 00732 buff.write(_struct_I.pack(_v44.seq)) 00733 _v45 = _v44.stamp 00734 _x = _v45 00735 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00736 _x = _v44.frame_id 00737 length = len(_x) 00738 buff.write(struct.pack('<I%ss'%length, length, _x)) 00739 _v46 = _v43.pose 00740 _v47 = _v46.position 00741 _x = _v47 00742 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00743 _v48 = _v46.orientation 00744 _x = _v48 00745 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00746 buff.write(_struct_f.pack(val3.confidence)) 00747 _x = val3.detector_name 00748 length = len(_x) 00749 buff.write(struct.pack('<I%ss'%length, length, _x)) 00750 length = len(val1.cluster_model_indices) 00751 buff.write(_struct_I.pack(length)) 00752 pattern = '<%si'%length 00753 buff.write(val1.cluster_model_indices.tostring()) 00754 buff.write(_struct_i.pack(val1.result)) 00755 except struct.error as se: self._check_types(se) 00756 except TypeError as te: self._check_types(te) 00757 00758 def deserialize_numpy(self, str, numpy): 00759 """ 00760 unpack serialized message in str into this message instance using numpy for array types 00761 @param str: byte array of serialized message 00762 @type str: str 00763 @param numpy: numpy python module 00764 @type numpy: module 00765 """ 00766 try: 00767 end = 0 00768 start = end 00769 end += 4 00770 (length,) = _struct_I.unpack(str[start:end]) 00771 self.tables = [] 00772 for i in range(0, length): 00773 val1 = cob_3d_mapping_msgs.msg.TabletopDetectionResult() 00774 _v49 = val1.table 00775 _v50 = _v49.pose 00776 _v51 = _v50.header 00777 start = end 00778 end += 4 00779 (_v51.seq,) = _struct_I.unpack(str[start:end]) 00780 _v52 = _v51.stamp 00781 _x = _v52 00782 start = end 00783 end += 8 00784 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00785 start = end 00786 end += 4 00787 (length,) = _struct_I.unpack(str[start:end]) 00788 start = end 00789 end += length 00790 _v51.frame_id = str[start:end] 00791 _v53 = _v50.pose 00792 _v54 = _v53.position 00793 _x = _v54 00794 start = end 00795 end += 24 00796 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00797 _v55 = _v53.orientation 00798 _x = _v55 00799 start = end 00800 end += 32 00801 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00802 _x = _v49 00803 start = end 00804 end += 16 00805 (_x.x_min, _x.x_max, _x.y_min, _x.y_max,) = _struct_4f.unpack(str[start:end]) 00806 _v56 = _v49.convex_hull 00807 start = end 00808 end += 1 00809 (_v56.type,) = _struct_b.unpack(str[start:end]) 00810 start = end 00811 end += 4 00812 (length,) = _struct_I.unpack(str[start:end]) 00813 pattern = '<%sd'%length 00814 start = end 00815 end += struct.calcsize(pattern) 00816 _v56.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00817 start = end 00818 end += 4 00819 (length,) = _struct_I.unpack(str[start:end]) 00820 pattern = '<%si'%length 00821 start = end 00822 end += struct.calcsize(pattern) 00823 _v56.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00824 start = end 00825 end += 4 00826 (length,) = _struct_I.unpack(str[start:end]) 00827 _v56.vertices = [] 00828 for i in range(0, length): 00829 val4 = geometry_msgs.msg.Point() 00830 _x = val4 00831 start = end 00832 end += 24 00833 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00834 _v56.vertices.append(val4) 00835 start = end 00836 end += 4 00837 (length,) = _struct_I.unpack(str[start:end]) 00838 val1.clusters = [] 00839 for i in range(0, length): 00840 val2 = sensor_msgs.msg.PointCloud() 00841 _v57 = val2.header 00842 start = end 00843 end += 4 00844 (_v57.seq,) = _struct_I.unpack(str[start:end]) 00845 _v58 = _v57.stamp 00846 _x = _v58 00847 start = end 00848 end += 8 00849 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00850 start = end 00851 end += 4 00852 (length,) = _struct_I.unpack(str[start:end]) 00853 start = end 00854 end += length 00855 _v57.frame_id = str[start:end] 00856 start = end 00857 end += 4 00858 (length,) = _struct_I.unpack(str[start:end]) 00859 val2.points = [] 00860 for i in range(0, length): 00861 val3 = geometry_msgs.msg.Point32() 00862 _x = val3 00863 start = end 00864 end += 12 00865 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00866 val2.points.append(val3) 00867 start = end 00868 end += 4 00869 (length,) = _struct_I.unpack(str[start:end]) 00870 val2.channels = [] 00871 for i in range(0, length): 00872 val3 = sensor_msgs.msg.ChannelFloat32() 00873 start = end 00874 end += 4 00875 (length,) = _struct_I.unpack(str[start:end]) 00876 start = end 00877 end += length 00878 val3.name = str[start:end] 00879 start = end 00880 end += 4 00881 (length,) = _struct_I.unpack(str[start:end]) 00882 pattern = '<%sf'%length 00883 start = end 00884 end += struct.calcsize(pattern) 00885 val3.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00886 val2.channels.append(val3) 00887 val1.clusters.append(val2) 00888 start = end 00889 end += 4 00890 (length,) = _struct_I.unpack(str[start:end]) 00891 val1.models = [] 00892 for i in range(0, length): 00893 val2 = household_objects_database_msgs.msg.DatabaseModelPoseList() 00894 start = end 00895 end += 4 00896 (length,) = _struct_I.unpack(str[start:end]) 00897 val2.model_list = [] 00898 for i in range(0, length): 00899 val3 = household_objects_database_msgs.msg.DatabaseModelPose() 00900 start = end 00901 end += 4 00902 (val3.model_id,) = _struct_i.unpack(str[start:end]) 00903 _v59 = val3.pose 00904 _v60 = _v59.header 00905 start = end 00906 end += 4 00907 (_v60.seq,) = _struct_I.unpack(str[start:end]) 00908 _v61 = _v60.stamp 00909 _x = _v61 00910 start = end 00911 end += 8 00912 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00913 start = end 00914 end += 4 00915 (length,) = _struct_I.unpack(str[start:end]) 00916 start = end 00917 end += length 00918 _v60.frame_id = str[start:end] 00919 _v62 = _v59.pose 00920 _v63 = _v62.position 00921 _x = _v63 00922 start = end 00923 end += 24 00924 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00925 _v64 = _v62.orientation 00926 _x = _v64 00927 start = end 00928 end += 32 00929 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00930 start = end 00931 end += 4 00932 (val3.confidence,) = _struct_f.unpack(str[start:end]) 00933 start = end 00934 end += 4 00935 (length,) = _struct_I.unpack(str[start:end]) 00936 start = end 00937 end += length 00938 val3.detector_name = str[start:end] 00939 val2.model_list.append(val3) 00940 val1.models.append(val2) 00941 start = end 00942 end += 4 00943 (length,) = _struct_I.unpack(str[start:end]) 00944 pattern = '<%si'%length 00945 start = end 00946 end += struct.calcsize(pattern) 00947 val1.cluster_model_indices = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00948 start = end 00949 end += 4 00950 (val1.result,) = _struct_i.unpack(str[start:end]) 00951 self.tables.append(val1) 00952 return self 00953 except struct.error as e: 00954 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00955 00956 _struct_I = roslib.message.struct_I 00957 _struct_b = struct.Struct("<b") 00958 _struct_f = struct.Struct("<f") 00959 _struct_3f = struct.Struct("<3f") 00960 _struct_i = struct.Struct("<i") 00961 _struct_4f = struct.Struct("<4f") 00962 _struct_4d = struct.Struct("<4d") 00963 _struct_2I = struct.Struct("<2I") 00964 _struct_3d = struct.Struct("<3d") 00965 class GetTables(roslib.message.ServiceDefinition): 00966 _type = 'cob_3d_mapping_msgs/GetTables' 00967 _md5sum = 'ab2fee081f22d553b7ebaf7fa0696d11' 00968 _request_class = GetTablesRequest 00969 _response_class = GetTablesResponse