00001 """autogenerated by genpy from zyonz_obtain_roi_jump_edge_based/ExtractTwoLeavesRoiRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import std_msgs.msg
00008 import sensor_msgs.msg
00009
00010 class ExtractTwoLeavesRoiRequest(genpy.Message):
00011 _md5sum = "9d1fa894fa9d6a4cd9c06f0055af0613"
00012 _type = "zyonz_obtain_roi_jump_edge_based/ExtractTwoLeavesRoiRequest"
00013 _has_header = False
00014 _full_text = """
00015 sensor_msgs/Image cluster_a_img
00016 sensor_msgs/Image cluster_b_img
00017 sensor_msgs/Image residual_img
00018 sensor_msgs/PointCloud2 residual_pc
00019
00020 ================================================================================
00021 MSG: sensor_msgs/Image
00022 # This message contains an uncompressed image
00023 # (0, 0) is at top-left corner of image
00024 #
00025
00026 Header header # Header timestamp should be acquisition time of image
00027 # Header frame_id should be optical frame of camera
00028 # origin of frame should be optical center of cameara
00029 # +x should point to the right in the image
00030 # +y should point down in the image
00031 # +z should point into to plane of the image
00032 # If the frame_id here and the frame_id of the CameraInfo
00033 # message associated with the image conflict
00034 # the behavior is undefined
00035
00036 uint32 height # image height, that is, number of rows
00037 uint32 width # image width, that is, number of columns
00038
00039 # The legal values for encoding are in file src/image_encodings.cpp
00040 # If you want to standardize a new string format, join
00041 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00042
00043 string encoding # Encoding of pixels -- channel meaning, ordering, size
00044 # taken from the list of strings in src/image_encodings.cpp
00045
00046 uint8 is_bigendian # is this data bigendian?
00047 uint32 step # Full row length in bytes
00048 uint8[] data # actual matrix data, size is (step * rows)
00049
00050 ================================================================================
00051 MSG: std_msgs/Header
00052 # Standard metadata for higher-level stamped data types.
00053 # This is generally used to communicate timestamped data
00054 # in a particular coordinate frame.
00055 #
00056 # sequence ID: consecutively increasing ID
00057 uint32 seq
00058 #Two-integer timestamp that is expressed as:
00059 # * stamp.secs: seconds (stamp_secs) since epoch
00060 # * stamp.nsecs: nanoseconds since stamp_secs
00061 # time-handling sugar is provided by the client library
00062 time stamp
00063 #Frame this data is associated with
00064 # 0: no frame
00065 # 1: global frame
00066 string frame_id
00067
00068 ================================================================================
00069 MSG: sensor_msgs/PointCloud2
00070 # This message holds a collection of N-dimensional points, which may
00071 # contain additional information such as normals, intensity, etc. The
00072 # point data is stored as a binary blob, its layout described by the
00073 # contents of the "fields" array.
00074
00075 # The point cloud data may be organized 2d (image-like) or 1d
00076 # (unordered). Point clouds organized as 2d images may be produced by
00077 # camera depth sensors such as stereo or time-of-flight.
00078
00079 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00080 # points).
00081 Header header
00082
00083 # 2D structure of the point cloud. If the cloud is unordered, height is
00084 # 1 and width is the length of the point cloud.
00085 uint32 height
00086 uint32 width
00087
00088 # Describes the channels and their layout in the binary data blob.
00089 PointField[] fields
00090
00091 bool is_bigendian # Is this data bigendian?
00092 uint32 point_step # Length of a point in bytes
00093 uint32 row_step # Length of a row in bytes
00094 uint8[] data # Actual point data, size is (row_step*height)
00095
00096 bool is_dense # True if there are no invalid points
00097
00098 ================================================================================
00099 MSG: sensor_msgs/PointField
00100 # This message holds the description of one point entry in the
00101 # PointCloud2 message format.
00102 uint8 INT8 = 1
00103 uint8 UINT8 = 2
00104 uint8 INT16 = 3
00105 uint8 UINT16 = 4
00106 uint8 INT32 = 5
00107 uint8 UINT32 = 6
00108 uint8 FLOAT32 = 7
00109 uint8 FLOAT64 = 8
00110
00111 string name # Name of field
00112 uint32 offset # Offset from start of point struct
00113 uint8 datatype # Datatype enumeration, see above
00114 uint32 count # How many elements in the field
00115
00116 """
00117 __slots__ = ['cluster_a_img','cluster_b_img','residual_img','residual_pc']
00118 _slot_types = ['sensor_msgs/Image','sensor_msgs/Image','sensor_msgs/Image','sensor_msgs/PointCloud2']
00119
00120 def __init__(self, *args, **kwds):
00121 """
00122 Constructor. Any message fields that are implicitly/explicitly
00123 set to None will be assigned a default value. The recommend
00124 use is keyword arguments as this is more robust to future message
00125 changes. You cannot mix in-order arguments and keyword arguments.
00126
00127 The available fields are:
00128 cluster_a_img,cluster_b_img,residual_img,residual_pc
00129
00130 :param args: complete set of field values, in .msg order
00131 :param kwds: use keyword arguments corresponding to message field names
00132 to set specific fields.
00133 """
00134 if args or kwds:
00135 super(ExtractTwoLeavesRoiRequest, self).__init__(*args, **kwds)
00136
00137 if self.cluster_a_img is None:
00138 self.cluster_a_img = sensor_msgs.msg.Image()
00139 if self.cluster_b_img is None:
00140 self.cluster_b_img = sensor_msgs.msg.Image()
00141 if self.residual_img is None:
00142 self.residual_img = sensor_msgs.msg.Image()
00143 if self.residual_pc is None:
00144 self.residual_pc = sensor_msgs.msg.PointCloud2()
00145 else:
00146 self.cluster_a_img = sensor_msgs.msg.Image()
00147 self.cluster_b_img = sensor_msgs.msg.Image()
00148 self.residual_img = sensor_msgs.msg.Image()
00149 self.residual_pc = sensor_msgs.msg.PointCloud2()
00150
00151 def _get_types(self):
00152 """
00153 internal API method
00154 """
00155 return self._slot_types
00156
00157 def serialize(self, buff):
00158 """
00159 serialize message into buffer
00160 :param buff: buffer, ``StringIO``
00161 """
00162 try:
00163 _x = self
00164 buff.write(_struct_3I.pack(_x.cluster_a_img.header.seq, _x.cluster_a_img.header.stamp.secs, _x.cluster_a_img.header.stamp.nsecs))
00165 _x = self.cluster_a_img.header.frame_id
00166 length = len(_x)
00167 if python3 or type(_x) == unicode:
00168 _x = _x.encode('utf-8')
00169 length = len(_x)
00170 buff.write(struct.pack('<I%ss'%length, length, _x))
00171 _x = self
00172 buff.write(_struct_2I.pack(_x.cluster_a_img.height, _x.cluster_a_img.width))
00173 _x = self.cluster_a_img.encoding
00174 length = len(_x)
00175 if python3 or type(_x) == unicode:
00176 _x = _x.encode('utf-8')
00177 length = len(_x)
00178 buff.write(struct.pack('<I%ss'%length, length, _x))
00179 _x = self
00180 buff.write(_struct_BI.pack(_x.cluster_a_img.is_bigendian, _x.cluster_a_img.step))
00181 _x = self.cluster_a_img.data
00182 length = len(_x)
00183
00184 if type(_x) in [list, tuple]:
00185 buff.write(struct.pack('<I%sB'%length, length, *_x))
00186 else:
00187 buff.write(struct.pack('<I%ss'%length, length, _x))
00188 _x = self
00189 buff.write(_struct_3I.pack(_x.cluster_b_img.header.seq, _x.cluster_b_img.header.stamp.secs, _x.cluster_b_img.header.stamp.nsecs))
00190 _x = self.cluster_b_img.header.frame_id
00191 length = len(_x)
00192 if python3 or type(_x) == unicode:
00193 _x = _x.encode('utf-8')
00194 length = len(_x)
00195 buff.write(struct.pack('<I%ss'%length, length, _x))
00196 _x = self
00197 buff.write(_struct_2I.pack(_x.cluster_b_img.height, _x.cluster_b_img.width))
00198 _x = self.cluster_b_img.encoding
00199 length = len(_x)
00200 if python3 or type(_x) == unicode:
00201 _x = _x.encode('utf-8')
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 _x = self
00205 buff.write(_struct_BI.pack(_x.cluster_b_img.is_bigendian, _x.cluster_b_img.step))
00206 _x = self.cluster_b_img.data
00207 length = len(_x)
00208
00209 if type(_x) in [list, tuple]:
00210 buff.write(struct.pack('<I%sB'%length, length, *_x))
00211 else:
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 _x = self
00214 buff.write(_struct_3I.pack(_x.residual_img.header.seq, _x.residual_img.header.stamp.secs, _x.residual_img.header.stamp.nsecs))
00215 _x = self.residual_img.header.frame_id
00216 length = len(_x)
00217 if python3 or type(_x) == unicode:
00218 _x = _x.encode('utf-8')
00219 length = len(_x)
00220 buff.write(struct.pack('<I%ss'%length, length, _x))
00221 _x = self
00222 buff.write(_struct_2I.pack(_x.residual_img.height, _x.residual_img.width))
00223 _x = self.residual_img.encoding
00224 length = len(_x)
00225 if python3 or type(_x) == unicode:
00226 _x = _x.encode('utf-8')
00227 length = len(_x)
00228 buff.write(struct.pack('<I%ss'%length, length, _x))
00229 _x = self
00230 buff.write(_struct_BI.pack(_x.residual_img.is_bigendian, _x.residual_img.step))
00231 _x = self.residual_img.data
00232 length = len(_x)
00233
00234 if type(_x) in [list, tuple]:
00235 buff.write(struct.pack('<I%sB'%length, length, *_x))
00236 else:
00237 buff.write(struct.pack('<I%ss'%length, length, _x))
00238 _x = self
00239 buff.write(_struct_3I.pack(_x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs))
00240 _x = self.residual_pc.header.frame_id
00241 length = len(_x)
00242 if python3 or type(_x) == unicode:
00243 _x = _x.encode('utf-8')
00244 length = len(_x)
00245 buff.write(struct.pack('<I%ss'%length, length, _x))
00246 _x = self
00247 buff.write(_struct_2I.pack(_x.residual_pc.height, _x.residual_pc.width))
00248 length = len(self.residual_pc.fields)
00249 buff.write(_struct_I.pack(length))
00250 for val1 in self.residual_pc.fields:
00251 _x = val1.name
00252 length = len(_x)
00253 if python3 or type(_x) == unicode:
00254 _x = _x.encode('utf-8')
00255 length = len(_x)
00256 buff.write(struct.pack('<I%ss'%length, length, _x))
00257 _x = val1
00258 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00259 _x = self
00260 buff.write(_struct_B2I.pack(_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step))
00261 _x = self.residual_pc.data
00262 length = len(_x)
00263
00264 if type(_x) in [list, tuple]:
00265 buff.write(struct.pack('<I%sB'%length, length, *_x))
00266 else:
00267 buff.write(struct.pack('<I%ss'%length, length, _x))
00268 buff.write(_struct_B.pack(self.residual_pc.is_dense))
00269 except struct.error as se: self._check_types(se)
00270 except TypeError as te: self._check_types(te)
00271
00272 def deserialize(self, str):
00273 """
00274 unpack serialized message in str into this message instance
00275 :param str: byte array of serialized message, ``str``
00276 """
00277 try:
00278 if self.cluster_a_img is None:
00279 self.cluster_a_img = sensor_msgs.msg.Image()
00280 if self.cluster_b_img is None:
00281 self.cluster_b_img = sensor_msgs.msg.Image()
00282 if self.residual_img is None:
00283 self.residual_img = sensor_msgs.msg.Image()
00284 if self.residual_pc is None:
00285 self.residual_pc = sensor_msgs.msg.PointCloud2()
00286 end = 0
00287 _x = self
00288 start = end
00289 end += 12
00290 (_x.cluster_a_img.header.seq, _x.cluster_a_img.header.stamp.secs, _x.cluster_a_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.cluster_a_img.header.frame_id = str[start:end].decode('utf-8')
00298 else:
00299 self.cluster_a_img.header.frame_id = str[start:end]
00300 _x = self
00301 start = end
00302 end += 8
00303 (_x.cluster_a_img.height, _x.cluster_a_img.width,) = _struct_2I.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 if python3:
00310 self.cluster_a_img.encoding = str[start:end].decode('utf-8')
00311 else:
00312 self.cluster_a_img.encoding = str[start:end]
00313 _x = self
00314 start = end
00315 end += 5
00316 (_x.cluster_a_img.is_bigendian, _x.cluster_a_img.step,) = _struct_BI.unpack(str[start:end])
00317 start = end
00318 end += 4
00319 (length,) = _struct_I.unpack(str[start:end])
00320 start = end
00321 end += length
00322 if python3:
00323 self.cluster_a_img.data = str[start:end].decode('utf-8')
00324 else:
00325 self.cluster_a_img.data = str[start:end]
00326 _x = self
00327 start = end
00328 end += 12
00329 (_x.cluster_b_img.header.seq, _x.cluster_b_img.header.stamp.secs, _x.cluster_b_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00330 start = end
00331 end += 4
00332 (length,) = _struct_I.unpack(str[start:end])
00333 start = end
00334 end += length
00335 if python3:
00336 self.cluster_b_img.header.frame_id = str[start:end].decode('utf-8')
00337 else:
00338 self.cluster_b_img.header.frame_id = str[start:end]
00339 _x = self
00340 start = end
00341 end += 8
00342 (_x.cluster_b_img.height, _x.cluster_b_img.width,) = _struct_2I.unpack(str[start:end])
00343 start = end
00344 end += 4
00345 (length,) = _struct_I.unpack(str[start:end])
00346 start = end
00347 end += length
00348 if python3:
00349 self.cluster_b_img.encoding = str[start:end].decode('utf-8')
00350 else:
00351 self.cluster_b_img.encoding = str[start:end]
00352 _x = self
00353 start = end
00354 end += 5
00355 (_x.cluster_b_img.is_bigendian, _x.cluster_b_img.step,) = _struct_BI.unpack(str[start:end])
00356 start = end
00357 end += 4
00358 (length,) = _struct_I.unpack(str[start:end])
00359 start = end
00360 end += length
00361 if python3:
00362 self.cluster_b_img.data = str[start:end].decode('utf-8')
00363 else:
00364 self.cluster_b_img.data = str[start:end]
00365 _x = self
00366 start = end
00367 end += 12
00368 (_x.residual_img.header.seq, _x.residual_img.header.stamp.secs, _x.residual_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00369 start = end
00370 end += 4
00371 (length,) = _struct_I.unpack(str[start:end])
00372 start = end
00373 end += length
00374 if python3:
00375 self.residual_img.header.frame_id = str[start:end].decode('utf-8')
00376 else:
00377 self.residual_img.header.frame_id = str[start:end]
00378 _x = self
00379 start = end
00380 end += 8
00381 (_x.residual_img.height, _x.residual_img.width,) = _struct_2I.unpack(str[start:end])
00382 start = end
00383 end += 4
00384 (length,) = _struct_I.unpack(str[start:end])
00385 start = end
00386 end += length
00387 if python3:
00388 self.residual_img.encoding = str[start:end].decode('utf-8')
00389 else:
00390 self.residual_img.encoding = str[start:end]
00391 _x = self
00392 start = end
00393 end += 5
00394 (_x.residual_img.is_bigendian, _x.residual_img.step,) = _struct_BI.unpack(str[start:end])
00395 start = end
00396 end += 4
00397 (length,) = _struct_I.unpack(str[start:end])
00398 start = end
00399 end += length
00400 if python3:
00401 self.residual_img.data = str[start:end].decode('utf-8')
00402 else:
00403 self.residual_img.data = str[start:end]
00404 _x = self
00405 start = end
00406 end += 12
00407 (_x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00408 start = end
00409 end += 4
00410 (length,) = _struct_I.unpack(str[start:end])
00411 start = end
00412 end += length
00413 if python3:
00414 self.residual_pc.header.frame_id = str[start:end].decode('utf-8')
00415 else:
00416 self.residual_pc.header.frame_id = str[start:end]
00417 _x = self
00418 start = end
00419 end += 8
00420 (_x.residual_pc.height, _x.residual_pc.width,) = _struct_2I.unpack(str[start:end])
00421 start = end
00422 end += 4
00423 (length,) = _struct_I.unpack(str[start:end])
00424 self.residual_pc.fields = []
00425 for i in range(0, length):
00426 val1 = sensor_msgs.msg.PointField()
00427 start = end
00428 end += 4
00429 (length,) = _struct_I.unpack(str[start:end])
00430 start = end
00431 end += length
00432 if python3:
00433 val1.name = str[start:end].decode('utf-8')
00434 else:
00435 val1.name = str[start:end]
00436 _x = val1
00437 start = end
00438 end += 9
00439 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00440 self.residual_pc.fields.append(val1)
00441 _x = self
00442 start = end
00443 end += 9
00444 (_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00445 self.residual_pc.is_bigendian = bool(self.residual_pc.is_bigendian)
00446 start = end
00447 end += 4
00448 (length,) = _struct_I.unpack(str[start:end])
00449 start = end
00450 end += length
00451 if python3:
00452 self.residual_pc.data = str[start:end].decode('utf-8')
00453 else:
00454 self.residual_pc.data = str[start:end]
00455 start = end
00456 end += 1
00457 (self.residual_pc.is_dense,) = _struct_B.unpack(str[start:end])
00458 self.residual_pc.is_dense = bool(self.residual_pc.is_dense)
00459 return self
00460 except struct.error as e:
00461 raise genpy.DeserializationError(e)
00462
00463
00464 def serialize_numpy(self, buff, numpy):
00465 """
00466 serialize message with numpy array types into buffer
00467 :param buff: buffer, ``StringIO``
00468 :param numpy: numpy python module
00469 """
00470 try:
00471 _x = self
00472 buff.write(_struct_3I.pack(_x.cluster_a_img.header.seq, _x.cluster_a_img.header.stamp.secs, _x.cluster_a_img.header.stamp.nsecs))
00473 _x = self.cluster_a_img.header.frame_id
00474 length = len(_x)
00475 if python3 or type(_x) == unicode:
00476 _x = _x.encode('utf-8')
00477 length = len(_x)
00478 buff.write(struct.pack('<I%ss'%length, length, _x))
00479 _x = self
00480 buff.write(_struct_2I.pack(_x.cluster_a_img.height, _x.cluster_a_img.width))
00481 _x = self.cluster_a_img.encoding
00482 length = len(_x)
00483 if python3 or type(_x) == unicode:
00484 _x = _x.encode('utf-8')
00485 length = len(_x)
00486 buff.write(struct.pack('<I%ss'%length, length, _x))
00487 _x = self
00488 buff.write(_struct_BI.pack(_x.cluster_a_img.is_bigendian, _x.cluster_a_img.step))
00489 _x = self.cluster_a_img.data
00490 length = len(_x)
00491
00492 if type(_x) in [list, tuple]:
00493 buff.write(struct.pack('<I%sB'%length, length, *_x))
00494 else:
00495 buff.write(struct.pack('<I%ss'%length, length, _x))
00496 _x = self
00497 buff.write(_struct_3I.pack(_x.cluster_b_img.header.seq, _x.cluster_b_img.header.stamp.secs, _x.cluster_b_img.header.stamp.nsecs))
00498 _x = self.cluster_b_img.header.frame_id
00499 length = len(_x)
00500 if python3 or type(_x) == unicode:
00501 _x = _x.encode('utf-8')
00502 length = len(_x)
00503 buff.write(struct.pack('<I%ss'%length, length, _x))
00504 _x = self
00505 buff.write(_struct_2I.pack(_x.cluster_b_img.height, _x.cluster_b_img.width))
00506 _x = self.cluster_b_img.encoding
00507 length = len(_x)
00508 if python3 or type(_x) == unicode:
00509 _x = _x.encode('utf-8')
00510 length = len(_x)
00511 buff.write(struct.pack('<I%ss'%length, length, _x))
00512 _x = self
00513 buff.write(_struct_BI.pack(_x.cluster_b_img.is_bigendian, _x.cluster_b_img.step))
00514 _x = self.cluster_b_img.data
00515 length = len(_x)
00516
00517 if type(_x) in [list, tuple]:
00518 buff.write(struct.pack('<I%sB'%length, length, *_x))
00519 else:
00520 buff.write(struct.pack('<I%ss'%length, length, _x))
00521 _x = self
00522 buff.write(_struct_3I.pack(_x.residual_img.header.seq, _x.residual_img.header.stamp.secs, _x.residual_img.header.stamp.nsecs))
00523 _x = self.residual_img.header.frame_id
00524 length = len(_x)
00525 if python3 or type(_x) == unicode:
00526 _x = _x.encode('utf-8')
00527 length = len(_x)
00528 buff.write(struct.pack('<I%ss'%length, length, _x))
00529 _x = self
00530 buff.write(_struct_2I.pack(_x.residual_img.height, _x.residual_img.width))
00531 _x = self.residual_img.encoding
00532 length = len(_x)
00533 if python3 or type(_x) == unicode:
00534 _x = _x.encode('utf-8')
00535 length = len(_x)
00536 buff.write(struct.pack('<I%ss'%length, length, _x))
00537 _x = self
00538 buff.write(_struct_BI.pack(_x.residual_img.is_bigendian, _x.residual_img.step))
00539 _x = self.residual_img.data
00540 length = len(_x)
00541
00542 if type(_x) in [list, tuple]:
00543 buff.write(struct.pack('<I%sB'%length, length, *_x))
00544 else:
00545 buff.write(struct.pack('<I%ss'%length, length, _x))
00546 _x = self
00547 buff.write(_struct_3I.pack(_x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs))
00548 _x = self.residual_pc.header.frame_id
00549 length = len(_x)
00550 if python3 or type(_x) == unicode:
00551 _x = _x.encode('utf-8')
00552 length = len(_x)
00553 buff.write(struct.pack('<I%ss'%length, length, _x))
00554 _x = self
00555 buff.write(_struct_2I.pack(_x.residual_pc.height, _x.residual_pc.width))
00556 length = len(self.residual_pc.fields)
00557 buff.write(_struct_I.pack(length))
00558 for val1 in self.residual_pc.fields:
00559 _x = val1.name
00560 length = len(_x)
00561 if python3 or type(_x) == unicode:
00562 _x = _x.encode('utf-8')
00563 length = len(_x)
00564 buff.write(struct.pack('<I%ss'%length, length, _x))
00565 _x = val1
00566 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00567 _x = self
00568 buff.write(_struct_B2I.pack(_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step))
00569 _x = self.residual_pc.data
00570 length = len(_x)
00571
00572 if type(_x) in [list, tuple]:
00573 buff.write(struct.pack('<I%sB'%length, length, *_x))
00574 else:
00575 buff.write(struct.pack('<I%ss'%length, length, _x))
00576 buff.write(_struct_B.pack(self.residual_pc.is_dense))
00577 except struct.error as se: self._check_types(se)
00578 except TypeError as te: self._check_types(te)
00579
00580 def deserialize_numpy(self, str, numpy):
00581 """
00582 unpack serialized message in str into this message instance using numpy for array types
00583 :param str: byte array of serialized message, ``str``
00584 :param numpy: numpy python module
00585 """
00586 try:
00587 if self.cluster_a_img is None:
00588 self.cluster_a_img = sensor_msgs.msg.Image()
00589 if self.cluster_b_img is None:
00590 self.cluster_b_img = sensor_msgs.msg.Image()
00591 if self.residual_img is None:
00592 self.residual_img = sensor_msgs.msg.Image()
00593 if self.residual_pc is None:
00594 self.residual_pc = sensor_msgs.msg.PointCloud2()
00595 end = 0
00596 _x = self
00597 start = end
00598 end += 12
00599 (_x.cluster_a_img.header.seq, _x.cluster_a_img.header.stamp.secs, _x.cluster_a_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00600 start = end
00601 end += 4
00602 (length,) = _struct_I.unpack(str[start:end])
00603 start = end
00604 end += length
00605 if python3:
00606 self.cluster_a_img.header.frame_id = str[start:end].decode('utf-8')
00607 else:
00608 self.cluster_a_img.header.frame_id = str[start:end]
00609 _x = self
00610 start = end
00611 end += 8
00612 (_x.cluster_a_img.height, _x.cluster_a_img.width,) = _struct_2I.unpack(str[start:end])
00613 start = end
00614 end += 4
00615 (length,) = _struct_I.unpack(str[start:end])
00616 start = end
00617 end += length
00618 if python3:
00619 self.cluster_a_img.encoding = str[start:end].decode('utf-8')
00620 else:
00621 self.cluster_a_img.encoding = str[start:end]
00622 _x = self
00623 start = end
00624 end += 5
00625 (_x.cluster_a_img.is_bigendian, _x.cluster_a_img.step,) = _struct_BI.unpack(str[start:end])
00626 start = end
00627 end += 4
00628 (length,) = _struct_I.unpack(str[start:end])
00629 start = end
00630 end += length
00631 if python3:
00632 self.cluster_a_img.data = str[start:end].decode('utf-8')
00633 else:
00634 self.cluster_a_img.data = str[start:end]
00635 _x = self
00636 start = end
00637 end += 12
00638 (_x.cluster_b_img.header.seq, _x.cluster_b_img.header.stamp.secs, _x.cluster_b_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00639 start = end
00640 end += 4
00641 (length,) = _struct_I.unpack(str[start:end])
00642 start = end
00643 end += length
00644 if python3:
00645 self.cluster_b_img.header.frame_id = str[start:end].decode('utf-8')
00646 else:
00647 self.cluster_b_img.header.frame_id = str[start:end]
00648 _x = self
00649 start = end
00650 end += 8
00651 (_x.cluster_b_img.height, _x.cluster_b_img.width,) = _struct_2I.unpack(str[start:end])
00652 start = end
00653 end += 4
00654 (length,) = _struct_I.unpack(str[start:end])
00655 start = end
00656 end += length
00657 if python3:
00658 self.cluster_b_img.encoding = str[start:end].decode('utf-8')
00659 else:
00660 self.cluster_b_img.encoding = str[start:end]
00661 _x = self
00662 start = end
00663 end += 5
00664 (_x.cluster_b_img.is_bigendian, _x.cluster_b_img.step,) = _struct_BI.unpack(str[start:end])
00665 start = end
00666 end += 4
00667 (length,) = _struct_I.unpack(str[start:end])
00668 start = end
00669 end += length
00670 if python3:
00671 self.cluster_b_img.data = str[start:end].decode('utf-8')
00672 else:
00673 self.cluster_b_img.data = str[start:end]
00674 _x = self
00675 start = end
00676 end += 12
00677 (_x.residual_img.header.seq, _x.residual_img.header.stamp.secs, _x.residual_img.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00678 start = end
00679 end += 4
00680 (length,) = _struct_I.unpack(str[start:end])
00681 start = end
00682 end += length
00683 if python3:
00684 self.residual_img.header.frame_id = str[start:end].decode('utf-8')
00685 else:
00686 self.residual_img.header.frame_id = str[start:end]
00687 _x = self
00688 start = end
00689 end += 8
00690 (_x.residual_img.height, _x.residual_img.width,) = _struct_2I.unpack(str[start:end])
00691 start = end
00692 end += 4
00693 (length,) = _struct_I.unpack(str[start:end])
00694 start = end
00695 end += length
00696 if python3:
00697 self.residual_img.encoding = str[start:end].decode('utf-8')
00698 else:
00699 self.residual_img.encoding = str[start:end]
00700 _x = self
00701 start = end
00702 end += 5
00703 (_x.residual_img.is_bigendian, _x.residual_img.step,) = _struct_BI.unpack(str[start:end])
00704 start = end
00705 end += 4
00706 (length,) = _struct_I.unpack(str[start:end])
00707 start = end
00708 end += length
00709 if python3:
00710 self.residual_img.data = str[start:end].decode('utf-8')
00711 else:
00712 self.residual_img.data = str[start:end]
00713 _x = self
00714 start = end
00715 end += 12
00716 (_x.residual_pc.header.seq, _x.residual_pc.header.stamp.secs, _x.residual_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00717 start = end
00718 end += 4
00719 (length,) = _struct_I.unpack(str[start:end])
00720 start = end
00721 end += length
00722 if python3:
00723 self.residual_pc.header.frame_id = str[start:end].decode('utf-8')
00724 else:
00725 self.residual_pc.header.frame_id = str[start:end]
00726 _x = self
00727 start = end
00728 end += 8
00729 (_x.residual_pc.height, _x.residual_pc.width,) = _struct_2I.unpack(str[start:end])
00730 start = end
00731 end += 4
00732 (length,) = _struct_I.unpack(str[start:end])
00733 self.residual_pc.fields = []
00734 for i in range(0, length):
00735 val1 = sensor_msgs.msg.PointField()
00736 start = end
00737 end += 4
00738 (length,) = _struct_I.unpack(str[start:end])
00739 start = end
00740 end += length
00741 if python3:
00742 val1.name = str[start:end].decode('utf-8')
00743 else:
00744 val1.name = str[start:end]
00745 _x = val1
00746 start = end
00747 end += 9
00748 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00749 self.residual_pc.fields.append(val1)
00750 _x = self
00751 start = end
00752 end += 9
00753 (_x.residual_pc.is_bigendian, _x.residual_pc.point_step, _x.residual_pc.row_step,) = _struct_B2I.unpack(str[start:end])
00754 self.residual_pc.is_bigendian = bool(self.residual_pc.is_bigendian)
00755 start = end
00756 end += 4
00757 (length,) = _struct_I.unpack(str[start:end])
00758 start = end
00759 end += length
00760 if python3:
00761 self.residual_pc.data = str[start:end].decode('utf-8')
00762 else:
00763 self.residual_pc.data = str[start:end]
00764 start = end
00765 end += 1
00766 (self.residual_pc.is_dense,) = _struct_B.unpack(str[start:end])
00767 self.residual_pc.is_dense = bool(self.residual_pc.is_dense)
00768 return self
00769 except struct.error as e:
00770 raise genpy.DeserializationError(e)
00771
00772 _struct_I = genpy.struct_I
00773 _struct_IBI = struct.Struct("<IBI")
00774 _struct_B = struct.Struct("<B")
00775 _struct_BI = struct.Struct("<BI")
00776 _struct_3I = struct.Struct("<3I")
00777 _struct_B2I = struct.Struct("<B2I")
00778 _struct_2I = struct.Struct("<2I")
00779 """autogenerated by genpy from zyonz_obtain_roi_jump_edge_based/ExtractTwoLeavesRoiResponse.msg. Do not edit."""
00780 import sys
00781 python3 = True if sys.hexversion > 0x03000000 else False
00782 import genpy
00783 import struct
00784
00785 import geometry_msgs.msg
00786 import std_msgs.msg
00787 import sensor_msgs.msg
00788
00789 class ExtractTwoLeavesRoiResponse(genpy.Message):
00790 _md5sum = "b47b7ae7bad2bb30c58b377d3daae68c"
00791 _type = "zyonz_obtain_roi_jump_edge_based/ExtractTwoLeavesRoiResponse"
00792 _has_header = False
00793 _full_text = """
00794 sensor_msgs/PointCloud2 roi_pc
00795 sensor_msgs/Image roi_img
00796 geometry_msgs/PoseStamped roi_pose
00797 geometry_msgs/PoseStamped viewpoint_pose
00798
00799
00800 ================================================================================
00801 MSG: sensor_msgs/PointCloud2
00802 # This message holds a collection of N-dimensional points, which may
00803 # contain additional information such as normals, intensity, etc. The
00804 # point data is stored as a binary blob, its layout described by the
00805 # contents of the "fields" array.
00806
00807 # The point cloud data may be organized 2d (image-like) or 1d
00808 # (unordered). Point clouds organized as 2d images may be produced by
00809 # camera depth sensors such as stereo or time-of-flight.
00810
00811 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00812 # points).
00813 Header header
00814
00815 # 2D structure of the point cloud. If the cloud is unordered, height is
00816 # 1 and width is the length of the point cloud.
00817 uint32 height
00818 uint32 width
00819
00820 # Describes the channels and their layout in the binary data blob.
00821 PointField[] fields
00822
00823 bool is_bigendian # Is this data bigendian?
00824 uint32 point_step # Length of a point in bytes
00825 uint32 row_step # Length of a row in bytes
00826 uint8[] data # Actual point data, size is (row_step*height)
00827
00828 bool is_dense # True if there are no invalid points
00829
00830 ================================================================================
00831 MSG: std_msgs/Header
00832 # Standard metadata for higher-level stamped data types.
00833 # This is generally used to communicate timestamped data
00834 # in a particular coordinate frame.
00835 #
00836 # sequence ID: consecutively increasing ID
00837 uint32 seq
00838 #Two-integer timestamp that is expressed as:
00839 # * stamp.secs: seconds (stamp_secs) since epoch
00840 # * stamp.nsecs: nanoseconds since stamp_secs
00841 # time-handling sugar is provided by the client library
00842 time stamp
00843 #Frame this data is associated with
00844 # 0: no frame
00845 # 1: global frame
00846 string frame_id
00847
00848 ================================================================================
00849 MSG: sensor_msgs/PointField
00850 # This message holds the description of one point entry in the
00851 # PointCloud2 message format.
00852 uint8 INT8 = 1
00853 uint8 UINT8 = 2
00854 uint8 INT16 = 3
00855 uint8 UINT16 = 4
00856 uint8 INT32 = 5
00857 uint8 UINT32 = 6
00858 uint8 FLOAT32 = 7
00859 uint8 FLOAT64 = 8
00860
00861 string name # Name of field
00862 uint32 offset # Offset from start of point struct
00863 uint8 datatype # Datatype enumeration, see above
00864 uint32 count # How many elements in the field
00865
00866 ================================================================================
00867 MSG: sensor_msgs/Image
00868 # This message contains an uncompressed image
00869 # (0, 0) is at top-left corner of image
00870 #
00871
00872 Header header # Header timestamp should be acquisition time of image
00873 # Header frame_id should be optical frame of camera
00874 # origin of frame should be optical center of cameara
00875 # +x should point to the right in the image
00876 # +y should point down in the image
00877 # +z should point into to plane of the image
00878 # If the frame_id here and the frame_id of the CameraInfo
00879 # message associated with the image conflict
00880 # the behavior is undefined
00881
00882 uint32 height # image height, that is, number of rows
00883 uint32 width # image width, that is, number of columns
00884
00885 # The legal values for encoding are in file src/image_encodings.cpp
00886 # If you want to standardize a new string format, join
00887 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00888
00889 string encoding # Encoding of pixels -- channel meaning, ordering, size
00890 # taken from the list of strings in src/image_encodings.cpp
00891
00892 uint8 is_bigendian # is this data bigendian?
00893 uint32 step # Full row length in bytes
00894 uint8[] data # actual matrix data, size is (step * rows)
00895
00896 ================================================================================
00897 MSG: geometry_msgs/PoseStamped
00898 # A Pose with reference coordinate frame and timestamp
00899 Header header
00900 Pose pose
00901
00902 ================================================================================
00903 MSG: geometry_msgs/Pose
00904 # A representation of pose in free space, composed of postion and orientation.
00905 Point position
00906 Quaternion orientation
00907
00908 ================================================================================
00909 MSG: geometry_msgs/Point
00910 # This contains the position of a point in free space
00911 float64 x
00912 float64 y
00913 float64 z
00914
00915 ================================================================================
00916 MSG: geometry_msgs/Quaternion
00917 # This represents an orientation in free space in quaternion form.
00918
00919 float64 x
00920 float64 y
00921 float64 z
00922 float64 w
00923
00924 """
00925 __slots__ = ['roi_pc','roi_img','roi_pose','viewpoint_pose']
00926 _slot_types = ['sensor_msgs/PointCloud2','sensor_msgs/Image','geometry_msgs/PoseStamped','geometry_msgs/PoseStamped']
00927
00928 def __init__(self, *args, **kwds):
00929 """
00930 Constructor. Any message fields that are implicitly/explicitly
00931 set to None will be assigned a default value. The recommend
00932 use is keyword arguments as this is more robust to future message
00933 changes. You cannot mix in-order arguments and keyword arguments.
00934
00935 The available fields are:
00936 roi_pc,roi_img,roi_pose,viewpoint_pose
00937
00938 :param args: complete set of field values, in .msg order
00939 :param kwds: use keyword arguments corresponding to message field names
00940 to set specific fields.
00941 """
00942 if args or kwds:
00943 super(ExtractTwoLeavesRoiResponse, self).__init__(*args, **kwds)
00944
00945 if self.roi_pc is None:
00946 self.roi_pc = sensor_msgs.msg.PointCloud2()
00947 if self.roi_img is None:
00948 self.roi_img = sensor_msgs.msg.Image()
00949 if self.roi_pose is None:
00950 self.roi_pose = geometry_msgs.msg.PoseStamped()
00951 if self.viewpoint_pose is None:
00952 self.viewpoint_pose = geometry_msgs.msg.PoseStamped()
00953 else:
00954 self.roi_pc = sensor_msgs.msg.PointCloud2()
00955 self.roi_img = sensor_msgs.msg.Image()
00956 self.roi_pose = geometry_msgs.msg.PoseStamped()
00957 self.viewpoint_pose = geometry_msgs.msg.PoseStamped()
00958
00959 def _get_types(self):
00960 """
00961 internal API method
00962 """
00963 return self._slot_types
00964
00965 def serialize(self, buff):
00966 """
00967 serialize message into buffer
00968 :param buff: buffer, ``StringIO``
00969 """
00970 try:
00971 _x = self
00972 buff.write(_struct_3I.pack(_x.roi_pc.header.seq, _x.roi_pc.header.stamp.secs, _x.roi_pc.header.stamp.nsecs))
00973 _x = self.roi_pc.header.frame_id
00974 length = len(_x)
00975 if python3 or type(_x) == unicode:
00976 _x = _x.encode('utf-8')
00977 length = len(_x)
00978 buff.write(struct.pack('<I%ss'%length, length, _x))
00979 _x = self
00980 buff.write(_struct_2I.pack(_x.roi_pc.height, _x.roi_pc.width))
00981 length = len(self.roi_pc.fields)
00982 buff.write(_struct_I.pack(length))
00983 for val1 in self.roi_pc.fields:
00984 _x = val1.name
00985 length = len(_x)
00986 if python3 or type(_x) == unicode:
00987 _x = _x.encode('utf-8')
00988 length = len(_x)
00989 buff.write(struct.pack('<I%ss'%length, length, _x))
00990 _x = val1
00991 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00992 _x = self
00993 buff.write(_struct_B2I.pack(_x.roi_pc.is_bigendian, _x.roi_pc.point_step, _x.roi_pc.row_step))
00994 _x = self.roi_pc.data
00995 length = len(_x)
00996
00997 if type(_x) in [list, tuple]:
00998 buff.write(struct.pack('<I%sB'%length, length, *_x))
00999 else:
01000 buff.write(struct.pack('<I%ss'%length, length, _x))
01001 _x = self
01002 buff.write(_struct_B3I.pack(_x.roi_pc.is_dense, _x.roi_img.header.seq, _x.roi_img.header.stamp.secs, _x.roi_img.header.stamp.nsecs))
01003 _x = self.roi_img.header.frame_id
01004 length = len(_x)
01005 if python3 or type(_x) == unicode:
01006 _x = _x.encode('utf-8')
01007 length = len(_x)
01008 buff.write(struct.pack('<I%ss'%length, length, _x))
01009 _x = self
01010 buff.write(_struct_2I.pack(_x.roi_img.height, _x.roi_img.width))
01011 _x = self.roi_img.encoding
01012 length = len(_x)
01013 if python3 or type(_x) == unicode:
01014 _x = _x.encode('utf-8')
01015 length = len(_x)
01016 buff.write(struct.pack('<I%ss'%length, length, _x))
01017 _x = self
01018 buff.write(_struct_BI.pack(_x.roi_img.is_bigendian, _x.roi_img.step))
01019 _x = self.roi_img.data
01020 length = len(_x)
01021
01022 if type(_x) in [list, tuple]:
01023 buff.write(struct.pack('<I%sB'%length, length, *_x))
01024 else:
01025 buff.write(struct.pack('<I%ss'%length, length, _x))
01026 _x = self
01027 buff.write(_struct_3I.pack(_x.roi_pose.header.seq, _x.roi_pose.header.stamp.secs, _x.roi_pose.header.stamp.nsecs))
01028 _x = self.roi_pose.header.frame_id
01029 length = len(_x)
01030 if python3 or type(_x) == unicode:
01031 _x = _x.encode('utf-8')
01032 length = len(_x)
01033 buff.write(struct.pack('<I%ss'%length, length, _x))
01034 _x = self
01035 buff.write(_struct_7d3I.pack(_x.roi_pose.pose.position.x, _x.roi_pose.pose.position.y, _x.roi_pose.pose.position.z, _x.roi_pose.pose.orientation.x, _x.roi_pose.pose.orientation.y, _x.roi_pose.pose.orientation.z, _x.roi_pose.pose.orientation.w, _x.viewpoint_pose.header.seq, _x.viewpoint_pose.header.stamp.secs, _x.viewpoint_pose.header.stamp.nsecs))
01036 _x = self.viewpoint_pose.header.frame_id
01037 length = len(_x)
01038 if python3 or type(_x) == unicode:
01039 _x = _x.encode('utf-8')
01040 length = len(_x)
01041 buff.write(struct.pack('<I%ss'%length, length, _x))
01042 _x = self
01043 buff.write(_struct_7d.pack(_x.viewpoint_pose.pose.position.x, _x.viewpoint_pose.pose.position.y, _x.viewpoint_pose.pose.position.z, _x.viewpoint_pose.pose.orientation.x, _x.viewpoint_pose.pose.orientation.y, _x.viewpoint_pose.pose.orientation.z, _x.viewpoint_pose.pose.orientation.w))
01044 except struct.error as se: self._check_types(se)
01045 except TypeError as te: self._check_types(te)
01046
01047 def deserialize(self, str):
01048 """
01049 unpack serialized message in str into this message instance
01050 :param str: byte array of serialized message, ``str``
01051 """
01052 try:
01053 if self.roi_pc is None:
01054 self.roi_pc = sensor_msgs.msg.PointCloud2()
01055 if self.roi_img is None:
01056 self.roi_img = sensor_msgs.msg.Image()
01057 if self.roi_pose is None:
01058 self.roi_pose = geometry_msgs.msg.PoseStamped()
01059 if self.viewpoint_pose is None:
01060 self.viewpoint_pose = geometry_msgs.msg.PoseStamped()
01061 end = 0
01062 _x = self
01063 start = end
01064 end += 12
01065 (_x.roi_pc.header.seq, _x.roi_pc.header.stamp.secs, _x.roi_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01066 start = end
01067 end += 4
01068 (length,) = _struct_I.unpack(str[start:end])
01069 start = end
01070 end += length
01071 if python3:
01072 self.roi_pc.header.frame_id = str[start:end].decode('utf-8')
01073 else:
01074 self.roi_pc.header.frame_id = str[start:end]
01075 _x = self
01076 start = end
01077 end += 8
01078 (_x.roi_pc.height, _x.roi_pc.width,) = _struct_2I.unpack(str[start:end])
01079 start = end
01080 end += 4
01081 (length,) = _struct_I.unpack(str[start:end])
01082 self.roi_pc.fields = []
01083 for i in range(0, length):
01084 val1 = sensor_msgs.msg.PointField()
01085 start = end
01086 end += 4
01087 (length,) = _struct_I.unpack(str[start:end])
01088 start = end
01089 end += length
01090 if python3:
01091 val1.name = str[start:end].decode('utf-8')
01092 else:
01093 val1.name = str[start:end]
01094 _x = val1
01095 start = end
01096 end += 9
01097 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01098 self.roi_pc.fields.append(val1)
01099 _x = self
01100 start = end
01101 end += 9
01102 (_x.roi_pc.is_bigendian, _x.roi_pc.point_step, _x.roi_pc.row_step,) = _struct_B2I.unpack(str[start:end])
01103 self.roi_pc.is_bigendian = bool(self.roi_pc.is_bigendian)
01104 start = end
01105 end += 4
01106 (length,) = _struct_I.unpack(str[start:end])
01107 start = end
01108 end += length
01109 if python3:
01110 self.roi_pc.data = str[start:end].decode('utf-8')
01111 else:
01112 self.roi_pc.data = str[start:end]
01113 _x = self
01114 start = end
01115 end += 13
01116 (_x.roi_pc.is_dense, _x.roi_img.header.seq, _x.roi_img.header.stamp.secs, _x.roi_img.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
01117 self.roi_pc.is_dense = bool(self.roi_pc.is_dense)
01118 start = end
01119 end += 4
01120 (length,) = _struct_I.unpack(str[start:end])
01121 start = end
01122 end += length
01123 if python3:
01124 self.roi_img.header.frame_id = str[start:end].decode('utf-8')
01125 else:
01126 self.roi_img.header.frame_id = str[start:end]
01127 _x = self
01128 start = end
01129 end += 8
01130 (_x.roi_img.height, _x.roi_img.width,) = _struct_2I.unpack(str[start:end])
01131 start = end
01132 end += 4
01133 (length,) = _struct_I.unpack(str[start:end])
01134 start = end
01135 end += length
01136 if python3:
01137 self.roi_img.encoding = str[start:end].decode('utf-8')
01138 else:
01139 self.roi_img.encoding = str[start:end]
01140 _x = self
01141 start = end
01142 end += 5
01143 (_x.roi_img.is_bigendian, _x.roi_img.step,) = _struct_BI.unpack(str[start:end])
01144 start = end
01145 end += 4
01146 (length,) = _struct_I.unpack(str[start:end])
01147 start = end
01148 end += length
01149 if python3:
01150 self.roi_img.data = str[start:end].decode('utf-8')
01151 else:
01152 self.roi_img.data = str[start:end]
01153 _x = self
01154 start = end
01155 end += 12
01156 (_x.roi_pose.header.seq, _x.roi_pose.header.stamp.secs, _x.roi_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01157 start = end
01158 end += 4
01159 (length,) = _struct_I.unpack(str[start:end])
01160 start = end
01161 end += length
01162 if python3:
01163 self.roi_pose.header.frame_id = str[start:end].decode('utf-8')
01164 else:
01165 self.roi_pose.header.frame_id = str[start:end]
01166 _x = self
01167 start = end
01168 end += 68
01169 (_x.roi_pose.pose.position.x, _x.roi_pose.pose.position.y, _x.roi_pose.pose.position.z, _x.roi_pose.pose.orientation.x, _x.roi_pose.pose.orientation.y, _x.roi_pose.pose.orientation.z, _x.roi_pose.pose.orientation.w, _x.viewpoint_pose.header.seq, _x.viewpoint_pose.header.stamp.secs, _x.viewpoint_pose.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
01170 start = end
01171 end += 4
01172 (length,) = _struct_I.unpack(str[start:end])
01173 start = end
01174 end += length
01175 if python3:
01176 self.viewpoint_pose.header.frame_id = str[start:end].decode('utf-8')
01177 else:
01178 self.viewpoint_pose.header.frame_id = str[start:end]
01179 _x = self
01180 start = end
01181 end += 56
01182 (_x.viewpoint_pose.pose.position.x, _x.viewpoint_pose.pose.position.y, _x.viewpoint_pose.pose.position.z, _x.viewpoint_pose.pose.orientation.x, _x.viewpoint_pose.pose.orientation.y, _x.viewpoint_pose.pose.orientation.z, _x.viewpoint_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
01183 return self
01184 except struct.error as e:
01185 raise genpy.DeserializationError(e)
01186
01187
01188 def serialize_numpy(self, buff, numpy):
01189 """
01190 serialize message with numpy array types into buffer
01191 :param buff: buffer, ``StringIO``
01192 :param numpy: numpy python module
01193 """
01194 try:
01195 _x = self
01196 buff.write(_struct_3I.pack(_x.roi_pc.header.seq, _x.roi_pc.header.stamp.secs, _x.roi_pc.header.stamp.nsecs))
01197 _x = self.roi_pc.header.frame_id
01198 length = len(_x)
01199 if python3 or type(_x) == unicode:
01200 _x = _x.encode('utf-8')
01201 length = len(_x)
01202 buff.write(struct.pack('<I%ss'%length, length, _x))
01203 _x = self
01204 buff.write(_struct_2I.pack(_x.roi_pc.height, _x.roi_pc.width))
01205 length = len(self.roi_pc.fields)
01206 buff.write(_struct_I.pack(length))
01207 for val1 in self.roi_pc.fields:
01208 _x = val1.name
01209 length = len(_x)
01210 if python3 or type(_x) == unicode:
01211 _x = _x.encode('utf-8')
01212 length = len(_x)
01213 buff.write(struct.pack('<I%ss'%length, length, _x))
01214 _x = val1
01215 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01216 _x = self
01217 buff.write(_struct_B2I.pack(_x.roi_pc.is_bigendian, _x.roi_pc.point_step, _x.roi_pc.row_step))
01218 _x = self.roi_pc.data
01219 length = len(_x)
01220
01221 if type(_x) in [list, tuple]:
01222 buff.write(struct.pack('<I%sB'%length, length, *_x))
01223 else:
01224 buff.write(struct.pack('<I%ss'%length, length, _x))
01225 _x = self
01226 buff.write(_struct_B3I.pack(_x.roi_pc.is_dense, _x.roi_img.header.seq, _x.roi_img.header.stamp.secs, _x.roi_img.header.stamp.nsecs))
01227 _x = self.roi_img.header.frame_id
01228 length = len(_x)
01229 if python3 or type(_x) == unicode:
01230 _x = _x.encode('utf-8')
01231 length = len(_x)
01232 buff.write(struct.pack('<I%ss'%length, length, _x))
01233 _x = self
01234 buff.write(_struct_2I.pack(_x.roi_img.height, _x.roi_img.width))
01235 _x = self.roi_img.encoding
01236 length = len(_x)
01237 if python3 or type(_x) == unicode:
01238 _x = _x.encode('utf-8')
01239 length = len(_x)
01240 buff.write(struct.pack('<I%ss'%length, length, _x))
01241 _x = self
01242 buff.write(_struct_BI.pack(_x.roi_img.is_bigendian, _x.roi_img.step))
01243 _x = self.roi_img.data
01244 length = len(_x)
01245
01246 if type(_x) in [list, tuple]:
01247 buff.write(struct.pack('<I%sB'%length, length, *_x))
01248 else:
01249 buff.write(struct.pack('<I%ss'%length, length, _x))
01250 _x = self
01251 buff.write(_struct_3I.pack(_x.roi_pose.header.seq, _x.roi_pose.header.stamp.secs, _x.roi_pose.header.stamp.nsecs))
01252 _x = self.roi_pose.header.frame_id
01253 length = len(_x)
01254 if python3 or type(_x) == unicode:
01255 _x = _x.encode('utf-8')
01256 length = len(_x)
01257 buff.write(struct.pack('<I%ss'%length, length, _x))
01258 _x = self
01259 buff.write(_struct_7d3I.pack(_x.roi_pose.pose.position.x, _x.roi_pose.pose.position.y, _x.roi_pose.pose.position.z, _x.roi_pose.pose.orientation.x, _x.roi_pose.pose.orientation.y, _x.roi_pose.pose.orientation.z, _x.roi_pose.pose.orientation.w, _x.viewpoint_pose.header.seq, _x.viewpoint_pose.header.stamp.secs, _x.viewpoint_pose.header.stamp.nsecs))
01260 _x = self.viewpoint_pose.header.frame_id
01261 length = len(_x)
01262 if python3 or type(_x) == unicode:
01263 _x = _x.encode('utf-8')
01264 length = len(_x)
01265 buff.write(struct.pack('<I%ss'%length, length, _x))
01266 _x = self
01267 buff.write(_struct_7d.pack(_x.viewpoint_pose.pose.position.x, _x.viewpoint_pose.pose.position.y, _x.viewpoint_pose.pose.position.z, _x.viewpoint_pose.pose.orientation.x, _x.viewpoint_pose.pose.orientation.y, _x.viewpoint_pose.pose.orientation.z, _x.viewpoint_pose.pose.orientation.w))
01268 except struct.error as se: self._check_types(se)
01269 except TypeError as te: self._check_types(te)
01270
01271 def deserialize_numpy(self, str, numpy):
01272 """
01273 unpack serialized message in str into this message instance using numpy for array types
01274 :param str: byte array of serialized message, ``str``
01275 :param numpy: numpy python module
01276 """
01277 try:
01278 if self.roi_pc is None:
01279 self.roi_pc = sensor_msgs.msg.PointCloud2()
01280 if self.roi_img is None:
01281 self.roi_img = sensor_msgs.msg.Image()
01282 if self.roi_pose is None:
01283 self.roi_pose = geometry_msgs.msg.PoseStamped()
01284 if self.viewpoint_pose is None:
01285 self.viewpoint_pose = geometry_msgs.msg.PoseStamped()
01286 end = 0
01287 _x = self
01288 start = end
01289 end += 12
01290 (_x.roi_pc.header.seq, _x.roi_pc.header.stamp.secs, _x.roi_pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01291 start = end
01292 end += 4
01293 (length,) = _struct_I.unpack(str[start:end])
01294 start = end
01295 end += length
01296 if python3:
01297 self.roi_pc.header.frame_id = str[start:end].decode('utf-8')
01298 else:
01299 self.roi_pc.header.frame_id = str[start:end]
01300 _x = self
01301 start = end
01302 end += 8
01303 (_x.roi_pc.height, _x.roi_pc.width,) = _struct_2I.unpack(str[start:end])
01304 start = end
01305 end += 4
01306 (length,) = _struct_I.unpack(str[start:end])
01307 self.roi_pc.fields = []
01308 for i in range(0, length):
01309 val1 = sensor_msgs.msg.PointField()
01310 start = end
01311 end += 4
01312 (length,) = _struct_I.unpack(str[start:end])
01313 start = end
01314 end += length
01315 if python3:
01316 val1.name = str[start:end].decode('utf-8')
01317 else:
01318 val1.name = str[start:end]
01319 _x = val1
01320 start = end
01321 end += 9
01322 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01323 self.roi_pc.fields.append(val1)
01324 _x = self
01325 start = end
01326 end += 9
01327 (_x.roi_pc.is_bigendian, _x.roi_pc.point_step, _x.roi_pc.row_step,) = _struct_B2I.unpack(str[start:end])
01328 self.roi_pc.is_bigendian = bool(self.roi_pc.is_bigendian)
01329 start = end
01330 end += 4
01331 (length,) = _struct_I.unpack(str[start:end])
01332 start = end
01333 end += length
01334 if python3:
01335 self.roi_pc.data = str[start:end].decode('utf-8')
01336 else:
01337 self.roi_pc.data = str[start:end]
01338 _x = self
01339 start = end
01340 end += 13
01341 (_x.roi_pc.is_dense, _x.roi_img.header.seq, _x.roi_img.header.stamp.secs, _x.roi_img.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
01342 self.roi_pc.is_dense = bool(self.roi_pc.is_dense)
01343 start = end
01344 end += 4
01345 (length,) = _struct_I.unpack(str[start:end])
01346 start = end
01347 end += length
01348 if python3:
01349 self.roi_img.header.frame_id = str[start:end].decode('utf-8')
01350 else:
01351 self.roi_img.header.frame_id = str[start:end]
01352 _x = self
01353 start = end
01354 end += 8
01355 (_x.roi_img.height, _x.roi_img.width,) = _struct_2I.unpack(str[start:end])
01356 start = end
01357 end += 4
01358 (length,) = _struct_I.unpack(str[start:end])
01359 start = end
01360 end += length
01361 if python3:
01362 self.roi_img.encoding = str[start:end].decode('utf-8')
01363 else:
01364 self.roi_img.encoding = str[start:end]
01365 _x = self
01366 start = end
01367 end += 5
01368 (_x.roi_img.is_bigendian, _x.roi_img.step,) = _struct_BI.unpack(str[start:end])
01369 start = end
01370 end += 4
01371 (length,) = _struct_I.unpack(str[start:end])
01372 start = end
01373 end += length
01374 if python3:
01375 self.roi_img.data = str[start:end].decode('utf-8')
01376 else:
01377 self.roi_img.data = str[start:end]
01378 _x = self
01379 start = end
01380 end += 12
01381 (_x.roi_pose.header.seq, _x.roi_pose.header.stamp.secs, _x.roi_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01382 start = end
01383 end += 4
01384 (length,) = _struct_I.unpack(str[start:end])
01385 start = end
01386 end += length
01387 if python3:
01388 self.roi_pose.header.frame_id = str[start:end].decode('utf-8')
01389 else:
01390 self.roi_pose.header.frame_id = str[start:end]
01391 _x = self
01392 start = end
01393 end += 68
01394 (_x.roi_pose.pose.position.x, _x.roi_pose.pose.position.y, _x.roi_pose.pose.position.z, _x.roi_pose.pose.orientation.x, _x.roi_pose.pose.orientation.y, _x.roi_pose.pose.orientation.z, _x.roi_pose.pose.orientation.w, _x.viewpoint_pose.header.seq, _x.viewpoint_pose.header.stamp.secs, _x.viewpoint_pose.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
01395 start = end
01396 end += 4
01397 (length,) = _struct_I.unpack(str[start:end])
01398 start = end
01399 end += length
01400 if python3:
01401 self.viewpoint_pose.header.frame_id = str[start:end].decode('utf-8')
01402 else:
01403 self.viewpoint_pose.header.frame_id = str[start:end]
01404 _x = self
01405 start = end
01406 end += 56
01407 (_x.viewpoint_pose.pose.position.x, _x.viewpoint_pose.pose.position.y, _x.viewpoint_pose.pose.position.z, _x.viewpoint_pose.pose.orientation.x, _x.viewpoint_pose.pose.orientation.y, _x.viewpoint_pose.pose.orientation.z, _x.viewpoint_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
01408 return self
01409 except struct.error as e:
01410 raise genpy.DeserializationError(e)
01411
01412 _struct_I = genpy.struct_I
01413 _struct_IBI = struct.Struct("<IBI")
01414 _struct_7d = struct.Struct("<7d")
01415 _struct_BI = struct.Struct("<BI")
01416 _struct_7d3I = struct.Struct("<7d3I")
01417 _struct_3I = struct.Struct("<3I")
01418 _struct_B3I = struct.Struct("<B3I")
01419 _struct_B2I = struct.Struct("<B2I")
01420 _struct_2I = struct.Struct("<2I")
01421 class ExtractTwoLeavesRoi(object):
01422 _type = 'zyonz_obtain_roi_jump_edge_based/ExtractTwoLeavesRoi'
01423 _md5sum = '17cd0e235cf2a2a2082aefd69aa6fa7d'
01424 _request_class = ExtractTwoLeavesRoiRequest
01425 _response_class = ExtractTwoLeavesRoiResponse