00001 """autogenerated by genpy from rgbd_assembler/RgbdAssemblyRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class RgbdAssemblyRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "rgbd_assembler/RgbdAssemblyRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015 """
00016 __slots__ = []
00017 _slot_types = []
00018
00019 def __init__(self, *args, **kwds):
00020 """
00021 Constructor. Any message fields that are implicitly/explicitly
00022 set to None will be assigned a default value. The recommend
00023 use is keyword arguments as this is more robust to future message
00024 changes. You cannot mix in-order arguments and keyword arguments.
00025
00026 The available fields are:
00027
00028
00029 :param args: complete set of field values, in .msg order
00030 :param kwds: use keyword arguments corresponding to message field names
00031 to set specific fields.
00032 """
00033 if args or kwds:
00034 super(RgbdAssemblyRequest, self).__init__(*args, **kwds)
00035
00036 def _get_types(self):
00037 """
00038 internal API method
00039 """
00040 return self._slot_types
00041
00042 def serialize(self, buff):
00043 """
00044 serialize message into buffer
00045 :param buff: buffer, ``StringIO``
00046 """
00047 try:
00048 pass
00049 except struct.error as se: self._check_types(se)
00050 except TypeError as te: self._check_types(te)
00051
00052 def deserialize(self, str):
00053 """
00054 unpack serialized message in str into this message instance
00055 :param str: byte array of serialized message, ``str``
00056 """
00057 try:
00058 end = 0
00059 return self
00060 except struct.error as e:
00061 raise genpy.DeserializationError(e)
00062
00063
00064 def serialize_numpy(self, buff, numpy):
00065 """
00066 serialize message with numpy array types into buffer
00067 :param buff: buffer, ``StringIO``
00068 :param numpy: numpy python module
00069 """
00070 try:
00071 pass
00072 except struct.error as se: self._check_types(se)
00073 except TypeError as te: self._check_types(te)
00074
00075 def deserialize_numpy(self, str, numpy):
00076 """
00077 unpack serialized message in str into this message instance using numpy for array types
00078 :param str: byte array of serialized message, ``str``
00079 :param numpy: numpy python module
00080 """
00081 try:
00082 end = 0
00083 return self
00084 except struct.error as e:
00085 raise genpy.DeserializationError(e)
00086
00087 _struct_I = genpy.struct_I
00088 """autogenerated by genpy from rgbd_assembler/RgbdAssemblyResponse.msg. Do not edit."""
00089 import sys
00090 python3 = True if sys.hexversion > 0x03000000 else False
00091 import genpy
00092 import struct
00093
00094 import stereo_msgs.msg
00095 import std_msgs.msg
00096 import sensor_msgs.msg
00097
00098 class RgbdAssemblyResponse(genpy.Message):
00099 _md5sum = "258b6f93e1876c2777ab914303667a41"
00100 _type = "rgbd_assembler/RgbdAssemblyResponse"
00101 _has_header = False
00102 _full_text = """
00103
00104
00105
00106 sensor_msgs/PointCloud2 point_cloud
00107
00108
00109 sensor_msgs/Image image
00110
00111
00112 stereo_msgs/DisparityImage disparity_image
00113
00114
00115 sensor_msgs/CameraInfo camera_info
00116
00117
00118 int32 OTHER_ERROR = 1
00119 int32 SUCCESS = 2
00120 int32 result
00121
00122 ================================================================================
00123 MSG: sensor_msgs/PointCloud2
00124 # This message holds a collection of N-dimensional points, which may
00125 # contain additional information such as normals, intensity, etc. The
00126 # point data is stored as a binary blob, its layout described by the
00127 # contents of the "fields" array.
00128
00129 # The point cloud data may be organized 2d (image-like) or 1d
00130 # (unordered). Point clouds organized as 2d images may be produced by
00131 # camera depth sensors such as stereo or time-of-flight.
00132
00133 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00134 # points).
00135 Header header
00136
00137 # 2D structure of the point cloud. If the cloud is unordered, height is
00138 # 1 and width is the length of the point cloud.
00139 uint32 height
00140 uint32 width
00141
00142 # Describes the channels and their layout in the binary data blob.
00143 PointField[] fields
00144
00145 bool is_bigendian # Is this data bigendian?
00146 uint32 point_step # Length of a point in bytes
00147 uint32 row_step # Length of a row in bytes
00148 uint8[] data # Actual point data, size is (row_step*height)
00149
00150 bool is_dense # True if there are no invalid points
00151
00152 ================================================================================
00153 MSG: std_msgs/Header
00154 # Standard metadata for higher-level stamped data types.
00155 # This is generally used to communicate timestamped data
00156 # in a particular coordinate frame.
00157 #
00158 # sequence ID: consecutively increasing ID
00159 uint32 seq
00160 #Two-integer timestamp that is expressed as:
00161 # * stamp.secs: seconds (stamp_secs) since epoch
00162 # * stamp.nsecs: nanoseconds since stamp_secs
00163 # time-handling sugar is provided by the client library
00164 time stamp
00165 #Frame this data is associated with
00166 # 0: no frame
00167 # 1: global frame
00168 string frame_id
00169
00170 ================================================================================
00171 MSG: sensor_msgs/PointField
00172 # This message holds the description of one point entry in the
00173 # PointCloud2 message format.
00174 uint8 INT8 = 1
00175 uint8 UINT8 = 2
00176 uint8 INT16 = 3
00177 uint8 UINT16 = 4
00178 uint8 INT32 = 5
00179 uint8 UINT32 = 6
00180 uint8 FLOAT32 = 7
00181 uint8 FLOAT64 = 8
00182
00183 string name # Name of field
00184 uint32 offset # Offset from start of point struct
00185 uint8 datatype # Datatype enumeration, see above
00186 uint32 count # How many elements in the field
00187
00188 ================================================================================
00189 MSG: sensor_msgs/Image
00190 # This message contains an uncompressed image
00191 # (0, 0) is at top-left corner of image
00192 #
00193
00194 Header header # Header timestamp should be acquisition time of image
00195 # Header frame_id should be optical frame of camera
00196 # origin of frame should be optical center of cameara
00197 # +x should point to the right in the image
00198 # +y should point down in the image
00199 # +z should point into to plane of the image
00200 # If the frame_id here and the frame_id of the CameraInfo
00201 # message associated with the image conflict
00202 # the behavior is undefined
00203
00204 uint32 height # image height, that is, number of rows
00205 uint32 width # image width, that is, number of columns
00206
00207 # The legal values for encoding are in file src/image_encodings.cpp
00208 # If you want to standardize a new string format, join
00209 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00210
00211 string encoding # Encoding of pixels -- channel meaning, ordering, size
00212 # taken from the list of strings in src/image_encodings.cpp
00213
00214 uint8 is_bigendian # is this data bigendian?
00215 uint32 step # Full row length in bytes
00216 uint8[] data # actual matrix data, size is (step * rows)
00217
00218 ================================================================================
00219 MSG: stereo_msgs/DisparityImage
00220 # Separate header for compatibility with current TimeSynchronizer.
00221 # Likely to be removed in a later release, use image.header instead.
00222 Header header
00223
00224 # Floating point disparity image. The disparities are pre-adjusted for any
00225 # x-offset between the principal points of the two cameras (in the case
00226 # that they are verged). That is: d = x_l - x_r - (cx_l - cx_r)
00227 sensor_msgs/Image image
00228
00229 # Stereo geometry. For disparity d, the depth from the camera is Z = fT/d.
00230 float32 f # Focal length, pixels
00231 float32 T # Baseline, world units
00232
00233 # Subwindow of (potentially) valid disparity values.
00234 sensor_msgs/RegionOfInterest valid_window
00235
00236 # The range of disparities searched.
00237 # In the disparity image, any disparity less than min_disparity is invalid.
00238 # The disparity search range defines the horopter, or 3D volume that the
00239 # stereo algorithm can "see". Points with Z outside of:
00240 # Z_min = fT / max_disparity
00241 # Z_max = fT / min_disparity
00242 # could not be found.
00243 float32 min_disparity
00244 float32 max_disparity
00245
00246 # Smallest allowed disparity increment. The smallest achievable depth range
00247 # resolution is delta_Z = (Z^2/fT)*delta_d.
00248 float32 delta_d
00249
00250 ================================================================================
00251 MSG: sensor_msgs/RegionOfInterest
00252 # This message is used to specify a region of interest within an image.
00253 #
00254 # When used to specify the ROI setting of the camera when the image was
00255 # taken, the height and width fields should either match the height and
00256 # width fields for the associated image; or height = width = 0
00257 # indicates that the full resolution image was captured.
00258
00259 uint32 x_offset # Leftmost pixel of the ROI
00260 # (0 if the ROI includes the left edge of the image)
00261 uint32 y_offset # Topmost pixel of the ROI
00262 # (0 if the ROI includes the top edge of the image)
00263 uint32 height # Height of ROI
00264 uint32 width # Width of ROI
00265
00266 # True if a distinct rectified ROI should be calculated from the "raw"
00267 # ROI in this message. Typically this should be False if the full image
00268 # is captured (ROI not used), and True if a subwindow is captured (ROI
00269 # used).
00270 bool do_rectify
00271
00272 ================================================================================
00273 MSG: sensor_msgs/CameraInfo
00274 # This message defines meta information for a camera. It should be in a
00275 # camera namespace on topic "camera_info" and accompanied by up to five
00276 # image topics named:
00277 #
00278 # image_raw - raw data from the camera driver, possibly Bayer encoded
00279 # image - monochrome, distorted
00280 # image_color - color, distorted
00281 # image_rect - monochrome, rectified
00282 # image_rect_color - color, rectified
00283 #
00284 # The image_pipeline contains packages (image_proc, stereo_image_proc)
00285 # for producing the four processed image topics from image_raw and
00286 # camera_info. The meaning of the camera parameters are described in
00287 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.
00288 #
00289 # The image_geometry package provides a user-friendly interface to
00290 # common operations using this meta information. If you want to, e.g.,
00291 # project a 3d point into image coordinates, we strongly recommend
00292 # using image_geometry.
00293 #
00294 # If the camera is uncalibrated, the matrices D, K, R, P should be left
00295 # zeroed out. In particular, clients may assume that K[0] == 0.0
00296 # indicates an uncalibrated camera.
00297
00298 #######################################################################
00299 # Image acquisition info #
00300 #######################################################################
00301
00302 # Time of image acquisition, camera coordinate frame ID
00303 Header header # Header timestamp should be acquisition time of image
00304 # Header frame_id should be optical frame of camera
00305 # origin of frame should be optical center of camera
00306 # +x should point to the right in the image
00307 # +y should point down in the image
00308 # +z should point into the plane of the image
00309
00310
00311 #######################################################################
00312 # Calibration Parameters #
00313 #######################################################################
00314 # These are fixed during camera calibration. Their values will be the #
00315 # same in all messages until the camera is recalibrated. Note that #
00316 # self-calibrating systems may "recalibrate" frequently. #
00317 # #
00318 # The internal parameters can be used to warp a raw (distorted) image #
00319 # to: #
00320 # 1. An undistorted image (requires D and K) #
00321 # 2. A rectified image (requires D, K, R) #
00322 # The projection matrix P projects 3D points into the rectified image.#
00323 #######################################################################
00324
00325 # The image dimensions with which the camera was calibrated. Normally
00326 # this will be the full camera resolution in pixels.
00327 uint32 height
00328 uint32 width
00329
00330 # The distortion model used. Supported models are listed in
00331 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a
00332 # simple model of radial and tangential distortion - is sufficent.
00333 string distortion_model
00334
00335 # The distortion parameters, size depending on the distortion model.
00336 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
00337 float64[] D
00338
00339 # Intrinsic camera matrix for the raw (distorted) images.
00340 # [fx 0 cx]
00341 # K = [ 0 fy cy]
00342 # [ 0 0 1]
00343 # Projects 3D points in the camera coordinate frame to 2D pixel
00344 # coordinates using the focal lengths (fx, fy) and principal point
00345 # (cx, cy).
00346 float64[9] K # 3x3 row-major matrix
00347
00348 # Rectification matrix (stereo cameras only)
00349 # A rotation matrix aligning the camera coordinate system to the ideal
00350 # stereo image plane so that epipolar lines in both stereo images are
00351 # parallel.
00352 float64[9] R # 3x3 row-major matrix
00353
00354 # Projection/camera matrix
00355 # [fx' 0 cx' Tx]
00356 # P = [ 0 fy' cy' Ty]
00357 # [ 0 0 1 0]
00358 # By convention, this matrix specifies the intrinsic (camera) matrix
00359 # of the processed (rectified) image. That is, the left 3x3 portion
00360 # is the normal camera intrinsic matrix for the rectified image.
00361 # It projects 3D points in the camera coordinate frame to 2D pixel
00362 # coordinates using the focal lengths (fx', fy') and principal point
00363 # (cx', cy') - these may differ from the values in K.
00364 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will
00365 # also have R = the identity and P[1:3,1:3] = K.
00366 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the
00367 # position of the optical center of the second camera in the first
00368 # camera's frame. We assume Tz = 0 so both cameras are in the same
00369 # stereo image plane. The first camera always has Tx = Ty = 0. For
00370 # the right (second) camera of a horizontal stereo pair, Ty = 0 and
00371 # Tx = -fx' * B, where B is the baseline between the cameras.
00372 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto
00373 # the rectified image is given by:
00374 # [u v w]' = P * [X Y Z 1]'
00375 # x = u / w
00376 # y = v / w
00377 # This holds for both images of a stereo pair.
00378 float64[12] P # 3x4 row-major matrix
00379
00380
00381 #######################################################################
00382 # Operational Parameters #
00383 #######################################################################
00384 # These define the image region actually captured by the camera #
00385 # driver. Although they affect the geometry of the output image, they #
00386 # may be changed freely without recalibrating the camera. #
00387 #######################################################################
00388
00389 # Binning refers here to any camera setting which combines rectangular
00390 # neighborhoods of pixels into larger "super-pixels." It reduces the
00391 # resolution of the output image to
00392 # (width / binning_x) x (height / binning_y).
00393 # The default values binning_x = binning_y = 0 is considered the same
00394 # as binning_x = binning_y = 1 (no subsampling).
00395 uint32 binning_x
00396 uint32 binning_y
00397
00398 # Region of interest (subwindow of full camera resolution), given in
00399 # full resolution (unbinned) image coordinates. A particular ROI
00400 # always denotes the same window of pixels on the camera sensor,
00401 # regardless of binning settings.
00402 # The default setting of roi (all values 0) is considered the same as
00403 # full resolution (roi.width = width, roi.height = height).
00404 RegionOfInterest roi
00405
00406 """
00407
00408 OTHER_ERROR = 1
00409 SUCCESS = 2
00410
00411 __slots__ = ['point_cloud','image','disparity_image','camera_info','result']
00412 _slot_types = ['sensor_msgs/PointCloud2','sensor_msgs/Image','stereo_msgs/DisparityImage','sensor_msgs/CameraInfo','int32']
00413
00414 def __init__(self, *args, **kwds):
00415 """
00416 Constructor. Any message fields that are implicitly/explicitly
00417 set to None will be assigned a default value. The recommend
00418 use is keyword arguments as this is more robust to future message
00419 changes. You cannot mix in-order arguments and keyword arguments.
00420
00421 The available fields are:
00422 point_cloud,image,disparity_image,camera_info,result
00423
00424 :param args: complete set of field values, in .msg order
00425 :param kwds: use keyword arguments corresponding to message field names
00426 to set specific fields.
00427 """
00428 if args or kwds:
00429 super(RgbdAssemblyResponse, self).__init__(*args, **kwds)
00430
00431 if self.point_cloud is None:
00432 self.point_cloud = sensor_msgs.msg.PointCloud2()
00433 if self.image is None:
00434 self.image = sensor_msgs.msg.Image()
00435 if self.disparity_image is None:
00436 self.disparity_image = stereo_msgs.msg.DisparityImage()
00437 if self.camera_info is None:
00438 self.camera_info = sensor_msgs.msg.CameraInfo()
00439 if self.result is None:
00440 self.result = 0
00441 else:
00442 self.point_cloud = sensor_msgs.msg.PointCloud2()
00443 self.image = sensor_msgs.msg.Image()
00444 self.disparity_image = stereo_msgs.msg.DisparityImage()
00445 self.camera_info = sensor_msgs.msg.CameraInfo()
00446 self.result = 0
00447
00448 def _get_types(self):
00449 """
00450 internal API method
00451 """
00452 return self._slot_types
00453
00454 def serialize(self, buff):
00455 """
00456 serialize message into buffer
00457 :param buff: buffer, ``StringIO``
00458 """
00459 try:
00460 _x = self
00461 buff.write(_struct_3I.pack(_x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs))
00462 _x = self.point_cloud.header.frame_id
00463 length = len(_x)
00464 if python3 or type(_x) == unicode:
00465 _x = _x.encode('utf-8')
00466 length = len(_x)
00467 buff.write(struct.pack('<I%ss'%length, length, _x))
00468 _x = self
00469 buff.write(_struct_2I.pack(_x.point_cloud.height, _x.point_cloud.width))
00470 length = len(self.point_cloud.fields)
00471 buff.write(_struct_I.pack(length))
00472 for val1 in self.point_cloud.fields:
00473 _x = val1.name
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 = val1
00480 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00481 _x = self
00482 buff.write(_struct_B2I.pack(_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step))
00483 _x = self.point_cloud.data
00484 length = len(_x)
00485
00486 if type(_x) in [list, tuple]:
00487 buff.write(struct.pack('<I%sB'%length, length, *_x))
00488 else:
00489 buff.write(struct.pack('<I%ss'%length, length, _x))
00490 _x = self
00491 buff.write(_struct_B3I.pack(_x.point_cloud.is_dense, _x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00492 _x = self.image.header.frame_id
00493 length = len(_x)
00494 if python3 or type(_x) == unicode:
00495 _x = _x.encode('utf-8')
00496 length = len(_x)
00497 buff.write(struct.pack('<I%ss'%length, length, _x))
00498 _x = self
00499 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00500 _x = self.image.encoding
00501 length = len(_x)
00502 if python3 or type(_x) == unicode:
00503 _x = _x.encode('utf-8')
00504 length = len(_x)
00505 buff.write(struct.pack('<I%ss'%length, length, _x))
00506 _x = self
00507 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00508 _x = self.image.data
00509 length = len(_x)
00510
00511 if type(_x) in [list, tuple]:
00512 buff.write(struct.pack('<I%sB'%length, length, *_x))
00513 else:
00514 buff.write(struct.pack('<I%ss'%length, length, _x))
00515 _x = self
00516 buff.write(_struct_3I.pack(_x.disparity_image.header.seq, _x.disparity_image.header.stamp.secs, _x.disparity_image.header.stamp.nsecs))
00517 _x = self.disparity_image.header.frame_id
00518 length = len(_x)
00519 if python3 or type(_x) == unicode:
00520 _x = _x.encode('utf-8')
00521 length = len(_x)
00522 buff.write(struct.pack('<I%ss'%length, length, _x))
00523 _x = self
00524 buff.write(_struct_3I.pack(_x.disparity_image.image.header.seq, _x.disparity_image.image.header.stamp.secs, _x.disparity_image.image.header.stamp.nsecs))
00525 _x = self.disparity_image.image.header.frame_id
00526 length = len(_x)
00527 if python3 or type(_x) == unicode:
00528 _x = _x.encode('utf-8')
00529 length = len(_x)
00530 buff.write(struct.pack('<I%ss'%length, length, _x))
00531 _x = self
00532 buff.write(_struct_2I.pack(_x.disparity_image.image.height, _x.disparity_image.image.width))
00533 _x = self.disparity_image.image.encoding
00534 length = len(_x)
00535 if python3 or type(_x) == unicode:
00536 _x = _x.encode('utf-8')
00537 length = len(_x)
00538 buff.write(struct.pack('<I%ss'%length, length, _x))
00539 _x = self
00540 buff.write(_struct_BI.pack(_x.disparity_image.image.is_bigendian, _x.disparity_image.image.step))
00541 _x = self.disparity_image.image.data
00542 length = len(_x)
00543
00544 if type(_x) in [list, tuple]:
00545 buff.write(struct.pack('<I%sB'%length, length, *_x))
00546 else:
00547 buff.write(struct.pack('<I%ss'%length, length, _x))
00548 _x = self
00549 buff.write(_struct_2f4IB3f3I.pack(_x.disparity_image.f, _x.disparity_image.T, _x.disparity_image.valid_window.x_offset, _x.disparity_image.valid_window.y_offset, _x.disparity_image.valid_window.height, _x.disparity_image.valid_window.width, _x.disparity_image.valid_window.do_rectify, _x.disparity_image.min_disparity, _x.disparity_image.max_disparity, _x.disparity_image.delta_d, _x.camera_info.header.seq, _x.camera_info.header.stamp.secs, _x.camera_info.header.stamp.nsecs))
00550 _x = self.camera_info.header.frame_id
00551 length = len(_x)
00552 if python3 or type(_x) == unicode:
00553 _x = _x.encode('utf-8')
00554 length = len(_x)
00555 buff.write(struct.pack('<I%ss'%length, length, _x))
00556 _x = self
00557 buff.write(_struct_2I.pack(_x.camera_info.height, _x.camera_info.width))
00558 _x = self.camera_info.distortion_model
00559 length = len(_x)
00560 if python3 or type(_x) == unicode:
00561 _x = _x.encode('utf-8')
00562 length = len(_x)
00563 buff.write(struct.pack('<I%ss'%length, length, _x))
00564 length = len(self.camera_info.D)
00565 buff.write(_struct_I.pack(length))
00566 pattern = '<%sd'%length
00567 buff.write(struct.pack(pattern, *self.camera_info.D))
00568 buff.write(_struct_9d.pack(*self.camera_info.K))
00569 buff.write(_struct_9d.pack(*self.camera_info.R))
00570 buff.write(_struct_12d.pack(*self.camera_info.P))
00571 _x = self
00572 buff.write(_struct_6IBi.pack(_x.camera_info.binning_x, _x.camera_info.binning_y, _x.camera_info.roi.x_offset, _x.camera_info.roi.y_offset, _x.camera_info.roi.height, _x.camera_info.roi.width, _x.camera_info.roi.do_rectify, _x.result))
00573 except struct.error as se: self._check_types(se)
00574 except TypeError as te: self._check_types(te)
00575
00576 def deserialize(self, str):
00577 """
00578 unpack serialized message in str into this message instance
00579 :param str: byte array of serialized message, ``str``
00580 """
00581 try:
00582 if self.point_cloud is None:
00583 self.point_cloud = sensor_msgs.msg.PointCloud2()
00584 if self.image is None:
00585 self.image = sensor_msgs.msg.Image()
00586 if self.disparity_image is None:
00587 self.disparity_image = stereo_msgs.msg.DisparityImage()
00588 if self.camera_info is None:
00589 self.camera_info = sensor_msgs.msg.CameraInfo()
00590 end = 0
00591 _x = self
00592 start = end
00593 end += 12
00594 (_x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00595 start = end
00596 end += 4
00597 (length,) = _struct_I.unpack(str[start:end])
00598 start = end
00599 end += length
00600 if python3:
00601 self.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00602 else:
00603 self.point_cloud.header.frame_id = str[start:end]
00604 _x = self
00605 start = end
00606 end += 8
00607 (_x.point_cloud.height, _x.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00608 start = end
00609 end += 4
00610 (length,) = _struct_I.unpack(str[start:end])
00611 self.point_cloud.fields = []
00612 for i in range(0, length):
00613 val1 = sensor_msgs.msg.PointField()
00614 start = end
00615 end += 4
00616 (length,) = _struct_I.unpack(str[start:end])
00617 start = end
00618 end += length
00619 if python3:
00620 val1.name = str[start:end].decode('utf-8')
00621 else:
00622 val1.name = str[start:end]
00623 _x = val1
00624 start = end
00625 end += 9
00626 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00627 self.point_cloud.fields.append(val1)
00628 _x = self
00629 start = end
00630 end += 9
00631 (_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00632 self.point_cloud.is_bigendian = bool(self.point_cloud.is_bigendian)
00633 start = end
00634 end += 4
00635 (length,) = _struct_I.unpack(str[start:end])
00636 start = end
00637 end += length
00638 if python3:
00639 self.point_cloud.data = str[start:end].decode('utf-8')
00640 else:
00641 self.point_cloud.data = str[start:end]
00642 _x = self
00643 start = end
00644 end += 13
00645 (_x.point_cloud.is_dense, _x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00646 self.point_cloud.is_dense = bool(self.point_cloud.is_dense)
00647 start = end
00648 end += 4
00649 (length,) = _struct_I.unpack(str[start:end])
00650 start = end
00651 end += length
00652 if python3:
00653 self.image.header.frame_id = str[start:end].decode('utf-8')
00654 else:
00655 self.image.header.frame_id = str[start:end]
00656 _x = self
00657 start = end
00658 end += 8
00659 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00660 start = end
00661 end += 4
00662 (length,) = _struct_I.unpack(str[start:end])
00663 start = end
00664 end += length
00665 if python3:
00666 self.image.encoding = str[start:end].decode('utf-8')
00667 else:
00668 self.image.encoding = str[start:end]
00669 _x = self
00670 start = end
00671 end += 5
00672 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00673 start = end
00674 end += 4
00675 (length,) = _struct_I.unpack(str[start:end])
00676 start = end
00677 end += length
00678 if python3:
00679 self.image.data = str[start:end].decode('utf-8')
00680 else:
00681 self.image.data = str[start:end]
00682 _x = self
00683 start = end
00684 end += 12
00685 (_x.disparity_image.header.seq, _x.disparity_image.header.stamp.secs, _x.disparity_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00686 start = end
00687 end += 4
00688 (length,) = _struct_I.unpack(str[start:end])
00689 start = end
00690 end += length
00691 if python3:
00692 self.disparity_image.header.frame_id = str[start:end].decode('utf-8')
00693 else:
00694 self.disparity_image.header.frame_id = str[start:end]
00695 _x = self
00696 start = end
00697 end += 12
00698 (_x.disparity_image.image.header.seq, _x.disparity_image.image.header.stamp.secs, _x.disparity_image.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00699 start = end
00700 end += 4
00701 (length,) = _struct_I.unpack(str[start:end])
00702 start = end
00703 end += length
00704 if python3:
00705 self.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
00706 else:
00707 self.disparity_image.image.header.frame_id = str[start:end]
00708 _x = self
00709 start = end
00710 end += 8
00711 (_x.disparity_image.image.height, _x.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
00712 start = end
00713 end += 4
00714 (length,) = _struct_I.unpack(str[start:end])
00715 start = end
00716 end += length
00717 if python3:
00718 self.disparity_image.image.encoding = str[start:end].decode('utf-8')
00719 else:
00720 self.disparity_image.image.encoding = str[start:end]
00721 _x = self
00722 start = end
00723 end += 5
00724 (_x.disparity_image.image.is_bigendian, _x.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
00725 start = end
00726 end += 4
00727 (length,) = _struct_I.unpack(str[start:end])
00728 start = end
00729 end += length
00730 if python3:
00731 self.disparity_image.image.data = str[start:end].decode('utf-8')
00732 else:
00733 self.disparity_image.image.data = str[start:end]
00734 _x = self
00735 start = end
00736 end += 49
00737 (_x.disparity_image.f, _x.disparity_image.T, _x.disparity_image.valid_window.x_offset, _x.disparity_image.valid_window.y_offset, _x.disparity_image.valid_window.height, _x.disparity_image.valid_window.width, _x.disparity_image.valid_window.do_rectify, _x.disparity_image.min_disparity, _x.disparity_image.max_disparity, _x.disparity_image.delta_d, _x.camera_info.header.seq, _x.camera_info.header.stamp.secs, _x.camera_info.header.stamp.nsecs,) = _struct_2f4IB3f3I.unpack(str[start:end])
00738 self.disparity_image.valid_window.do_rectify = bool(self.disparity_image.valid_window.do_rectify)
00739 start = end
00740 end += 4
00741 (length,) = _struct_I.unpack(str[start:end])
00742 start = end
00743 end += length
00744 if python3:
00745 self.camera_info.header.frame_id = str[start:end].decode('utf-8')
00746 else:
00747 self.camera_info.header.frame_id = str[start:end]
00748 _x = self
00749 start = end
00750 end += 8
00751 (_x.camera_info.height, _x.camera_info.width,) = _struct_2I.unpack(str[start:end])
00752 start = end
00753 end += 4
00754 (length,) = _struct_I.unpack(str[start:end])
00755 start = end
00756 end += length
00757 if python3:
00758 self.camera_info.distortion_model = str[start:end].decode('utf-8')
00759 else:
00760 self.camera_info.distortion_model = str[start:end]
00761 start = end
00762 end += 4
00763 (length,) = _struct_I.unpack(str[start:end])
00764 pattern = '<%sd'%length
00765 start = end
00766 end += struct.calcsize(pattern)
00767 self.camera_info.D = struct.unpack(pattern, str[start:end])
00768 start = end
00769 end += 72
00770 self.camera_info.K = _struct_9d.unpack(str[start:end])
00771 start = end
00772 end += 72
00773 self.camera_info.R = _struct_9d.unpack(str[start:end])
00774 start = end
00775 end += 96
00776 self.camera_info.P = _struct_12d.unpack(str[start:end])
00777 _x = self
00778 start = end
00779 end += 29
00780 (_x.camera_info.binning_x, _x.camera_info.binning_y, _x.camera_info.roi.x_offset, _x.camera_info.roi.y_offset, _x.camera_info.roi.height, _x.camera_info.roi.width, _x.camera_info.roi.do_rectify, _x.result,) = _struct_6IBi.unpack(str[start:end])
00781 self.camera_info.roi.do_rectify = bool(self.camera_info.roi.do_rectify)
00782 return self
00783 except struct.error as e:
00784 raise genpy.DeserializationError(e)
00785
00786
00787 def serialize_numpy(self, buff, numpy):
00788 """
00789 serialize message with numpy array types into buffer
00790 :param buff: buffer, ``StringIO``
00791 :param numpy: numpy python module
00792 """
00793 try:
00794 _x = self
00795 buff.write(_struct_3I.pack(_x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs))
00796 _x = self.point_cloud.header.frame_id
00797 length = len(_x)
00798 if python3 or type(_x) == unicode:
00799 _x = _x.encode('utf-8')
00800 length = len(_x)
00801 buff.write(struct.pack('<I%ss'%length, length, _x))
00802 _x = self
00803 buff.write(_struct_2I.pack(_x.point_cloud.height, _x.point_cloud.width))
00804 length = len(self.point_cloud.fields)
00805 buff.write(_struct_I.pack(length))
00806 for val1 in self.point_cloud.fields:
00807 _x = val1.name
00808 length = len(_x)
00809 if python3 or type(_x) == unicode:
00810 _x = _x.encode('utf-8')
00811 length = len(_x)
00812 buff.write(struct.pack('<I%ss'%length, length, _x))
00813 _x = val1
00814 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00815 _x = self
00816 buff.write(_struct_B2I.pack(_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step))
00817 _x = self.point_cloud.data
00818 length = len(_x)
00819
00820 if type(_x) in [list, tuple]:
00821 buff.write(struct.pack('<I%sB'%length, length, *_x))
00822 else:
00823 buff.write(struct.pack('<I%ss'%length, length, _x))
00824 _x = self
00825 buff.write(_struct_B3I.pack(_x.point_cloud.is_dense, _x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00826 _x = self.image.header.frame_id
00827 length = len(_x)
00828 if python3 or type(_x) == unicode:
00829 _x = _x.encode('utf-8')
00830 length = len(_x)
00831 buff.write(struct.pack('<I%ss'%length, length, _x))
00832 _x = self
00833 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00834 _x = self.image.encoding
00835 length = len(_x)
00836 if python3 or type(_x) == unicode:
00837 _x = _x.encode('utf-8')
00838 length = len(_x)
00839 buff.write(struct.pack('<I%ss'%length, length, _x))
00840 _x = self
00841 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00842 _x = self.image.data
00843 length = len(_x)
00844
00845 if type(_x) in [list, tuple]:
00846 buff.write(struct.pack('<I%sB'%length, length, *_x))
00847 else:
00848 buff.write(struct.pack('<I%ss'%length, length, _x))
00849 _x = self
00850 buff.write(_struct_3I.pack(_x.disparity_image.header.seq, _x.disparity_image.header.stamp.secs, _x.disparity_image.header.stamp.nsecs))
00851 _x = self.disparity_image.header.frame_id
00852 length = len(_x)
00853 if python3 or type(_x) == unicode:
00854 _x = _x.encode('utf-8')
00855 length = len(_x)
00856 buff.write(struct.pack('<I%ss'%length, length, _x))
00857 _x = self
00858 buff.write(_struct_3I.pack(_x.disparity_image.image.header.seq, _x.disparity_image.image.header.stamp.secs, _x.disparity_image.image.header.stamp.nsecs))
00859 _x = self.disparity_image.image.header.frame_id
00860 length = len(_x)
00861 if python3 or type(_x) == unicode:
00862 _x = _x.encode('utf-8')
00863 length = len(_x)
00864 buff.write(struct.pack('<I%ss'%length, length, _x))
00865 _x = self
00866 buff.write(_struct_2I.pack(_x.disparity_image.image.height, _x.disparity_image.image.width))
00867 _x = self.disparity_image.image.encoding
00868 length = len(_x)
00869 if python3 or type(_x) == unicode:
00870 _x = _x.encode('utf-8')
00871 length = len(_x)
00872 buff.write(struct.pack('<I%ss'%length, length, _x))
00873 _x = self
00874 buff.write(_struct_BI.pack(_x.disparity_image.image.is_bigendian, _x.disparity_image.image.step))
00875 _x = self.disparity_image.image.data
00876 length = len(_x)
00877
00878 if type(_x) in [list, tuple]:
00879 buff.write(struct.pack('<I%sB'%length, length, *_x))
00880 else:
00881 buff.write(struct.pack('<I%ss'%length, length, _x))
00882 _x = self
00883 buff.write(_struct_2f4IB3f3I.pack(_x.disparity_image.f, _x.disparity_image.T, _x.disparity_image.valid_window.x_offset, _x.disparity_image.valid_window.y_offset, _x.disparity_image.valid_window.height, _x.disparity_image.valid_window.width, _x.disparity_image.valid_window.do_rectify, _x.disparity_image.min_disparity, _x.disparity_image.max_disparity, _x.disparity_image.delta_d, _x.camera_info.header.seq, _x.camera_info.header.stamp.secs, _x.camera_info.header.stamp.nsecs))
00884 _x = self.camera_info.header.frame_id
00885 length = len(_x)
00886 if python3 or type(_x) == unicode:
00887 _x = _x.encode('utf-8')
00888 length = len(_x)
00889 buff.write(struct.pack('<I%ss'%length, length, _x))
00890 _x = self
00891 buff.write(_struct_2I.pack(_x.camera_info.height, _x.camera_info.width))
00892 _x = self.camera_info.distortion_model
00893 length = len(_x)
00894 if python3 or type(_x) == unicode:
00895 _x = _x.encode('utf-8')
00896 length = len(_x)
00897 buff.write(struct.pack('<I%ss'%length, length, _x))
00898 length = len(self.camera_info.D)
00899 buff.write(_struct_I.pack(length))
00900 pattern = '<%sd'%length
00901 buff.write(self.camera_info.D.tostring())
00902 buff.write(self.camera_info.K.tostring())
00903 buff.write(self.camera_info.R.tostring())
00904 buff.write(self.camera_info.P.tostring())
00905 _x = self
00906 buff.write(_struct_6IBi.pack(_x.camera_info.binning_x, _x.camera_info.binning_y, _x.camera_info.roi.x_offset, _x.camera_info.roi.y_offset, _x.camera_info.roi.height, _x.camera_info.roi.width, _x.camera_info.roi.do_rectify, _x.result))
00907 except struct.error as se: self._check_types(se)
00908 except TypeError as te: self._check_types(te)
00909
00910 def deserialize_numpy(self, str, numpy):
00911 """
00912 unpack serialized message in str into this message instance using numpy for array types
00913 :param str: byte array of serialized message, ``str``
00914 :param numpy: numpy python module
00915 """
00916 try:
00917 if self.point_cloud is None:
00918 self.point_cloud = sensor_msgs.msg.PointCloud2()
00919 if self.image is None:
00920 self.image = sensor_msgs.msg.Image()
00921 if self.disparity_image is None:
00922 self.disparity_image = stereo_msgs.msg.DisparityImage()
00923 if self.camera_info is None:
00924 self.camera_info = sensor_msgs.msg.CameraInfo()
00925 end = 0
00926 _x = self
00927 start = end
00928 end += 12
00929 (_x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00930 start = end
00931 end += 4
00932 (length,) = _struct_I.unpack(str[start:end])
00933 start = end
00934 end += length
00935 if python3:
00936 self.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00937 else:
00938 self.point_cloud.header.frame_id = str[start:end]
00939 _x = self
00940 start = end
00941 end += 8
00942 (_x.point_cloud.height, _x.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00943 start = end
00944 end += 4
00945 (length,) = _struct_I.unpack(str[start:end])
00946 self.point_cloud.fields = []
00947 for i in range(0, length):
00948 val1 = sensor_msgs.msg.PointField()
00949 start = end
00950 end += 4
00951 (length,) = _struct_I.unpack(str[start:end])
00952 start = end
00953 end += length
00954 if python3:
00955 val1.name = str[start:end].decode('utf-8')
00956 else:
00957 val1.name = str[start:end]
00958 _x = val1
00959 start = end
00960 end += 9
00961 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00962 self.point_cloud.fields.append(val1)
00963 _x = self
00964 start = end
00965 end += 9
00966 (_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00967 self.point_cloud.is_bigendian = bool(self.point_cloud.is_bigendian)
00968 start = end
00969 end += 4
00970 (length,) = _struct_I.unpack(str[start:end])
00971 start = end
00972 end += length
00973 if python3:
00974 self.point_cloud.data = str[start:end].decode('utf-8')
00975 else:
00976 self.point_cloud.data = str[start:end]
00977 _x = self
00978 start = end
00979 end += 13
00980 (_x.point_cloud.is_dense, _x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00981 self.point_cloud.is_dense = bool(self.point_cloud.is_dense)
00982 start = end
00983 end += 4
00984 (length,) = _struct_I.unpack(str[start:end])
00985 start = end
00986 end += length
00987 if python3:
00988 self.image.header.frame_id = str[start:end].decode('utf-8')
00989 else:
00990 self.image.header.frame_id = str[start:end]
00991 _x = self
00992 start = end
00993 end += 8
00994 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00995 start = end
00996 end += 4
00997 (length,) = _struct_I.unpack(str[start:end])
00998 start = end
00999 end += length
01000 if python3:
01001 self.image.encoding = str[start:end].decode('utf-8')
01002 else:
01003 self.image.encoding = str[start:end]
01004 _x = self
01005 start = end
01006 end += 5
01007 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
01008 start = end
01009 end += 4
01010 (length,) = _struct_I.unpack(str[start:end])
01011 start = end
01012 end += length
01013 if python3:
01014 self.image.data = str[start:end].decode('utf-8')
01015 else:
01016 self.image.data = str[start:end]
01017 _x = self
01018 start = end
01019 end += 12
01020 (_x.disparity_image.header.seq, _x.disparity_image.header.stamp.secs, _x.disparity_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01021 start = end
01022 end += 4
01023 (length,) = _struct_I.unpack(str[start:end])
01024 start = end
01025 end += length
01026 if python3:
01027 self.disparity_image.header.frame_id = str[start:end].decode('utf-8')
01028 else:
01029 self.disparity_image.header.frame_id = str[start:end]
01030 _x = self
01031 start = end
01032 end += 12
01033 (_x.disparity_image.image.header.seq, _x.disparity_image.image.header.stamp.secs, _x.disparity_image.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01034 start = end
01035 end += 4
01036 (length,) = _struct_I.unpack(str[start:end])
01037 start = end
01038 end += length
01039 if python3:
01040 self.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
01041 else:
01042 self.disparity_image.image.header.frame_id = str[start:end]
01043 _x = self
01044 start = end
01045 end += 8
01046 (_x.disparity_image.image.height, _x.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
01047 start = end
01048 end += 4
01049 (length,) = _struct_I.unpack(str[start:end])
01050 start = end
01051 end += length
01052 if python3:
01053 self.disparity_image.image.encoding = str[start:end].decode('utf-8')
01054 else:
01055 self.disparity_image.image.encoding = str[start:end]
01056 _x = self
01057 start = end
01058 end += 5
01059 (_x.disparity_image.image.is_bigendian, _x.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
01060 start = end
01061 end += 4
01062 (length,) = _struct_I.unpack(str[start:end])
01063 start = end
01064 end += length
01065 if python3:
01066 self.disparity_image.image.data = str[start:end].decode('utf-8')
01067 else:
01068 self.disparity_image.image.data = str[start:end]
01069 _x = self
01070 start = end
01071 end += 49
01072 (_x.disparity_image.f, _x.disparity_image.T, _x.disparity_image.valid_window.x_offset, _x.disparity_image.valid_window.y_offset, _x.disparity_image.valid_window.height, _x.disparity_image.valid_window.width, _x.disparity_image.valid_window.do_rectify, _x.disparity_image.min_disparity, _x.disparity_image.max_disparity, _x.disparity_image.delta_d, _x.camera_info.header.seq, _x.camera_info.header.stamp.secs, _x.camera_info.header.stamp.nsecs,) = _struct_2f4IB3f3I.unpack(str[start:end])
01073 self.disparity_image.valid_window.do_rectify = bool(self.disparity_image.valid_window.do_rectify)
01074 start = end
01075 end += 4
01076 (length,) = _struct_I.unpack(str[start:end])
01077 start = end
01078 end += length
01079 if python3:
01080 self.camera_info.header.frame_id = str[start:end].decode('utf-8')
01081 else:
01082 self.camera_info.header.frame_id = str[start:end]
01083 _x = self
01084 start = end
01085 end += 8
01086 (_x.camera_info.height, _x.camera_info.width,) = _struct_2I.unpack(str[start:end])
01087 start = end
01088 end += 4
01089 (length,) = _struct_I.unpack(str[start:end])
01090 start = end
01091 end += length
01092 if python3:
01093 self.camera_info.distortion_model = str[start:end].decode('utf-8')
01094 else:
01095 self.camera_info.distortion_model = str[start:end]
01096 start = end
01097 end += 4
01098 (length,) = _struct_I.unpack(str[start:end])
01099 pattern = '<%sd'%length
01100 start = end
01101 end += struct.calcsize(pattern)
01102 self.camera_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01103 start = end
01104 end += 72
01105 self.camera_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01106 start = end
01107 end += 72
01108 self.camera_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01109 start = end
01110 end += 96
01111 self.camera_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01112 _x = self
01113 start = end
01114 end += 29
01115 (_x.camera_info.binning_x, _x.camera_info.binning_y, _x.camera_info.roi.x_offset, _x.camera_info.roi.y_offset, _x.camera_info.roi.height, _x.camera_info.roi.width, _x.camera_info.roi.do_rectify, _x.result,) = _struct_6IBi.unpack(str[start:end])
01116 self.camera_info.roi.do_rectify = bool(self.camera_info.roi.do_rectify)
01117 return self
01118 except struct.error as e:
01119 raise genpy.DeserializationError(e)
01120
01121 _struct_I = genpy.struct_I
01122 _struct_IBI = struct.Struct("<IBI")
01123 _struct_12d = struct.Struct("<12d")
01124 _struct_BI = struct.Struct("<BI")
01125 _struct_9d = struct.Struct("<9d")
01126 _struct_3I = struct.Struct("<3I")
01127 _struct_B3I = struct.Struct("<B3I")
01128 _struct_B2I = struct.Struct("<B2I")
01129 _struct_2f4IB3f3I = struct.Struct("<2f4IB3f3I")
01130 _struct_6IBi = struct.Struct("<6IBi")
01131 _struct_2I = struct.Struct("<2I")
01132 class RgbdAssembly(object):
01133 _type = 'rgbd_assembler/RgbdAssembly'
01134 _md5sum = '258b6f93e1876c2777ab914303667a41'
01135 _request_class = RgbdAssemblyRequest
01136 _response_class = RgbdAssemblyResponse