$search
00001 """autogenerated by genmsg_py from MoveToTableRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import sensor_msgs.msg 00007 import cob_3d_mapping_msgs.msg 00008 import std_msgs.msg 00009 00010 class MoveToTableRequest(roslib.message.Message): 00011 _md5sum = "3b7a57dcd210456a84f72c91afc66417" 00012 _type = "cob_3d_mapping_msgs/MoveToTableRequest" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """cob_3d_mapping_msgs/Shape targetTable 00015 00016 00017 ================================================================================ 00018 MSG: cob_3d_mapping_msgs/Shape 00019 Header header 00020 00021 uint8 POLYGON=0 00022 uint8 LINE=1 00023 uint8 CURVED=2 00024 uint8 MESH=3 00025 uint8 OTHER=4 00026 uint8 CYLINDER=5 00027 # potential extensions: SPHERE, CYLINDER, BOX 00028 00029 uint8 type 00030 00031 00032 int32 id 00033 # define shape parameters 00034 # for plane 00035 # normal vector = params[0],params[1],params[2] 00036 # d = params[3] 00037 # for line 00038 # direction vector = params[0],params[1],params[2] 00039 # 00040 #for cylinder 00041 # symmetry axis = params[0],params[1],params[2] 00042 # z axis = params[3], params[4], params[5] 00043 # origin = params[6], params[7], params[8] 00044 # radius = params[9] 00045 # 00046 float64[] params 00047 00048 sensor_msgs/PointCloud2[] points 00049 00050 #### define mesh #### 00051 # each three entries form a triangle; indices of points are stored 00052 int32[] vertices 00053 00054 geometry_msgs/Point32 centroid 00055 std_msgs/ColorRGBA color 00056 bool[] holes 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: sensor_msgs/PointCloud2 00078 # This message holds a collection of N-dimensional points, which may 00079 # contain additional information such as normals, intensity, etc. The 00080 # point data is stored as a binary blob, its layout described by the 00081 # contents of the "fields" array. 00082 00083 # The point cloud data may be organized 2d (image-like) or 1d 00084 # (unordered). Point clouds organized as 2d images may be produced by 00085 # camera depth sensors such as stereo or time-of-flight. 00086 00087 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00088 # points). 00089 Header header 00090 00091 # 2D structure of the point cloud. If the cloud is unordered, height is 00092 # 1 and width is the length of the point cloud. 00093 uint32 height 00094 uint32 width 00095 00096 # Describes the channels and their layout in the binary data blob. 00097 PointField[] fields 00098 00099 bool is_bigendian # Is this data bigendian? 00100 uint32 point_step # Length of a point in bytes 00101 uint32 row_step # Length of a row in bytes 00102 uint8[] data # Actual point data, size is (row_step*height) 00103 00104 bool is_dense # True if there are no invalid points 00105 00106 ================================================================================ 00107 MSG: sensor_msgs/PointField 00108 # This message holds the description of one point entry in the 00109 # PointCloud2 message format. 00110 uint8 INT8 = 1 00111 uint8 UINT8 = 2 00112 uint8 INT16 = 3 00113 uint8 UINT16 = 4 00114 uint8 INT32 = 5 00115 uint8 UINT32 = 6 00116 uint8 FLOAT32 = 7 00117 uint8 FLOAT64 = 8 00118 00119 string name # Name of field 00120 uint32 offset # Offset from start of point struct 00121 uint8 datatype # Datatype enumeration, see above 00122 uint32 count # How many elements in the field 00123 00124 ================================================================================ 00125 MSG: geometry_msgs/Point32 00126 # This contains the position of a point in free space(with 32 bits of precision). 00127 # It is recommeded to use Point wherever possible instead of Point32. 00128 # 00129 # This recommendation is to promote interoperability. 00130 # 00131 # This message is designed to take up less space when sending 00132 # lots of points at once, as in the case of a PointCloud. 00133 00134 float32 x 00135 float32 y 00136 float32 z 00137 ================================================================================ 00138 MSG: std_msgs/ColorRGBA 00139 float32 r 00140 float32 g 00141 float32 b 00142 float32 a 00143 00144 """ 00145 __slots__ = ['targetTable'] 00146 _slot_types = ['cob_3d_mapping_msgs/Shape'] 00147 00148 def __init__(self, *args, **kwds): 00149 """ 00150 Constructor. Any message fields that are implicitly/explicitly 00151 set to None will be assigned a default value. The recommend 00152 use is keyword arguments as this is more robust to future message 00153 changes. You cannot mix in-order arguments and keyword arguments. 00154 00155 The available fields are: 00156 targetTable 00157 00158 @param args: complete set of field values, in .msg order 00159 @param kwds: use keyword arguments corresponding to message field names 00160 to set specific fields. 00161 """ 00162 if args or kwds: 00163 super(MoveToTableRequest, self).__init__(*args, **kwds) 00164 #message fields cannot be None, assign default values for those that are 00165 if self.targetTable is None: 00166 self.targetTable = cob_3d_mapping_msgs.msg.Shape() 00167 else: 00168 self.targetTable = cob_3d_mapping_msgs.msg.Shape() 00169 00170 def _get_types(self): 00171 """ 00172 internal API method 00173 """ 00174 return self._slot_types 00175 00176 def serialize(self, buff): 00177 """ 00178 serialize message into buffer 00179 @param buff: buffer 00180 @type buff: StringIO 00181 """ 00182 try: 00183 _x = self 00184 buff.write(_struct_3I.pack(_x.targetTable.header.seq, _x.targetTable.header.stamp.secs, _x.targetTable.header.stamp.nsecs)) 00185 _x = self.targetTable.header.frame_id 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 _x = self 00189 buff.write(_struct_Bi.pack(_x.targetTable.type, _x.targetTable.id)) 00190 length = len(self.targetTable.params) 00191 buff.write(_struct_I.pack(length)) 00192 pattern = '<%sd'%length 00193 buff.write(struct.pack(pattern, *self.targetTable.params)) 00194 length = len(self.targetTable.points) 00195 buff.write(_struct_I.pack(length)) 00196 for val1 in self.targetTable.points: 00197 _v1 = val1.header 00198 buff.write(_struct_I.pack(_v1.seq)) 00199 _v2 = _v1.stamp 00200 _x = _v2 00201 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00202 _x = _v1.frame_id 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 _x = val1 00206 buff.write(_struct_2I.pack(_x.height, _x.width)) 00207 length = len(val1.fields) 00208 buff.write(_struct_I.pack(length)) 00209 for val2 in val1.fields: 00210 _x = val2.name 00211 length = len(_x) 00212 buff.write(struct.pack('<I%ss'%length, length, _x)) 00213 _x = val2 00214 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00215 _x = val1 00216 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00217 _x = val1.data 00218 length = len(_x) 00219 # - if encoded as a list instead, serialize as bytes instead of string 00220 if type(_x) in [list, tuple]: 00221 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00222 else: 00223 buff.write(struct.pack('<I%ss'%length, length, _x)) 00224 buff.write(_struct_B.pack(val1.is_dense)) 00225 length = len(self.targetTable.vertices) 00226 buff.write(_struct_I.pack(length)) 00227 pattern = '<%si'%length 00228 buff.write(struct.pack(pattern, *self.targetTable.vertices)) 00229 _x = self 00230 buff.write(_struct_7f.pack(_x.targetTable.centroid.x, _x.targetTable.centroid.y, _x.targetTable.centroid.z, _x.targetTable.color.r, _x.targetTable.color.g, _x.targetTable.color.b, _x.targetTable.color.a)) 00231 length = len(self.targetTable.holes) 00232 buff.write(_struct_I.pack(length)) 00233 pattern = '<%sB'%length 00234 buff.write(struct.pack(pattern, *self.targetTable.holes)) 00235 except struct.error as se: self._check_types(se) 00236 except TypeError as te: self._check_types(te) 00237 00238 def deserialize(self, str): 00239 """ 00240 unpack serialized message in str into this message instance 00241 @param str: byte array of serialized message 00242 @type str: str 00243 """ 00244 try: 00245 if self.targetTable is None: 00246 self.targetTable = cob_3d_mapping_msgs.msg.Shape() 00247 end = 0 00248 _x = self 00249 start = end 00250 end += 12 00251 (_x.targetTable.header.seq, _x.targetTable.header.stamp.secs, _x.targetTable.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.targetTable.header.frame_id = str[start:end] 00258 _x = self 00259 start = end 00260 end += 5 00261 (_x.targetTable.type, _x.targetTable.id,) = _struct_Bi.unpack(str[start:end]) 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 pattern = '<%sd'%length 00266 start = end 00267 end += struct.calcsize(pattern) 00268 self.targetTable.params = struct.unpack(pattern, str[start:end]) 00269 start = end 00270 end += 4 00271 (length,) = _struct_I.unpack(str[start:end]) 00272 self.targetTable.points = [] 00273 for i in range(0, length): 00274 val1 = sensor_msgs.msg.PointCloud2() 00275 _v3 = val1.header 00276 start = end 00277 end += 4 00278 (_v3.seq,) = _struct_I.unpack(str[start:end]) 00279 _v4 = _v3.stamp 00280 _x = _v4 00281 start = end 00282 end += 8 00283 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 start = end 00288 end += length 00289 _v3.frame_id = str[start:end] 00290 _x = val1 00291 start = end 00292 end += 8 00293 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00294 start = end 00295 end += 4 00296 (length,) = _struct_I.unpack(str[start:end]) 00297 val1.fields = [] 00298 for i in range(0, length): 00299 val2 = sensor_msgs.msg.PointField() 00300 start = end 00301 end += 4 00302 (length,) = _struct_I.unpack(str[start:end]) 00303 start = end 00304 end += length 00305 val2.name = str[start:end] 00306 _x = val2 00307 start = end 00308 end += 9 00309 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00310 val1.fields.append(val2) 00311 _x = val1 00312 start = end 00313 end += 9 00314 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00315 val1.is_bigendian = bool(val1.is_bigendian) 00316 start = end 00317 end += 4 00318 (length,) = _struct_I.unpack(str[start:end]) 00319 start = end 00320 end += length 00321 val1.data = str[start:end] 00322 start = end 00323 end += 1 00324 (val1.is_dense,) = _struct_B.unpack(str[start:end]) 00325 val1.is_dense = bool(val1.is_dense) 00326 self.targetTable.points.append(val1) 00327 start = end 00328 end += 4 00329 (length,) = _struct_I.unpack(str[start:end]) 00330 pattern = '<%si'%length 00331 start = end 00332 end += struct.calcsize(pattern) 00333 self.targetTable.vertices = struct.unpack(pattern, str[start:end]) 00334 _x = self 00335 start = end 00336 end += 28 00337 (_x.targetTable.centroid.x, _x.targetTable.centroid.y, _x.targetTable.centroid.z, _x.targetTable.color.r, _x.targetTable.color.g, _x.targetTable.color.b, _x.targetTable.color.a,) = _struct_7f.unpack(str[start:end]) 00338 start = end 00339 end += 4 00340 (length,) = _struct_I.unpack(str[start:end]) 00341 pattern = '<%sB'%length 00342 start = end 00343 end += struct.calcsize(pattern) 00344 self.targetTable.holes = struct.unpack(pattern, str[start:end]) 00345 self.targetTable.holes = map(bool, self.targetTable.holes) 00346 return self 00347 except struct.error as e: 00348 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00349 00350 00351 def serialize_numpy(self, buff, numpy): 00352 """ 00353 serialize message with numpy array types into buffer 00354 @param buff: buffer 00355 @type buff: StringIO 00356 @param numpy: numpy python module 00357 @type numpy module 00358 """ 00359 try: 00360 _x = self 00361 buff.write(_struct_3I.pack(_x.targetTable.header.seq, _x.targetTable.header.stamp.secs, _x.targetTable.header.stamp.nsecs)) 00362 _x = self.targetTable.header.frame_id 00363 length = len(_x) 00364 buff.write(struct.pack('<I%ss'%length, length, _x)) 00365 _x = self 00366 buff.write(_struct_Bi.pack(_x.targetTable.type, _x.targetTable.id)) 00367 length = len(self.targetTable.params) 00368 buff.write(_struct_I.pack(length)) 00369 pattern = '<%sd'%length 00370 buff.write(self.targetTable.params.tostring()) 00371 length = len(self.targetTable.points) 00372 buff.write(_struct_I.pack(length)) 00373 for val1 in self.targetTable.points: 00374 _v5 = val1.header 00375 buff.write(_struct_I.pack(_v5.seq)) 00376 _v6 = _v5.stamp 00377 _x = _v6 00378 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00379 _x = _v5.frame_id 00380 length = len(_x) 00381 buff.write(struct.pack('<I%ss'%length, length, _x)) 00382 _x = val1 00383 buff.write(_struct_2I.pack(_x.height, _x.width)) 00384 length = len(val1.fields) 00385 buff.write(_struct_I.pack(length)) 00386 for val2 in val1.fields: 00387 _x = val2.name 00388 length = len(_x) 00389 buff.write(struct.pack('<I%ss'%length, length, _x)) 00390 _x = val2 00391 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00392 _x = val1 00393 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00394 _x = val1.data 00395 length = len(_x) 00396 # - if encoded as a list instead, serialize as bytes instead of string 00397 if type(_x) in [list, tuple]: 00398 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00399 else: 00400 buff.write(struct.pack('<I%ss'%length, length, _x)) 00401 buff.write(_struct_B.pack(val1.is_dense)) 00402 length = len(self.targetTable.vertices) 00403 buff.write(_struct_I.pack(length)) 00404 pattern = '<%si'%length 00405 buff.write(self.targetTable.vertices.tostring()) 00406 _x = self 00407 buff.write(_struct_7f.pack(_x.targetTable.centroid.x, _x.targetTable.centroid.y, _x.targetTable.centroid.z, _x.targetTable.color.r, _x.targetTable.color.g, _x.targetTable.color.b, _x.targetTable.color.a)) 00408 length = len(self.targetTable.holes) 00409 buff.write(_struct_I.pack(length)) 00410 pattern = '<%sB'%length 00411 buff.write(self.targetTable.holes.tostring()) 00412 except struct.error as se: self._check_types(se) 00413 except TypeError as te: self._check_types(te) 00414 00415 def deserialize_numpy(self, str, numpy): 00416 """ 00417 unpack serialized message in str into this message instance using numpy for array types 00418 @param str: byte array of serialized message 00419 @type str: str 00420 @param numpy: numpy python module 00421 @type numpy: module 00422 """ 00423 try: 00424 if self.targetTable is None: 00425 self.targetTable = cob_3d_mapping_msgs.msg.Shape() 00426 end = 0 00427 _x = self 00428 start = end 00429 end += 12 00430 (_x.targetTable.header.seq, _x.targetTable.header.stamp.secs, _x.targetTable.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00431 start = end 00432 end += 4 00433 (length,) = _struct_I.unpack(str[start:end]) 00434 start = end 00435 end += length 00436 self.targetTable.header.frame_id = str[start:end] 00437 _x = self 00438 start = end 00439 end += 5 00440 (_x.targetTable.type, _x.targetTable.id,) = _struct_Bi.unpack(str[start:end]) 00441 start = end 00442 end += 4 00443 (length,) = _struct_I.unpack(str[start:end]) 00444 pattern = '<%sd'%length 00445 start = end 00446 end += struct.calcsize(pattern) 00447 self.targetTable.params = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00448 start = end 00449 end += 4 00450 (length,) = _struct_I.unpack(str[start:end]) 00451 self.targetTable.points = [] 00452 for i in range(0, length): 00453 val1 = sensor_msgs.msg.PointCloud2() 00454 _v7 = val1.header 00455 start = end 00456 end += 4 00457 (_v7.seq,) = _struct_I.unpack(str[start:end]) 00458 _v8 = _v7.stamp 00459 _x = _v8 00460 start = end 00461 end += 8 00462 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00463 start = end 00464 end += 4 00465 (length,) = _struct_I.unpack(str[start:end]) 00466 start = end 00467 end += length 00468 _v7.frame_id = str[start:end] 00469 _x = val1 00470 start = end 00471 end += 8 00472 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00473 start = end 00474 end += 4 00475 (length,) = _struct_I.unpack(str[start:end]) 00476 val1.fields = [] 00477 for i in range(0, length): 00478 val2 = sensor_msgs.msg.PointField() 00479 start = end 00480 end += 4 00481 (length,) = _struct_I.unpack(str[start:end]) 00482 start = end 00483 end += length 00484 val2.name = str[start:end] 00485 _x = val2 00486 start = end 00487 end += 9 00488 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00489 val1.fields.append(val2) 00490 _x = val1 00491 start = end 00492 end += 9 00493 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00494 val1.is_bigendian = bool(val1.is_bigendian) 00495 start = end 00496 end += 4 00497 (length,) = _struct_I.unpack(str[start:end]) 00498 start = end 00499 end += length 00500 val1.data = str[start:end] 00501 start = end 00502 end += 1 00503 (val1.is_dense,) = _struct_B.unpack(str[start:end]) 00504 val1.is_dense = bool(val1.is_dense) 00505 self.targetTable.points.append(val1) 00506 start = end 00507 end += 4 00508 (length,) = _struct_I.unpack(str[start:end]) 00509 pattern = '<%si'%length 00510 start = end 00511 end += struct.calcsize(pattern) 00512 self.targetTable.vertices = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00513 _x = self 00514 start = end 00515 end += 28 00516 (_x.targetTable.centroid.x, _x.targetTable.centroid.y, _x.targetTable.centroid.z, _x.targetTable.color.r, _x.targetTable.color.g, _x.targetTable.color.b, _x.targetTable.color.a,) = _struct_7f.unpack(str[start:end]) 00517 start = end 00518 end += 4 00519 (length,) = _struct_I.unpack(str[start:end]) 00520 pattern = '<%sB'%length 00521 start = end 00522 end += struct.calcsize(pattern) 00523 self.targetTable.holes = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 00524 self.targetTable.holes = map(bool, self.targetTable.holes) 00525 return self 00526 except struct.error as e: 00527 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00528 00529 _struct_I = roslib.message.struct_I 00530 _struct_IBI = struct.Struct("<IBI") 00531 _struct_B = struct.Struct("<B") 00532 _struct_7f = struct.Struct("<7f") 00533 _struct_Bi = struct.Struct("<Bi") 00534 _struct_3I = struct.Struct("<3I") 00535 _struct_B2I = struct.Struct("<B2I") 00536 _struct_2I = struct.Struct("<2I") 00537 """autogenerated by genmsg_py from MoveToTableResponse.msg. Do not edit.""" 00538 import roslib.message 00539 import struct 00540 00541 00542 class MoveToTableResponse(roslib.message.Message): 00543 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00544 _type = "cob_3d_mapping_msgs/MoveToTableResponse" 00545 _has_header = False #flag to mark the presence of a Header object 00546 _full_text = """ 00547 00548 """ 00549 __slots__ = [] 00550 _slot_types = [] 00551 00552 def __init__(self, *args, **kwds): 00553 """ 00554 Constructor. Any message fields that are implicitly/explicitly 00555 set to None will be assigned a default value. The recommend 00556 use is keyword arguments as this is more robust to future message 00557 changes. You cannot mix in-order arguments and keyword arguments. 00558 00559 The available fields are: 00560 00561 00562 @param args: complete set of field values, in .msg order 00563 @param kwds: use keyword arguments corresponding to message field names 00564 to set specific fields. 00565 """ 00566 if args or kwds: 00567 super(MoveToTableResponse, self).__init__(*args, **kwds) 00568 00569 def _get_types(self): 00570 """ 00571 internal API method 00572 """ 00573 return self._slot_types 00574 00575 def serialize(self, buff): 00576 """ 00577 serialize message into buffer 00578 @param buff: buffer 00579 @type buff: StringIO 00580 """ 00581 try: 00582 pass 00583 except struct.error as se: self._check_types(se) 00584 except TypeError as te: self._check_types(te) 00585 00586 def deserialize(self, str): 00587 """ 00588 unpack serialized message in str into this message instance 00589 @param str: byte array of serialized message 00590 @type str: str 00591 """ 00592 try: 00593 end = 0 00594 return self 00595 except struct.error as e: 00596 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00597 00598 00599 def serialize_numpy(self, buff, numpy): 00600 """ 00601 serialize message with numpy array types into buffer 00602 @param buff: buffer 00603 @type buff: StringIO 00604 @param numpy: numpy python module 00605 @type numpy module 00606 """ 00607 try: 00608 pass 00609 except struct.error as se: self._check_types(se) 00610 except TypeError as te: self._check_types(te) 00611 00612 def deserialize_numpy(self, str, numpy): 00613 """ 00614 unpack serialized message in str into this message instance using numpy for array types 00615 @param str: byte array of serialized message 00616 @type str: str 00617 @param numpy: numpy python module 00618 @type numpy: module 00619 """ 00620 try: 00621 end = 0 00622 return self 00623 except struct.error as e: 00624 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00625 00626 _struct_I = roslib.message.struct_I 00627 class MoveToTable(roslib.message.ServiceDefinition): 00628 _type = 'cob_3d_mapping_msgs/MoveToTable' 00629 _md5sum = '3b7a57dcd210456a84f72c91afc66417' 00630 _request_class = MoveToTableRequest 00631 _response_class = MoveToTableResponse