$search
00001 """autogenerated by genmsg_py from cornerFindRequest.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 cornerFindRequest(roslib.message.Message): 00009 _md5sum = "b13d2865c5af2a64e6e30ab1b56e1dd5" 00010 _type = "pr2_interactive_segmentation/cornerFindRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """sensor_msgs/Image image 00013 00014 ================================================================================ 00015 MSG: sensor_msgs/Image 00016 # This message contains an uncompressed image 00017 # (0, 0) is at top-left corner of image 00018 # 00019 00020 Header header # Header timestamp should be acquisition time of image 00021 # Header frame_id should be optical frame of camera 00022 # origin of frame should be optical center of cameara 00023 # +x should point to the right in the image 00024 # +y should point down in the image 00025 # +z should point into to plane of the image 00026 # If the frame_id here and the frame_id of the CameraInfo 00027 # message associated with the image conflict 00028 # the behavior is undefined 00029 00030 uint32 height # image height, that is, number of rows 00031 uint32 width # image width, that is, number of columns 00032 00033 # The legal values for encoding are in file src/image_encodings.cpp 00034 # If you want to standardize a new string format, join 00035 # ros-users@lists.sourceforge.net and send an email proposing a new encoding. 00036 00037 string encoding # Encoding of pixels -- channel meaning, ordering, size 00038 # taken from the list of strings in src/image_encodings.cpp 00039 00040 uint8 is_bigendian # is this data bigendian? 00041 uint32 step # Full row length in bytes 00042 uint8[] data # actual matrix data, size is (step * rows) 00043 00044 ================================================================================ 00045 MSG: std_msgs/Header 00046 # Standard metadata for higher-level stamped data types. 00047 # This is generally used to communicate timestamped data 00048 # in a particular coordinate frame. 00049 # 00050 # sequence ID: consecutively increasing ID 00051 uint32 seq 00052 #Two-integer timestamp that is expressed as: 00053 # * stamp.secs: seconds (stamp_secs) since epoch 00054 # * stamp.nsecs: nanoseconds since stamp_secs 00055 # time-handling sugar is provided by the client library 00056 time stamp 00057 #Frame this data is associated with 00058 # 0: no frame 00059 # 1: global frame 00060 string frame_id 00061 00062 """ 00063 __slots__ = ['image'] 00064 _slot_types = ['sensor_msgs/Image'] 00065 00066 def __init__(self, *args, **kwds): 00067 """ 00068 Constructor. Any message fields that are implicitly/explicitly 00069 set to None will be assigned a default value. The recommend 00070 use is keyword arguments as this is more robust to future message 00071 changes. You cannot mix in-order arguments and keyword arguments. 00072 00073 The available fields are: 00074 image 00075 00076 @param args: complete set of field values, in .msg order 00077 @param kwds: use keyword arguments corresponding to message field names 00078 to set specific fields. 00079 """ 00080 if args or kwds: 00081 super(cornerFindRequest, self).__init__(*args, **kwds) 00082 #message fields cannot be None, assign default values for those that are 00083 if self.image is None: 00084 self.image = sensor_msgs.msg.Image() 00085 else: 00086 self.image = sensor_msgs.msg.Image() 00087 00088 def _get_types(self): 00089 """ 00090 internal API method 00091 """ 00092 return self._slot_types 00093 00094 def serialize(self, buff): 00095 """ 00096 serialize message into buffer 00097 @param buff: buffer 00098 @type buff: StringIO 00099 """ 00100 try: 00101 _x = self 00102 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs)) 00103 _x = self.image.header.frame_id 00104 length = len(_x) 00105 buff.write(struct.pack('<I%ss'%length, length, _x)) 00106 _x = self 00107 buff.write(_struct_2I.pack(_x.image.height, _x.image.width)) 00108 _x = self.image.encoding 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 _x = self 00112 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step)) 00113 _x = self.image.data 00114 length = len(_x) 00115 # - if encoded as a list instead, serialize as bytes instead of string 00116 if type(_x) in [list, tuple]: 00117 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00118 else: 00119 buff.write(struct.pack('<I%ss'%length, length, _x)) 00120 except struct.error as se: self._check_types(se) 00121 except TypeError as te: self._check_types(te) 00122 00123 def deserialize(self, str): 00124 """ 00125 unpack serialized message in str into this message instance 00126 @param str: byte array of serialized message 00127 @type str: str 00128 """ 00129 try: 00130 if self.image is None: 00131 self.image = sensor_msgs.msg.Image() 00132 end = 0 00133 _x = self 00134 start = end 00135 end += 12 00136 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00137 start = end 00138 end += 4 00139 (length,) = _struct_I.unpack(str[start:end]) 00140 start = end 00141 end += length 00142 self.image.header.frame_id = str[start:end] 00143 _x = self 00144 start = end 00145 end += 8 00146 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end]) 00147 start = end 00148 end += 4 00149 (length,) = _struct_I.unpack(str[start:end]) 00150 start = end 00151 end += length 00152 self.image.encoding = str[start:end] 00153 _x = self 00154 start = end 00155 end += 5 00156 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end]) 00157 start = end 00158 end += 4 00159 (length,) = _struct_I.unpack(str[start:end]) 00160 start = end 00161 end += length 00162 self.image.data = str[start:end] 00163 return self 00164 except struct.error as e: 00165 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00166 00167 00168 def serialize_numpy(self, buff, numpy): 00169 """ 00170 serialize message with numpy array types into buffer 00171 @param buff: buffer 00172 @type buff: StringIO 00173 @param numpy: numpy python module 00174 @type numpy module 00175 """ 00176 try: 00177 _x = self 00178 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs)) 00179 _x = self.image.header.frame_id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 _x = self 00183 buff.write(_struct_2I.pack(_x.image.height, _x.image.width)) 00184 _x = self.image.encoding 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 _x = self 00188 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step)) 00189 _x = self.image.data 00190 length = len(_x) 00191 # - if encoded as a list instead, serialize as bytes instead of string 00192 if type(_x) in [list, tuple]: 00193 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00194 else: 00195 buff.write(struct.pack('<I%ss'%length, length, _x)) 00196 except struct.error as se: self._check_types(se) 00197 except TypeError as te: self._check_types(te) 00198 00199 def deserialize_numpy(self, str, numpy): 00200 """ 00201 unpack serialized message in str into this message instance using numpy for array types 00202 @param str: byte array of serialized message 00203 @type str: str 00204 @param numpy: numpy python module 00205 @type numpy: module 00206 """ 00207 try: 00208 if self.image is None: 00209 self.image = sensor_msgs.msg.Image() 00210 end = 0 00211 _x = self 00212 start = end 00213 end += 12 00214 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00215 start = end 00216 end += 4 00217 (length,) = _struct_I.unpack(str[start:end]) 00218 start = end 00219 end += length 00220 self.image.header.frame_id = str[start:end] 00221 _x = self 00222 start = end 00223 end += 8 00224 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end]) 00225 start = end 00226 end += 4 00227 (length,) = _struct_I.unpack(str[start:end]) 00228 start = end 00229 end += length 00230 self.image.encoding = str[start:end] 00231 _x = self 00232 start = end 00233 end += 5 00234 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end]) 00235 start = end 00236 end += 4 00237 (length,) = _struct_I.unpack(str[start:end]) 00238 start = end 00239 end += length 00240 self.image.data = str[start:end] 00241 return self 00242 except struct.error as e: 00243 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00244 00245 _struct_I = roslib.message.struct_I 00246 _struct_3I = struct.Struct("<3I") 00247 _struct_2I = struct.Struct("<2I") 00248 _struct_BI = struct.Struct("<BI") 00249 """autogenerated by genmsg_py from cornerFindResponse.msg. Do not edit.""" 00250 import roslib.message 00251 import struct 00252 00253 import geometry_msgs.msg 00254 00255 class cornerFindResponse(roslib.message.Message): 00256 _md5sum = "4b09fc7def371137a597cd91369399bc" 00257 _type = "pr2_interactive_segmentation/cornerFindResponse" 00258 _has_header = False #flag to mark the presence of a Header object 00259 _full_text = """geometry_msgs/Point[] corner 00260 geometry_msgs/Point32[] push_direction 00261 geometry_msgs/Point[] corner_convex 00262 geometry_msgs/Point32[] push_direction_convex 00263 00264 00265 ================================================================================ 00266 MSG: geometry_msgs/Point 00267 # This contains the position of a point in free space 00268 float64 x 00269 float64 y 00270 float64 z 00271 00272 ================================================================================ 00273 MSG: geometry_msgs/Point32 00274 # This contains the position of a point in free space(with 32 bits of precision). 00275 # It is recommeded to use Point wherever possible instead of Point32. 00276 # 00277 # This recommendation is to promote interoperability. 00278 # 00279 # This message is designed to take up less space when sending 00280 # lots of points at once, as in the case of a PointCloud. 00281 00282 float32 x 00283 float32 y 00284 float32 z 00285 """ 00286 __slots__ = ['corner','push_direction','corner_convex','push_direction_convex'] 00287 _slot_types = ['geometry_msgs/Point[]','geometry_msgs/Point32[]','geometry_msgs/Point[]','geometry_msgs/Point32[]'] 00288 00289 def __init__(self, *args, **kwds): 00290 """ 00291 Constructor. Any message fields that are implicitly/explicitly 00292 set to None will be assigned a default value. The recommend 00293 use is keyword arguments as this is more robust to future message 00294 changes. You cannot mix in-order arguments and keyword arguments. 00295 00296 The available fields are: 00297 corner,push_direction,corner_convex,push_direction_convex 00298 00299 @param args: complete set of field values, in .msg order 00300 @param kwds: use keyword arguments corresponding to message field names 00301 to set specific fields. 00302 """ 00303 if args or kwds: 00304 super(cornerFindResponse, self).__init__(*args, **kwds) 00305 #message fields cannot be None, assign default values for those that are 00306 if self.corner is None: 00307 self.corner = [] 00308 if self.push_direction is None: 00309 self.push_direction = [] 00310 if self.corner_convex is None: 00311 self.corner_convex = [] 00312 if self.push_direction_convex is None: 00313 self.push_direction_convex = [] 00314 else: 00315 self.corner = [] 00316 self.push_direction = [] 00317 self.corner_convex = [] 00318 self.push_direction_convex = [] 00319 00320 def _get_types(self): 00321 """ 00322 internal API method 00323 """ 00324 return self._slot_types 00325 00326 def serialize(self, buff): 00327 """ 00328 serialize message into buffer 00329 @param buff: buffer 00330 @type buff: StringIO 00331 """ 00332 try: 00333 length = len(self.corner) 00334 buff.write(_struct_I.pack(length)) 00335 for val1 in self.corner: 00336 _x = val1 00337 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00338 length = len(self.push_direction) 00339 buff.write(_struct_I.pack(length)) 00340 for val1 in self.push_direction: 00341 _x = val1 00342 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00343 length = len(self.corner_convex) 00344 buff.write(_struct_I.pack(length)) 00345 for val1 in self.corner_convex: 00346 _x = val1 00347 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00348 length = len(self.push_direction_convex) 00349 buff.write(_struct_I.pack(length)) 00350 for val1 in self.push_direction_convex: 00351 _x = val1 00352 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00353 except struct.error as se: self._check_types(se) 00354 except TypeError as te: self._check_types(te) 00355 00356 def deserialize(self, str): 00357 """ 00358 unpack serialized message in str into this message instance 00359 @param str: byte array of serialized message 00360 @type str: str 00361 """ 00362 try: 00363 end = 0 00364 start = end 00365 end += 4 00366 (length,) = _struct_I.unpack(str[start:end]) 00367 self.corner = [] 00368 for i in range(0, length): 00369 val1 = geometry_msgs.msg.Point() 00370 _x = val1 00371 start = end 00372 end += 24 00373 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00374 self.corner.append(val1) 00375 start = end 00376 end += 4 00377 (length,) = _struct_I.unpack(str[start:end]) 00378 self.push_direction = [] 00379 for i in range(0, length): 00380 val1 = geometry_msgs.msg.Point32() 00381 _x = val1 00382 start = end 00383 end += 12 00384 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00385 self.push_direction.append(val1) 00386 start = end 00387 end += 4 00388 (length,) = _struct_I.unpack(str[start:end]) 00389 self.corner_convex = [] 00390 for i in range(0, length): 00391 val1 = geometry_msgs.msg.Point() 00392 _x = val1 00393 start = end 00394 end += 24 00395 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00396 self.corner_convex.append(val1) 00397 start = end 00398 end += 4 00399 (length,) = _struct_I.unpack(str[start:end]) 00400 self.push_direction_convex = [] 00401 for i in range(0, length): 00402 val1 = geometry_msgs.msg.Point32() 00403 _x = val1 00404 start = end 00405 end += 12 00406 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00407 self.push_direction_convex.append(val1) 00408 return self 00409 except struct.error as e: 00410 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00411 00412 00413 def serialize_numpy(self, buff, numpy): 00414 """ 00415 serialize message with numpy array types into buffer 00416 @param buff: buffer 00417 @type buff: StringIO 00418 @param numpy: numpy python module 00419 @type numpy module 00420 """ 00421 try: 00422 length = len(self.corner) 00423 buff.write(_struct_I.pack(length)) 00424 for val1 in self.corner: 00425 _x = val1 00426 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00427 length = len(self.push_direction) 00428 buff.write(_struct_I.pack(length)) 00429 for val1 in self.push_direction: 00430 _x = val1 00431 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00432 length = len(self.corner_convex) 00433 buff.write(_struct_I.pack(length)) 00434 for val1 in self.corner_convex: 00435 _x = val1 00436 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00437 length = len(self.push_direction_convex) 00438 buff.write(_struct_I.pack(length)) 00439 for val1 in self.push_direction_convex: 00440 _x = val1 00441 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00442 except struct.error as se: self._check_types(se) 00443 except TypeError as te: self._check_types(te) 00444 00445 def deserialize_numpy(self, str, numpy): 00446 """ 00447 unpack serialized message in str into this message instance using numpy for array types 00448 @param str: byte array of serialized message 00449 @type str: str 00450 @param numpy: numpy python module 00451 @type numpy: module 00452 """ 00453 try: 00454 end = 0 00455 start = end 00456 end += 4 00457 (length,) = _struct_I.unpack(str[start:end]) 00458 self.corner = [] 00459 for i in range(0, length): 00460 val1 = geometry_msgs.msg.Point() 00461 _x = val1 00462 start = end 00463 end += 24 00464 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00465 self.corner.append(val1) 00466 start = end 00467 end += 4 00468 (length,) = _struct_I.unpack(str[start:end]) 00469 self.push_direction = [] 00470 for i in range(0, length): 00471 val1 = geometry_msgs.msg.Point32() 00472 _x = val1 00473 start = end 00474 end += 12 00475 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00476 self.push_direction.append(val1) 00477 start = end 00478 end += 4 00479 (length,) = _struct_I.unpack(str[start:end]) 00480 self.corner_convex = [] 00481 for i in range(0, length): 00482 val1 = geometry_msgs.msg.Point() 00483 _x = val1 00484 start = end 00485 end += 24 00486 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00487 self.corner_convex.append(val1) 00488 start = end 00489 end += 4 00490 (length,) = _struct_I.unpack(str[start:end]) 00491 self.push_direction_convex = [] 00492 for i in range(0, length): 00493 val1 = geometry_msgs.msg.Point32() 00494 _x = val1 00495 start = end 00496 end += 12 00497 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00498 self.push_direction_convex.append(val1) 00499 return self 00500 except struct.error as e: 00501 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00502 00503 _struct_I = roslib.message.struct_I 00504 _struct_3f = struct.Struct("<3f") 00505 _struct_3d = struct.Struct("<3d") 00506 class cornerFind(roslib.message.ServiceDefinition): 00507 _type = 'pr2_interactive_segmentation/cornerFind' 00508 _md5sum = 'ac8d58fdb334d1d395d0c60410ea3eb1' 00509 _request_class = cornerFindRequest 00510 _response_class = cornerFindResponse