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