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