_PullRawData.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cr_capture/PullRawDataRequest.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 PullRawDataRequest(genpy.Message):
00009   _md5sum = "d5dfc5e2c07fd836a08aeab1014c36be"
00010   _type = "cr_capture/PullRawDataRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """bool exclude_camera_images
00013 bool exclude_range_images
00014 
00015 """
00016   __slots__ = ['exclude_camera_images','exclude_range_images']
00017   _slot_types = ['bool','bool']
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        exclude_camera_images,exclude_range_images
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(PullRawDataRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.exclude_camera_images is None:
00037         self.exclude_camera_images = False
00038       if self.exclude_range_images is None:
00039         self.exclude_range_images = False
00040     else:
00041       self.exclude_camera_images = False
00042       self.exclude_range_images = False
00043 
00044   def _get_types(self):
00045     """
00046     internal API method
00047     """
00048     return self._slot_types
00049 
00050   def serialize(self, buff):
00051     """
00052     serialize message into buffer
00053     :param buff: buffer, ``StringIO``
00054     """
00055     try:
00056       _x = self
00057       buff.write(_struct_2B.pack(_x.exclude_camera_images, _x.exclude_range_images))
00058     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00059     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       _x = self
00069       start = end
00070       end += 2
00071       (_x.exclude_camera_images, _x.exclude_range_images,) = _struct_2B.unpack(str[start:end])
00072       self.exclude_camera_images = bool(self.exclude_camera_images)
00073       self.exclude_range_images = bool(self.exclude_range_images)
00074       return self
00075     except struct.error as e:
00076       raise genpy.DeserializationError(e) #most likely buffer underfill
00077 
00078 
00079   def serialize_numpy(self, buff, numpy):
00080     """
00081     serialize message with numpy array types into buffer
00082     :param buff: buffer, ``StringIO``
00083     :param numpy: numpy python module
00084     """
00085     try:
00086       _x = self
00087       buff.write(_struct_2B.pack(_x.exclude_camera_images, _x.exclude_range_images))
00088     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00089     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00090 
00091   def deserialize_numpy(self, str, numpy):
00092     """
00093     unpack serialized message in str into this message instance using numpy for array types
00094     :param str: byte array of serialized message, ``str``
00095     :param numpy: numpy python module
00096     """
00097     try:
00098       end = 0
00099       _x = self
00100       start = end
00101       end += 2
00102       (_x.exclude_camera_images, _x.exclude_range_images,) = _struct_2B.unpack(str[start:end])
00103       self.exclude_camera_images = bool(self.exclude_camera_images)
00104       self.exclude_range_images = bool(self.exclude_range_images)
00105       return self
00106     except struct.error as e:
00107       raise genpy.DeserializationError(e) #most likely buffer underfill
00108 
00109 _struct_I = genpy.struct_I
00110 _struct_2B = struct.Struct("<2B")
00111 """autogenerated by genpy from cr_capture/PullRawDataResponse.msg. Do not edit."""
00112 import sys
00113 python3 = True if sys.hexversion > 0x03000000 else False
00114 import genpy
00115 import struct
00116 
00117 import cr_capture.msg
00118 import sensor_msgs.msg
00119 import std_msgs.msg
00120 
00121 class PullRawDataResponse(genpy.Message):
00122   _md5sum = "936eac34b9af042bdc5d6c160ac45262"
00123   _type = "cr_capture/PullRawDataResponse"
00124   _has_header = False #flag to mark the presence of a Header object
00125   _full_text = """cr_capture/RawCloudData data
00126 
00127 
00128 ================================================================================
00129 MSG: cr_capture/RawCloudData
00130 Header header
00131 # range sensor
00132 sensor_msgs/Image intensity
00133 sensor_msgs/Image confidence
00134 sensor_msgs/Image depth
00135 sensor_msgs/Image depth16
00136 # sensor_msgs/PointCloud point_cloud_raw
00137 sensor_msgs/CameraInfo range_info
00138 
00139 # camera
00140 sensor_msgs/Image left_image
00141 sensor_msgs/Image right_image
00142 sensor_msgs/CameraInfo left_info
00143 sensor_msgs/CameraInfo right_info
00144 
00145 # result
00146 cr_capture/PixelIndices pixel_indices
00147 sensor_msgs/PointCloud2 point_cloud
00148 
00149 ================================================================================
00150 MSG: std_msgs/Header
00151 # Standard metadata for higher-level stamped data types.
00152 # This is generally used to communicate timestamped data 
00153 # in a particular coordinate frame.
00154 # 
00155 # sequence ID: consecutively increasing ID 
00156 uint32 seq
00157 #Two-integer timestamp that is expressed as:
00158 # * stamp.secs: seconds (stamp_secs) since epoch
00159 # * stamp.nsecs: nanoseconds since stamp_secs
00160 # time-handling sugar is provided by the client library
00161 time stamp
00162 #Frame this data is associated with
00163 # 0: no frame
00164 # 1: global frame
00165 string frame_id
00166 
00167 ================================================================================
00168 MSG: sensor_msgs/Image
00169 # This message contains an uncompressed image
00170 # (0, 0) is at top-left corner of image
00171 #
00172 
00173 Header header        # Header timestamp should be acquisition time of image
00174                      # Header frame_id should be optical frame of camera
00175                      # origin of frame should be optical center of cameara
00176                      # +x should point to the right in the image
00177                      # +y should point down in the image
00178                      # +z should point into to plane of the image
00179                      # If the frame_id here and the frame_id of the CameraInfo
00180                      # message associated with the image conflict
00181                      # the behavior is undefined
00182 
00183 uint32 height         # image height, that is, number of rows
00184 uint32 width          # image width, that is, number of columns
00185 
00186 # The legal values for encoding are in file src/image_encodings.cpp
00187 # If you want to standardize a new string format, join
00188 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00189 
00190 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00191                       # taken from the list of strings in include/sensor_msgs/image_encodings.h
00192 
00193 uint8 is_bigendian    # is this data bigendian?
00194 uint32 step           # Full row length in bytes
00195 uint8[] data          # actual matrix data, size is (step * rows)
00196 
00197 ================================================================================
00198 MSG: sensor_msgs/CameraInfo
00199 # This message defines meta information for a camera. It should be in a
00200 # camera namespace on topic "camera_info" and accompanied by up to five
00201 # image topics named:
00202 #
00203 #   image_raw - raw data from the camera driver, possibly Bayer encoded
00204 #   image            - monochrome, distorted
00205 #   image_color      - color, distorted
00206 #   image_rect       - monochrome, rectified
00207 #   image_rect_color - color, rectified
00208 #
00209 # The image_pipeline contains packages (image_proc, stereo_image_proc)
00210 # for producing the four processed image topics from image_raw and
00211 # camera_info. The meaning of the camera parameters are described in
00212 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.
00213 #
00214 # The image_geometry package provides a user-friendly interface to
00215 # common operations using this meta information. If you want to, e.g.,
00216 # project a 3d point into image coordinates, we strongly recommend
00217 # using image_geometry.
00218 #
00219 # If the camera is uncalibrated, the matrices D, K, R, P should be left
00220 # zeroed out. In particular, clients may assume that K[0] == 0.0
00221 # indicates an uncalibrated camera.
00222 
00223 #######################################################################
00224 #                     Image acquisition info                          #
00225 #######################################################################
00226 
00227 # Time of image acquisition, camera coordinate frame ID
00228 Header header    # Header timestamp should be acquisition time of image
00229                  # Header frame_id should be optical frame of camera
00230                  # origin of frame should be optical center of camera
00231                  # +x should point to the right in the image
00232                  # +y should point down in the image
00233                  # +z should point into the plane of the image
00234 
00235 
00236 #######################################################################
00237 #                      Calibration Parameters                         #
00238 #######################################################################
00239 # These are fixed during camera calibration. Their values will be the #
00240 # same in all messages until the camera is recalibrated. Note that    #
00241 # self-calibrating systems may "recalibrate" frequently.              #
00242 #                                                                     #
00243 # The internal parameters can be used to warp a raw (distorted) image #
00244 # to:                                                                 #
00245 #   1. An undistorted image (requires D and K)                        #
00246 #   2. A rectified image (requires D, K, R)                           #
00247 # The projection matrix P projects 3D points into the rectified image.#
00248 #######################################################################
00249 
00250 # The image dimensions with which the camera was calibrated. Normally
00251 # this will be the full camera resolution in pixels.
00252 uint32 height
00253 uint32 width
00254 
00255 # The distortion model used. Supported models are listed in
00256 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a
00257 # simple model of radial and tangential distortion - is sufficent.
00258 string distortion_model
00259 
00260 # The distortion parameters, size depending on the distortion model.
00261 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
00262 float64[] D
00263 
00264 # Intrinsic camera matrix for the raw (distorted) images.
00265 #     [fx  0 cx]
00266 # K = [ 0 fy cy]
00267 #     [ 0  0  1]
00268 # Projects 3D points in the camera coordinate frame to 2D pixel
00269 # coordinates using the focal lengths (fx, fy) and principal point
00270 # (cx, cy).
00271 float64[9]  K # 3x3 row-major matrix
00272 
00273 # Rectification matrix (stereo cameras only)
00274 # A rotation matrix aligning the camera coordinate system to the ideal
00275 # stereo image plane so that epipolar lines in both stereo images are
00276 # parallel.
00277 float64[9]  R # 3x3 row-major matrix
00278 
00279 # Projection/camera matrix
00280 #     [fx'  0  cx' Tx]
00281 # P = [ 0  fy' cy' Ty]
00282 #     [ 0   0   1   0]
00283 # By convention, this matrix specifies the intrinsic (camera) matrix
00284 #  of the processed (rectified) image. That is, the left 3x3 portion
00285 #  is the normal camera intrinsic matrix for the rectified image.
00286 # It projects 3D points in the camera coordinate frame to 2D pixel
00287 #  coordinates using the focal lengths (fx', fy') and principal point
00288 #  (cx', cy') - these may differ from the values in K.
00289 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will
00290 #  also have R = the identity and P[1:3,1:3] = K.
00291 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the
00292 #  position of the optical center of the second camera in the first
00293 #  camera's frame. We assume Tz = 0 so both cameras are in the same
00294 #  stereo image plane. The first camera always has Tx = Ty = 0. For
00295 #  the right (second) camera of a horizontal stereo pair, Ty = 0 and
00296 #  Tx = -fx' * B, where B is the baseline between the cameras.
00297 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto
00298 #  the rectified image is given by:
00299 #  [u v w]' = P * [X Y Z 1]'
00300 #         x = u / w
00301 #         y = v / w
00302 #  This holds for both images of a stereo pair.
00303 float64[12] P # 3x4 row-major matrix
00304 
00305 
00306 #######################################################################
00307 #                      Operational Parameters                         #
00308 #######################################################################
00309 # These define the image region actually captured by the camera       #
00310 # driver. Although they affect the geometry of the output image, they #
00311 # may be changed freely without recalibrating the camera.             #
00312 #######################################################################
00313 
00314 # Binning refers here to any camera setting which combines rectangular
00315 #  neighborhoods of pixels into larger "super-pixels." It reduces the
00316 #  resolution of the output image to
00317 #  (width / binning_x) x (height / binning_y).
00318 # The default values binning_x = binning_y = 0 is considered the same
00319 #  as binning_x = binning_y = 1 (no subsampling).
00320 uint32 binning_x
00321 uint32 binning_y
00322 
00323 # Region of interest (subwindow of full camera resolution), given in
00324 #  full resolution (unbinned) image coordinates. A particular ROI
00325 #  always denotes the same window of pixels on the camera sensor,
00326 #  regardless of binning settings.
00327 # The default setting of roi (all values 0) is considered the same as
00328 #  full resolution (roi.width = width, roi.height = height).
00329 RegionOfInterest roi
00330 
00331 ================================================================================
00332 MSG: sensor_msgs/RegionOfInterest
00333 # This message is used to specify a region of interest within an image.
00334 #
00335 # When used to specify the ROI setting of the camera when the image was
00336 # taken, the height and width fields should either match the height and
00337 # width fields for the associated image; or height = width = 0
00338 # indicates that the full resolution image was captured.
00339 
00340 uint32 x_offset  # Leftmost pixel of the ROI
00341                  # (0 if the ROI includes the left edge of the image)
00342 uint32 y_offset  # Topmost pixel of the ROI
00343                  # (0 if the ROI includes the top edge of the image)
00344 uint32 height    # Height of ROI
00345 uint32 width     # Width of ROI
00346 
00347 # True if a distinct rectified ROI should be calculated from the "raw"
00348 # ROI in this message. Typically this should be False if the full image
00349 # is captured (ROI not used), and True if a subwindow is captured (ROI
00350 # used).
00351 bool do_rectify
00352 
00353 ================================================================================
00354 MSG: cr_capture/PixelIndices
00355 Header header
00356 int32[] indices # [[lu,ru,v],...] 
00357 
00358 ================================================================================
00359 MSG: sensor_msgs/PointCloud2
00360 # This message holds a collection of N-dimensional points, which may
00361 # contain additional information such as normals, intensity, etc. The
00362 # point data is stored as a binary blob, its layout described by the
00363 # contents of the "fields" array.
00364 
00365 # The point cloud data may be organized 2d (image-like) or 1d
00366 # (unordered). Point clouds organized as 2d images may be produced by
00367 # camera depth sensors such as stereo or time-of-flight.
00368 
00369 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00370 # points).
00371 Header header
00372 
00373 # 2D structure of the point cloud. If the cloud is unordered, height is
00374 # 1 and width is the length of the point cloud.
00375 uint32 height
00376 uint32 width
00377 
00378 # Describes the channels and their layout in the binary data blob.
00379 PointField[] fields
00380 
00381 bool    is_bigendian # Is this data bigendian?
00382 uint32  point_step   # Length of a point in bytes
00383 uint32  row_step     # Length of a row in bytes
00384 uint8[] data         # Actual point data, size is (row_step*height)
00385 
00386 bool is_dense        # True if there are no invalid points
00387 
00388 ================================================================================
00389 MSG: sensor_msgs/PointField
00390 # This message holds the description of one point entry in the
00391 # PointCloud2 message format.
00392 uint8 INT8    = 1
00393 uint8 UINT8   = 2
00394 uint8 INT16   = 3
00395 uint8 UINT16  = 4
00396 uint8 INT32   = 5
00397 uint8 UINT32  = 6
00398 uint8 FLOAT32 = 7
00399 uint8 FLOAT64 = 8
00400 
00401 string name      # Name of field
00402 uint32 offset    # Offset from start of point struct
00403 uint8  datatype  # Datatype enumeration, see above
00404 uint32 count     # How many elements in the field
00405 
00406 """
00407   __slots__ = ['data']
00408   _slot_types = ['cr_capture/RawCloudData']
00409 
00410   def __init__(self, *args, **kwds):
00411     """
00412     Constructor. Any message fields that are implicitly/explicitly
00413     set to None will be assigned a default value. The recommend
00414     use is keyword arguments as this is more robust to future message
00415     changes.  You cannot mix in-order arguments and keyword arguments.
00416 
00417     The available fields are:
00418        data
00419 
00420     :param args: complete set of field values, in .msg order
00421     :param kwds: use keyword arguments corresponding to message field names
00422     to set specific fields.
00423     """
00424     if args or kwds:
00425       super(PullRawDataResponse, self).__init__(*args, **kwds)
00426       #message fields cannot be None, assign default values for those that are
00427       if self.data is None:
00428         self.data = cr_capture.msg.RawCloudData()
00429     else:
00430       self.data = cr_capture.msg.RawCloudData()
00431 
00432   def _get_types(self):
00433     """
00434     internal API method
00435     """
00436     return self._slot_types
00437 
00438   def serialize(self, buff):
00439     """
00440     serialize message into buffer
00441     :param buff: buffer, ``StringIO``
00442     """
00443     try:
00444       _x = self
00445       buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
00446       _x = self.data.header.frame_id
00447       length = len(_x)
00448       if python3 or type(_x) == unicode:
00449         _x = _x.encode('utf-8')
00450         length = len(_x)
00451       buff.write(struct.pack('<I%ss'%length, length, _x))
00452       _x = self
00453       buff.write(_struct_3I.pack(_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs))
00454       _x = self.data.intensity.header.frame_id
00455       length = len(_x)
00456       if python3 or type(_x) == unicode:
00457         _x = _x.encode('utf-8')
00458         length = len(_x)
00459       buff.write(struct.pack('<I%ss'%length, length, _x))
00460       _x = self
00461       buff.write(_struct_2I.pack(_x.data.intensity.height, _x.data.intensity.width))
00462       _x = self.data.intensity.encoding
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_BI.pack(_x.data.intensity.is_bigendian, _x.data.intensity.step))
00470       _x = self.data.intensity.data
00471       length = len(_x)
00472       # - if encoded as a list instead, serialize as bytes instead of string
00473       if type(_x) in [list, tuple]:
00474         buff.write(struct.pack('<I%sB'%length, length, *_x))
00475       else:
00476         buff.write(struct.pack('<I%ss'%length, length, _x))
00477       _x = self
00478       buff.write(_struct_3I.pack(_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs))
00479       _x = self.data.confidence.header.frame_id
00480       length = len(_x)
00481       if python3 or type(_x) == unicode:
00482         _x = _x.encode('utf-8')
00483         length = len(_x)
00484       buff.write(struct.pack('<I%ss'%length, length, _x))
00485       _x = self
00486       buff.write(_struct_2I.pack(_x.data.confidence.height, _x.data.confidence.width))
00487       _x = self.data.confidence.encoding
00488       length = len(_x)
00489       if python3 or type(_x) == unicode:
00490         _x = _x.encode('utf-8')
00491         length = len(_x)
00492       buff.write(struct.pack('<I%ss'%length, length, _x))
00493       _x = self
00494       buff.write(_struct_BI.pack(_x.data.confidence.is_bigendian, _x.data.confidence.step))
00495       _x = self.data.confidence.data
00496       length = len(_x)
00497       # - if encoded as a list instead, serialize as bytes instead of string
00498       if type(_x) in [list, tuple]:
00499         buff.write(struct.pack('<I%sB'%length, length, *_x))
00500       else:
00501         buff.write(struct.pack('<I%ss'%length, length, _x))
00502       _x = self
00503       buff.write(_struct_3I.pack(_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs))
00504       _x = self.data.depth.header.frame_id
00505       length = len(_x)
00506       if python3 or type(_x) == unicode:
00507         _x = _x.encode('utf-8')
00508         length = len(_x)
00509       buff.write(struct.pack('<I%ss'%length, length, _x))
00510       _x = self
00511       buff.write(_struct_2I.pack(_x.data.depth.height, _x.data.depth.width))
00512       _x = self.data.depth.encoding
00513       length = len(_x)
00514       if python3 or type(_x) == unicode:
00515         _x = _x.encode('utf-8')
00516         length = len(_x)
00517       buff.write(struct.pack('<I%ss'%length, length, _x))
00518       _x = self
00519       buff.write(_struct_BI.pack(_x.data.depth.is_bigendian, _x.data.depth.step))
00520       _x = self.data.depth.data
00521       length = len(_x)
00522       # - if encoded as a list instead, serialize as bytes instead of string
00523       if type(_x) in [list, tuple]:
00524         buff.write(struct.pack('<I%sB'%length, length, *_x))
00525       else:
00526         buff.write(struct.pack('<I%ss'%length, length, _x))
00527       _x = self
00528       buff.write(_struct_3I.pack(_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs))
00529       _x = self.data.depth16.header.frame_id
00530       length = len(_x)
00531       if python3 or type(_x) == unicode:
00532         _x = _x.encode('utf-8')
00533         length = len(_x)
00534       buff.write(struct.pack('<I%ss'%length, length, _x))
00535       _x = self
00536       buff.write(_struct_2I.pack(_x.data.depth16.height, _x.data.depth16.width))
00537       _x = self.data.depth16.encoding
00538       length = len(_x)
00539       if python3 or type(_x) == unicode:
00540         _x = _x.encode('utf-8')
00541         length = len(_x)
00542       buff.write(struct.pack('<I%ss'%length, length, _x))
00543       _x = self
00544       buff.write(_struct_BI.pack(_x.data.depth16.is_bigendian, _x.data.depth16.step))
00545       _x = self.data.depth16.data
00546       length = len(_x)
00547       # - if encoded as a list instead, serialize as bytes instead of string
00548       if type(_x) in [list, tuple]:
00549         buff.write(struct.pack('<I%sB'%length, length, *_x))
00550       else:
00551         buff.write(struct.pack('<I%ss'%length, length, _x))
00552       _x = self
00553       buff.write(_struct_3I.pack(_x.data.range_info.header.seq, _x.data.range_info.header.stamp.secs, _x.data.range_info.header.stamp.nsecs))
00554       _x = self.data.range_info.header.frame_id
00555       length = len(_x)
00556       if python3 or type(_x) == unicode:
00557         _x = _x.encode('utf-8')
00558         length = len(_x)
00559       buff.write(struct.pack('<I%ss'%length, length, _x))
00560       _x = self
00561       buff.write(_struct_2I.pack(_x.data.range_info.height, _x.data.range_info.width))
00562       _x = self.data.range_info.distortion_model
00563       length = len(_x)
00564       if python3 or type(_x) == unicode:
00565         _x = _x.encode('utf-8')
00566         length = len(_x)
00567       buff.write(struct.pack('<I%ss'%length, length, _x))
00568       length = len(self.data.range_info.D)
00569       buff.write(_struct_I.pack(length))
00570       pattern = '<%sd'%length
00571       buff.write(struct.pack(pattern, *self.data.range_info.D))
00572       buff.write(_struct_9d.pack(*self.data.range_info.K))
00573       buff.write(_struct_9d.pack(*self.data.range_info.R))
00574       buff.write(_struct_12d.pack(*self.data.range_info.P))
00575       _x = self
00576       buff.write(_struct_6IB3I.pack(_x.data.range_info.binning_x, _x.data.range_info.binning_y, _x.data.range_info.roi.x_offset, _x.data.range_info.roi.y_offset, _x.data.range_info.roi.height, _x.data.range_info.roi.width, _x.data.range_info.roi.do_rectify, _x.data.left_image.header.seq, _x.data.left_image.header.stamp.secs, _x.data.left_image.header.stamp.nsecs))
00577       _x = self.data.left_image.header.frame_id
00578       length = len(_x)
00579       if python3 or type(_x) == unicode:
00580         _x = _x.encode('utf-8')
00581         length = len(_x)
00582       buff.write(struct.pack('<I%ss'%length, length, _x))
00583       _x = self
00584       buff.write(_struct_2I.pack(_x.data.left_image.height, _x.data.left_image.width))
00585       _x = self.data.left_image.encoding
00586       length = len(_x)
00587       if python3 or type(_x) == unicode:
00588         _x = _x.encode('utf-8')
00589         length = len(_x)
00590       buff.write(struct.pack('<I%ss'%length, length, _x))
00591       _x = self
00592       buff.write(_struct_BI.pack(_x.data.left_image.is_bigendian, _x.data.left_image.step))
00593       _x = self.data.left_image.data
00594       length = len(_x)
00595       # - if encoded as a list instead, serialize as bytes instead of string
00596       if type(_x) in [list, tuple]:
00597         buff.write(struct.pack('<I%sB'%length, length, *_x))
00598       else:
00599         buff.write(struct.pack('<I%ss'%length, length, _x))
00600       _x = self
00601       buff.write(_struct_3I.pack(_x.data.right_image.header.seq, _x.data.right_image.header.stamp.secs, _x.data.right_image.header.stamp.nsecs))
00602       _x = self.data.right_image.header.frame_id
00603       length = len(_x)
00604       if python3 or type(_x) == unicode:
00605         _x = _x.encode('utf-8')
00606         length = len(_x)
00607       buff.write(struct.pack('<I%ss'%length, length, _x))
00608       _x = self
00609       buff.write(_struct_2I.pack(_x.data.right_image.height, _x.data.right_image.width))
00610       _x = self.data.right_image.encoding
00611       length = len(_x)
00612       if python3 or type(_x) == unicode:
00613         _x = _x.encode('utf-8')
00614         length = len(_x)
00615       buff.write(struct.pack('<I%ss'%length, length, _x))
00616       _x = self
00617       buff.write(_struct_BI.pack(_x.data.right_image.is_bigendian, _x.data.right_image.step))
00618       _x = self.data.right_image.data
00619       length = len(_x)
00620       # - if encoded as a list instead, serialize as bytes instead of string
00621       if type(_x) in [list, tuple]:
00622         buff.write(struct.pack('<I%sB'%length, length, *_x))
00623       else:
00624         buff.write(struct.pack('<I%ss'%length, length, _x))
00625       _x = self
00626       buff.write(_struct_3I.pack(_x.data.left_info.header.seq, _x.data.left_info.header.stamp.secs, _x.data.left_info.header.stamp.nsecs))
00627       _x = self.data.left_info.header.frame_id
00628       length = len(_x)
00629       if python3 or type(_x) == unicode:
00630         _x = _x.encode('utf-8')
00631         length = len(_x)
00632       buff.write(struct.pack('<I%ss'%length, length, _x))
00633       _x = self
00634       buff.write(_struct_2I.pack(_x.data.left_info.height, _x.data.left_info.width))
00635       _x = self.data.left_info.distortion_model
00636       length = len(_x)
00637       if python3 or type(_x) == unicode:
00638         _x = _x.encode('utf-8')
00639         length = len(_x)
00640       buff.write(struct.pack('<I%ss'%length, length, _x))
00641       length = len(self.data.left_info.D)
00642       buff.write(_struct_I.pack(length))
00643       pattern = '<%sd'%length
00644       buff.write(struct.pack(pattern, *self.data.left_info.D))
00645       buff.write(_struct_9d.pack(*self.data.left_info.K))
00646       buff.write(_struct_9d.pack(*self.data.left_info.R))
00647       buff.write(_struct_12d.pack(*self.data.left_info.P))
00648       _x = self
00649       buff.write(_struct_6IB3I.pack(_x.data.left_info.binning_x, _x.data.left_info.binning_y, _x.data.left_info.roi.x_offset, _x.data.left_info.roi.y_offset, _x.data.left_info.roi.height, _x.data.left_info.roi.width, _x.data.left_info.roi.do_rectify, _x.data.right_info.header.seq, _x.data.right_info.header.stamp.secs, _x.data.right_info.header.stamp.nsecs))
00650       _x = self.data.right_info.header.frame_id
00651       length = len(_x)
00652       if python3 or type(_x) == unicode:
00653         _x = _x.encode('utf-8')
00654         length = len(_x)
00655       buff.write(struct.pack('<I%ss'%length, length, _x))
00656       _x = self
00657       buff.write(_struct_2I.pack(_x.data.right_info.height, _x.data.right_info.width))
00658       _x = self.data.right_info.distortion_model
00659       length = len(_x)
00660       if python3 or type(_x) == unicode:
00661         _x = _x.encode('utf-8')
00662         length = len(_x)
00663       buff.write(struct.pack('<I%ss'%length, length, _x))
00664       length = len(self.data.right_info.D)
00665       buff.write(_struct_I.pack(length))
00666       pattern = '<%sd'%length
00667       buff.write(struct.pack(pattern, *self.data.right_info.D))
00668       buff.write(_struct_9d.pack(*self.data.right_info.K))
00669       buff.write(_struct_9d.pack(*self.data.right_info.R))
00670       buff.write(_struct_12d.pack(*self.data.right_info.P))
00671       _x = self
00672       buff.write(_struct_6IB3I.pack(_x.data.right_info.binning_x, _x.data.right_info.binning_y, _x.data.right_info.roi.x_offset, _x.data.right_info.roi.y_offset, _x.data.right_info.roi.height, _x.data.right_info.roi.width, _x.data.right_info.roi.do_rectify, _x.data.pixel_indices.header.seq, _x.data.pixel_indices.header.stamp.secs, _x.data.pixel_indices.header.stamp.nsecs))
00673       _x = self.data.pixel_indices.header.frame_id
00674       length = len(_x)
00675       if python3 or type(_x) == unicode:
00676         _x = _x.encode('utf-8')
00677         length = len(_x)
00678       buff.write(struct.pack('<I%ss'%length, length, _x))
00679       length = len(self.data.pixel_indices.indices)
00680       buff.write(_struct_I.pack(length))
00681       pattern = '<%si'%length
00682       buff.write(struct.pack(pattern, *self.data.pixel_indices.indices))
00683       _x = self
00684       buff.write(_struct_3I.pack(_x.data.point_cloud.header.seq, _x.data.point_cloud.header.stamp.secs, _x.data.point_cloud.header.stamp.nsecs))
00685       _x = self.data.point_cloud.header.frame_id
00686       length = len(_x)
00687       if python3 or type(_x) == unicode:
00688         _x = _x.encode('utf-8')
00689         length = len(_x)
00690       buff.write(struct.pack('<I%ss'%length, length, _x))
00691       _x = self
00692       buff.write(_struct_2I.pack(_x.data.point_cloud.height, _x.data.point_cloud.width))
00693       length = len(self.data.point_cloud.fields)
00694       buff.write(_struct_I.pack(length))
00695       for val1 in self.data.point_cloud.fields:
00696         _x = val1.name
00697         length = len(_x)
00698         if python3 or type(_x) == unicode:
00699           _x = _x.encode('utf-8')
00700           length = len(_x)
00701         buff.write(struct.pack('<I%ss'%length, length, _x))
00702         _x = val1
00703         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00704       _x = self
00705       buff.write(_struct_B2I.pack(_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step))
00706       _x = self.data.point_cloud.data
00707       length = len(_x)
00708       # - if encoded as a list instead, serialize as bytes instead of string
00709       if type(_x) in [list, tuple]:
00710         buff.write(struct.pack('<I%sB'%length, length, *_x))
00711       else:
00712         buff.write(struct.pack('<I%ss'%length, length, _x))
00713       buff.write(_struct_B.pack(self.data.point_cloud.is_dense))
00714     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00715     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00716 
00717   def deserialize(self, str):
00718     """
00719     unpack serialized message in str into this message instance
00720     :param str: byte array of serialized message, ``str``
00721     """
00722     try:
00723       if self.data is None:
00724         self.data = cr_capture.msg.RawCloudData()
00725       end = 0
00726       _x = self
00727       start = end
00728       end += 12
00729       (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00730       start = end
00731       end += 4
00732       (length,) = _struct_I.unpack(str[start:end])
00733       start = end
00734       end += length
00735       if python3:
00736         self.data.header.frame_id = str[start:end].decode('utf-8')
00737       else:
00738         self.data.header.frame_id = str[start:end]
00739       _x = self
00740       start = end
00741       end += 12
00742       (_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00743       start = end
00744       end += 4
00745       (length,) = _struct_I.unpack(str[start:end])
00746       start = end
00747       end += length
00748       if python3:
00749         self.data.intensity.header.frame_id = str[start:end].decode('utf-8')
00750       else:
00751         self.data.intensity.header.frame_id = str[start:end]
00752       _x = self
00753       start = end
00754       end += 8
00755       (_x.data.intensity.height, _x.data.intensity.width,) = _struct_2I.unpack(str[start:end])
00756       start = end
00757       end += 4
00758       (length,) = _struct_I.unpack(str[start:end])
00759       start = end
00760       end += length
00761       if python3:
00762         self.data.intensity.encoding = str[start:end].decode('utf-8')
00763       else:
00764         self.data.intensity.encoding = str[start:end]
00765       _x = self
00766       start = end
00767       end += 5
00768       (_x.data.intensity.is_bigendian, _x.data.intensity.step,) = _struct_BI.unpack(str[start:end])
00769       start = end
00770       end += 4
00771       (length,) = _struct_I.unpack(str[start:end])
00772       start = end
00773       end += length
00774       self.data.intensity.data = str[start:end]
00775       _x = self
00776       start = end
00777       end += 12
00778       (_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00779       start = end
00780       end += 4
00781       (length,) = _struct_I.unpack(str[start:end])
00782       start = end
00783       end += length
00784       if python3:
00785         self.data.confidence.header.frame_id = str[start:end].decode('utf-8')
00786       else:
00787         self.data.confidence.header.frame_id = str[start:end]
00788       _x = self
00789       start = end
00790       end += 8
00791       (_x.data.confidence.height, _x.data.confidence.width,) = _struct_2I.unpack(str[start:end])
00792       start = end
00793       end += 4
00794       (length,) = _struct_I.unpack(str[start:end])
00795       start = end
00796       end += length
00797       if python3:
00798         self.data.confidence.encoding = str[start:end].decode('utf-8')
00799       else:
00800         self.data.confidence.encoding = str[start:end]
00801       _x = self
00802       start = end
00803       end += 5
00804       (_x.data.confidence.is_bigendian, _x.data.confidence.step,) = _struct_BI.unpack(str[start:end])
00805       start = end
00806       end += 4
00807       (length,) = _struct_I.unpack(str[start:end])
00808       start = end
00809       end += length
00810       self.data.confidence.data = str[start:end]
00811       _x = self
00812       start = end
00813       end += 12
00814       (_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00815       start = end
00816       end += 4
00817       (length,) = _struct_I.unpack(str[start:end])
00818       start = end
00819       end += length
00820       if python3:
00821         self.data.depth.header.frame_id = str[start:end].decode('utf-8')
00822       else:
00823         self.data.depth.header.frame_id = str[start:end]
00824       _x = self
00825       start = end
00826       end += 8
00827       (_x.data.depth.height, _x.data.depth.width,) = _struct_2I.unpack(str[start:end])
00828       start = end
00829       end += 4
00830       (length,) = _struct_I.unpack(str[start:end])
00831       start = end
00832       end += length
00833       if python3:
00834         self.data.depth.encoding = str[start:end].decode('utf-8')
00835       else:
00836         self.data.depth.encoding = str[start:end]
00837       _x = self
00838       start = end
00839       end += 5
00840       (_x.data.depth.is_bigendian, _x.data.depth.step,) = _struct_BI.unpack(str[start:end])
00841       start = end
00842       end += 4
00843       (length,) = _struct_I.unpack(str[start:end])
00844       start = end
00845       end += length
00846       self.data.depth.data = str[start:end]
00847       _x = self
00848       start = end
00849       end += 12
00850       (_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00851       start = end
00852       end += 4
00853       (length,) = _struct_I.unpack(str[start:end])
00854       start = end
00855       end += length
00856       if python3:
00857         self.data.depth16.header.frame_id = str[start:end].decode('utf-8')
00858       else:
00859         self.data.depth16.header.frame_id = str[start:end]
00860       _x = self
00861       start = end
00862       end += 8
00863       (_x.data.depth16.height, _x.data.depth16.width,) = _struct_2I.unpack(str[start:end])
00864       start = end
00865       end += 4
00866       (length,) = _struct_I.unpack(str[start:end])
00867       start = end
00868       end += length
00869       if python3:
00870         self.data.depth16.encoding = str[start:end].decode('utf-8')
00871       else:
00872         self.data.depth16.encoding = str[start:end]
00873       _x = self
00874       start = end
00875       end += 5
00876       (_x.data.depth16.is_bigendian, _x.data.depth16.step,) = _struct_BI.unpack(str[start:end])
00877       start = end
00878       end += 4
00879       (length,) = _struct_I.unpack(str[start:end])
00880       start = end
00881       end += length
00882       self.data.depth16.data = str[start:end]
00883       _x = self
00884       start = end
00885       end += 12
00886       (_x.data.range_info.header.seq, _x.data.range_info.header.stamp.secs, _x.data.range_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00887       start = end
00888       end += 4
00889       (length,) = _struct_I.unpack(str[start:end])
00890       start = end
00891       end += length
00892       if python3:
00893         self.data.range_info.header.frame_id = str[start:end].decode('utf-8')
00894       else:
00895         self.data.range_info.header.frame_id = str[start:end]
00896       _x = self
00897       start = end
00898       end += 8
00899       (_x.data.range_info.height, _x.data.range_info.width,) = _struct_2I.unpack(str[start:end])
00900       start = end
00901       end += 4
00902       (length,) = _struct_I.unpack(str[start:end])
00903       start = end
00904       end += length
00905       if python3:
00906         self.data.range_info.distortion_model = str[start:end].decode('utf-8')
00907       else:
00908         self.data.range_info.distortion_model = str[start:end]
00909       start = end
00910       end += 4
00911       (length,) = _struct_I.unpack(str[start:end])
00912       pattern = '<%sd'%length
00913       start = end
00914       end += struct.calcsize(pattern)
00915       self.data.range_info.D = struct.unpack(pattern, str[start:end])
00916       start = end
00917       end += 72
00918       self.data.range_info.K = _struct_9d.unpack(str[start:end])
00919       start = end
00920       end += 72
00921       self.data.range_info.R = _struct_9d.unpack(str[start:end])
00922       start = end
00923       end += 96
00924       self.data.range_info.P = _struct_12d.unpack(str[start:end])
00925       _x = self
00926       start = end
00927       end += 37
00928       (_x.data.range_info.binning_x, _x.data.range_info.binning_y, _x.data.range_info.roi.x_offset, _x.data.range_info.roi.y_offset, _x.data.range_info.roi.height, _x.data.range_info.roi.width, _x.data.range_info.roi.do_rectify, _x.data.left_image.header.seq, _x.data.left_image.header.stamp.secs, _x.data.left_image.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
00929       self.data.range_info.roi.do_rectify = bool(self.data.range_info.roi.do_rectify)
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.data.left_image.header.frame_id = str[start:end].decode('utf-8')
00937       else:
00938         self.data.left_image.header.frame_id = str[start:end]
00939       _x = self
00940       start = end
00941       end += 8
00942       (_x.data.left_image.height, _x.data.left_image.width,) = _struct_2I.unpack(str[start:end])
00943       start = end
00944       end += 4
00945       (length,) = _struct_I.unpack(str[start:end])
00946       start = end
00947       end += length
00948       if python3:
00949         self.data.left_image.encoding = str[start:end].decode('utf-8')
00950       else:
00951         self.data.left_image.encoding = str[start:end]
00952       _x = self
00953       start = end
00954       end += 5
00955       (_x.data.left_image.is_bigendian, _x.data.left_image.step,) = _struct_BI.unpack(str[start:end])
00956       start = end
00957       end += 4
00958       (length,) = _struct_I.unpack(str[start:end])
00959       start = end
00960       end += length
00961       self.data.left_image.data = str[start:end]
00962       _x = self
00963       start = end
00964       end += 12
00965       (_x.data.right_image.header.seq, _x.data.right_image.header.stamp.secs, _x.data.right_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00966       start = end
00967       end += 4
00968       (length,) = _struct_I.unpack(str[start:end])
00969       start = end
00970       end += length
00971       if python3:
00972         self.data.right_image.header.frame_id = str[start:end].decode('utf-8')
00973       else:
00974         self.data.right_image.header.frame_id = str[start:end]
00975       _x = self
00976       start = end
00977       end += 8
00978       (_x.data.right_image.height, _x.data.right_image.width,) = _struct_2I.unpack(str[start:end])
00979       start = end
00980       end += 4
00981       (length,) = _struct_I.unpack(str[start:end])
00982       start = end
00983       end += length
00984       if python3:
00985         self.data.right_image.encoding = str[start:end].decode('utf-8')
00986       else:
00987         self.data.right_image.encoding = str[start:end]
00988       _x = self
00989       start = end
00990       end += 5
00991       (_x.data.right_image.is_bigendian, _x.data.right_image.step,) = _struct_BI.unpack(str[start:end])
00992       start = end
00993       end += 4
00994       (length,) = _struct_I.unpack(str[start:end])
00995       start = end
00996       end += length
00997       self.data.right_image.data = str[start:end]
00998       _x = self
00999       start = end
01000       end += 12
01001       (_x.data.left_info.header.seq, _x.data.left_info.header.stamp.secs, _x.data.left_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01002       start = end
01003       end += 4
01004       (length,) = _struct_I.unpack(str[start:end])
01005       start = end
01006       end += length
01007       if python3:
01008         self.data.left_info.header.frame_id = str[start:end].decode('utf-8')
01009       else:
01010         self.data.left_info.header.frame_id = str[start:end]
01011       _x = self
01012       start = end
01013       end += 8
01014       (_x.data.left_info.height, _x.data.left_info.width,) = _struct_2I.unpack(str[start:end])
01015       start = end
01016       end += 4
01017       (length,) = _struct_I.unpack(str[start:end])
01018       start = end
01019       end += length
01020       if python3:
01021         self.data.left_info.distortion_model = str[start:end].decode('utf-8')
01022       else:
01023         self.data.left_info.distortion_model = str[start:end]
01024       start = end
01025       end += 4
01026       (length,) = _struct_I.unpack(str[start:end])
01027       pattern = '<%sd'%length
01028       start = end
01029       end += struct.calcsize(pattern)
01030       self.data.left_info.D = struct.unpack(pattern, str[start:end])
01031       start = end
01032       end += 72
01033       self.data.left_info.K = _struct_9d.unpack(str[start:end])
01034       start = end
01035       end += 72
01036       self.data.left_info.R = _struct_9d.unpack(str[start:end])
01037       start = end
01038       end += 96
01039       self.data.left_info.P = _struct_12d.unpack(str[start:end])
01040       _x = self
01041       start = end
01042       end += 37
01043       (_x.data.left_info.binning_x, _x.data.left_info.binning_y, _x.data.left_info.roi.x_offset, _x.data.left_info.roi.y_offset, _x.data.left_info.roi.height, _x.data.left_info.roi.width, _x.data.left_info.roi.do_rectify, _x.data.right_info.header.seq, _x.data.right_info.header.stamp.secs, _x.data.right_info.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01044       self.data.left_info.roi.do_rectify = bool(self.data.left_info.roi.do_rectify)
01045       start = end
01046       end += 4
01047       (length,) = _struct_I.unpack(str[start:end])
01048       start = end
01049       end += length
01050       if python3:
01051         self.data.right_info.header.frame_id = str[start:end].decode('utf-8')
01052       else:
01053         self.data.right_info.header.frame_id = str[start:end]
01054       _x = self
01055       start = end
01056       end += 8
01057       (_x.data.right_info.height, _x.data.right_info.width,) = _struct_2I.unpack(str[start:end])
01058       start = end
01059       end += 4
01060       (length,) = _struct_I.unpack(str[start:end])
01061       start = end
01062       end += length
01063       if python3:
01064         self.data.right_info.distortion_model = str[start:end].decode('utf-8')
01065       else:
01066         self.data.right_info.distortion_model = str[start:end]
01067       start = end
01068       end += 4
01069       (length,) = _struct_I.unpack(str[start:end])
01070       pattern = '<%sd'%length
01071       start = end
01072       end += struct.calcsize(pattern)
01073       self.data.right_info.D = struct.unpack(pattern, str[start:end])
01074       start = end
01075       end += 72
01076       self.data.right_info.K = _struct_9d.unpack(str[start:end])
01077       start = end
01078       end += 72
01079       self.data.right_info.R = _struct_9d.unpack(str[start:end])
01080       start = end
01081       end += 96
01082       self.data.right_info.P = _struct_12d.unpack(str[start:end])
01083       _x = self
01084       start = end
01085       end += 37
01086       (_x.data.right_info.binning_x, _x.data.right_info.binning_y, _x.data.right_info.roi.x_offset, _x.data.right_info.roi.y_offset, _x.data.right_info.roi.height, _x.data.right_info.roi.width, _x.data.right_info.roi.do_rectify, _x.data.pixel_indices.header.seq, _x.data.pixel_indices.header.stamp.secs, _x.data.pixel_indices.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01087       self.data.right_info.roi.do_rectify = bool(self.data.right_info.roi.do_rectify)
01088       start = end
01089       end += 4
01090       (length,) = _struct_I.unpack(str[start:end])
01091       start = end
01092       end += length
01093       if python3:
01094         self.data.pixel_indices.header.frame_id = str[start:end].decode('utf-8')
01095       else:
01096         self.data.pixel_indices.header.frame_id = str[start:end]
01097       start = end
01098       end += 4
01099       (length,) = _struct_I.unpack(str[start:end])
01100       pattern = '<%si'%length
01101       start = end
01102       end += struct.calcsize(pattern)
01103       self.data.pixel_indices.indices = struct.unpack(pattern, str[start:end])
01104       _x = self
01105       start = end
01106       end += 12
01107       (_x.data.point_cloud.header.seq, _x.data.point_cloud.header.stamp.secs, _x.data.point_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01108       start = end
01109       end += 4
01110       (length,) = _struct_I.unpack(str[start:end])
01111       start = end
01112       end += length
01113       if python3:
01114         self.data.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01115       else:
01116         self.data.point_cloud.header.frame_id = str[start:end]
01117       _x = self
01118       start = end
01119       end += 8
01120       (_x.data.point_cloud.height, _x.data.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01121       start = end
01122       end += 4
01123       (length,) = _struct_I.unpack(str[start:end])
01124       self.data.point_cloud.fields = []
01125       for i in range(0, length):
01126         val1 = sensor_msgs.msg.PointField()
01127         start = end
01128         end += 4
01129         (length,) = _struct_I.unpack(str[start:end])
01130         start = end
01131         end += length
01132         if python3:
01133           val1.name = str[start:end].decode('utf-8')
01134         else:
01135           val1.name = str[start:end]
01136         _x = val1
01137         start = end
01138         end += 9
01139         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01140         self.data.point_cloud.fields.append(val1)
01141       _x = self
01142       start = end
01143       end += 9
01144       (_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01145       self.data.point_cloud.is_bigendian = bool(self.data.point_cloud.is_bigendian)
01146       start = end
01147       end += 4
01148       (length,) = _struct_I.unpack(str[start:end])
01149       start = end
01150       end += length
01151       self.data.point_cloud.data = str[start:end]
01152       start = end
01153       end += 1
01154       (self.data.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
01155       self.data.point_cloud.is_dense = bool(self.data.point_cloud.is_dense)
01156       return self
01157     except struct.error as e:
01158       raise genpy.DeserializationError(e) #most likely buffer underfill
01159 
01160 
01161   def serialize_numpy(self, buff, numpy):
01162     """
01163     serialize message with numpy array types into buffer
01164     :param buff: buffer, ``StringIO``
01165     :param numpy: numpy python module
01166     """
01167     try:
01168       _x = self
01169       buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
01170       _x = self.data.header.frame_id
01171       length = len(_x)
01172       if python3 or type(_x) == unicode:
01173         _x = _x.encode('utf-8')
01174         length = len(_x)
01175       buff.write(struct.pack('<I%ss'%length, length, _x))
01176       _x = self
01177       buff.write(_struct_3I.pack(_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs))
01178       _x = self.data.intensity.header.frame_id
01179       length = len(_x)
01180       if python3 or type(_x) == unicode:
01181         _x = _x.encode('utf-8')
01182         length = len(_x)
01183       buff.write(struct.pack('<I%ss'%length, length, _x))
01184       _x = self
01185       buff.write(_struct_2I.pack(_x.data.intensity.height, _x.data.intensity.width))
01186       _x = self.data.intensity.encoding
01187       length = len(_x)
01188       if python3 or type(_x) == unicode:
01189         _x = _x.encode('utf-8')
01190         length = len(_x)
01191       buff.write(struct.pack('<I%ss'%length, length, _x))
01192       _x = self
01193       buff.write(_struct_BI.pack(_x.data.intensity.is_bigendian, _x.data.intensity.step))
01194       _x = self.data.intensity.data
01195       length = len(_x)
01196       # - if encoded as a list instead, serialize as bytes instead of string
01197       if type(_x) in [list, tuple]:
01198         buff.write(struct.pack('<I%sB'%length, length, *_x))
01199       else:
01200         buff.write(struct.pack('<I%ss'%length, length, _x))
01201       _x = self
01202       buff.write(_struct_3I.pack(_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs))
01203       _x = self.data.confidence.header.frame_id
01204       length = len(_x)
01205       if python3 or type(_x) == unicode:
01206         _x = _x.encode('utf-8')
01207         length = len(_x)
01208       buff.write(struct.pack('<I%ss'%length, length, _x))
01209       _x = self
01210       buff.write(_struct_2I.pack(_x.data.confidence.height, _x.data.confidence.width))
01211       _x = self.data.confidence.encoding
01212       length = len(_x)
01213       if python3 or type(_x) == unicode:
01214         _x = _x.encode('utf-8')
01215         length = len(_x)
01216       buff.write(struct.pack('<I%ss'%length, length, _x))
01217       _x = self
01218       buff.write(_struct_BI.pack(_x.data.confidence.is_bigendian, _x.data.confidence.step))
01219       _x = self.data.confidence.data
01220       length = len(_x)
01221       # - if encoded as a list instead, serialize as bytes instead of string
01222       if type(_x) in [list, tuple]:
01223         buff.write(struct.pack('<I%sB'%length, length, *_x))
01224       else:
01225         buff.write(struct.pack('<I%ss'%length, length, _x))
01226       _x = self
01227       buff.write(_struct_3I.pack(_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs))
01228       _x = self.data.depth.header.frame_id
01229       length = len(_x)
01230       if python3 or type(_x) == unicode:
01231         _x = _x.encode('utf-8')
01232         length = len(_x)
01233       buff.write(struct.pack('<I%ss'%length, length, _x))
01234       _x = self
01235       buff.write(_struct_2I.pack(_x.data.depth.height, _x.data.depth.width))
01236       _x = self.data.depth.encoding
01237       length = len(_x)
01238       if python3 or type(_x) == unicode:
01239         _x = _x.encode('utf-8')
01240         length = len(_x)
01241       buff.write(struct.pack('<I%ss'%length, length, _x))
01242       _x = self
01243       buff.write(_struct_BI.pack(_x.data.depth.is_bigendian, _x.data.depth.step))
01244       _x = self.data.depth.data
01245       length = len(_x)
01246       # - if encoded as a list instead, serialize as bytes instead of string
01247       if type(_x) in [list, tuple]:
01248         buff.write(struct.pack('<I%sB'%length, length, *_x))
01249       else:
01250         buff.write(struct.pack('<I%ss'%length, length, _x))
01251       _x = self
01252       buff.write(_struct_3I.pack(_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs))
01253       _x = self.data.depth16.header.frame_id
01254       length = len(_x)
01255       if python3 or type(_x) == unicode:
01256         _x = _x.encode('utf-8')
01257         length = len(_x)
01258       buff.write(struct.pack('<I%ss'%length, length, _x))
01259       _x = self
01260       buff.write(_struct_2I.pack(_x.data.depth16.height, _x.data.depth16.width))
01261       _x = self.data.depth16.encoding
01262       length = len(_x)
01263       if python3 or type(_x) == unicode:
01264         _x = _x.encode('utf-8')
01265         length = len(_x)
01266       buff.write(struct.pack('<I%ss'%length, length, _x))
01267       _x = self
01268       buff.write(_struct_BI.pack(_x.data.depth16.is_bigendian, _x.data.depth16.step))
01269       _x = self.data.depth16.data
01270       length = len(_x)
01271       # - if encoded as a list instead, serialize as bytes instead of string
01272       if type(_x) in [list, tuple]:
01273         buff.write(struct.pack('<I%sB'%length, length, *_x))
01274       else:
01275         buff.write(struct.pack('<I%ss'%length, length, _x))
01276       _x = self
01277       buff.write(_struct_3I.pack(_x.data.range_info.header.seq, _x.data.range_info.header.stamp.secs, _x.data.range_info.header.stamp.nsecs))
01278       _x = self.data.range_info.header.frame_id
01279       length = len(_x)
01280       if python3 or type(_x) == unicode:
01281         _x = _x.encode('utf-8')
01282         length = len(_x)
01283       buff.write(struct.pack('<I%ss'%length, length, _x))
01284       _x = self
01285       buff.write(_struct_2I.pack(_x.data.range_info.height, _x.data.range_info.width))
01286       _x = self.data.range_info.distortion_model
01287       length = len(_x)
01288       if python3 or type(_x) == unicode:
01289         _x = _x.encode('utf-8')
01290         length = len(_x)
01291       buff.write(struct.pack('<I%ss'%length, length, _x))
01292       length = len(self.data.range_info.D)
01293       buff.write(_struct_I.pack(length))
01294       pattern = '<%sd'%length
01295       buff.write(self.data.range_info.D.tostring())
01296       buff.write(self.data.range_info.K.tostring())
01297       buff.write(self.data.range_info.R.tostring())
01298       buff.write(self.data.range_info.P.tostring())
01299       _x = self
01300       buff.write(_struct_6IB3I.pack(_x.data.range_info.binning_x, _x.data.range_info.binning_y, _x.data.range_info.roi.x_offset, _x.data.range_info.roi.y_offset, _x.data.range_info.roi.height, _x.data.range_info.roi.width, _x.data.range_info.roi.do_rectify, _x.data.left_image.header.seq, _x.data.left_image.header.stamp.secs, _x.data.left_image.header.stamp.nsecs))
01301       _x = self.data.left_image.header.frame_id
01302       length = len(_x)
01303       if python3 or type(_x) == unicode:
01304         _x = _x.encode('utf-8')
01305         length = len(_x)
01306       buff.write(struct.pack('<I%ss'%length, length, _x))
01307       _x = self
01308       buff.write(_struct_2I.pack(_x.data.left_image.height, _x.data.left_image.width))
01309       _x = self.data.left_image.encoding
01310       length = len(_x)
01311       if python3 or type(_x) == unicode:
01312         _x = _x.encode('utf-8')
01313         length = len(_x)
01314       buff.write(struct.pack('<I%ss'%length, length, _x))
01315       _x = self
01316       buff.write(_struct_BI.pack(_x.data.left_image.is_bigendian, _x.data.left_image.step))
01317       _x = self.data.left_image.data
01318       length = len(_x)
01319       # - if encoded as a list instead, serialize as bytes instead of string
01320       if type(_x) in [list, tuple]:
01321         buff.write(struct.pack('<I%sB'%length, length, *_x))
01322       else:
01323         buff.write(struct.pack('<I%ss'%length, length, _x))
01324       _x = self
01325       buff.write(_struct_3I.pack(_x.data.right_image.header.seq, _x.data.right_image.header.stamp.secs, _x.data.right_image.header.stamp.nsecs))
01326       _x = self.data.right_image.header.frame_id
01327       length = len(_x)
01328       if python3 or type(_x) == unicode:
01329         _x = _x.encode('utf-8')
01330         length = len(_x)
01331       buff.write(struct.pack('<I%ss'%length, length, _x))
01332       _x = self
01333       buff.write(_struct_2I.pack(_x.data.right_image.height, _x.data.right_image.width))
01334       _x = self.data.right_image.encoding
01335       length = len(_x)
01336       if python3 or type(_x) == unicode:
01337         _x = _x.encode('utf-8')
01338         length = len(_x)
01339       buff.write(struct.pack('<I%ss'%length, length, _x))
01340       _x = self
01341       buff.write(_struct_BI.pack(_x.data.right_image.is_bigendian, _x.data.right_image.step))
01342       _x = self.data.right_image.data
01343       length = len(_x)
01344       # - if encoded as a list instead, serialize as bytes instead of string
01345       if type(_x) in [list, tuple]:
01346         buff.write(struct.pack('<I%sB'%length, length, *_x))
01347       else:
01348         buff.write(struct.pack('<I%ss'%length, length, _x))
01349       _x = self
01350       buff.write(_struct_3I.pack(_x.data.left_info.header.seq, _x.data.left_info.header.stamp.secs, _x.data.left_info.header.stamp.nsecs))
01351       _x = self.data.left_info.header.frame_id
01352       length = len(_x)
01353       if python3 or type(_x) == unicode:
01354         _x = _x.encode('utf-8')
01355         length = len(_x)
01356       buff.write(struct.pack('<I%ss'%length, length, _x))
01357       _x = self
01358       buff.write(_struct_2I.pack(_x.data.left_info.height, _x.data.left_info.width))
01359       _x = self.data.left_info.distortion_model
01360       length = len(_x)
01361       if python3 or type(_x) == unicode:
01362         _x = _x.encode('utf-8')
01363         length = len(_x)
01364       buff.write(struct.pack('<I%ss'%length, length, _x))
01365       length = len(self.data.left_info.D)
01366       buff.write(_struct_I.pack(length))
01367       pattern = '<%sd'%length
01368       buff.write(self.data.left_info.D.tostring())
01369       buff.write(self.data.left_info.K.tostring())
01370       buff.write(self.data.left_info.R.tostring())
01371       buff.write(self.data.left_info.P.tostring())
01372       _x = self
01373       buff.write(_struct_6IB3I.pack(_x.data.left_info.binning_x, _x.data.left_info.binning_y, _x.data.left_info.roi.x_offset, _x.data.left_info.roi.y_offset, _x.data.left_info.roi.height, _x.data.left_info.roi.width, _x.data.left_info.roi.do_rectify, _x.data.right_info.header.seq, _x.data.right_info.header.stamp.secs, _x.data.right_info.header.stamp.nsecs))
01374       _x = self.data.right_info.header.frame_id
01375       length = len(_x)
01376       if python3 or type(_x) == unicode:
01377         _x = _x.encode('utf-8')
01378         length = len(_x)
01379       buff.write(struct.pack('<I%ss'%length, length, _x))
01380       _x = self
01381       buff.write(_struct_2I.pack(_x.data.right_info.height, _x.data.right_info.width))
01382       _x = self.data.right_info.distortion_model
01383       length = len(_x)
01384       if python3 or type(_x) == unicode:
01385         _x = _x.encode('utf-8')
01386         length = len(_x)
01387       buff.write(struct.pack('<I%ss'%length, length, _x))
01388       length = len(self.data.right_info.D)
01389       buff.write(_struct_I.pack(length))
01390       pattern = '<%sd'%length
01391       buff.write(self.data.right_info.D.tostring())
01392       buff.write(self.data.right_info.K.tostring())
01393       buff.write(self.data.right_info.R.tostring())
01394       buff.write(self.data.right_info.P.tostring())
01395       _x = self
01396       buff.write(_struct_6IB3I.pack(_x.data.right_info.binning_x, _x.data.right_info.binning_y, _x.data.right_info.roi.x_offset, _x.data.right_info.roi.y_offset, _x.data.right_info.roi.height, _x.data.right_info.roi.width, _x.data.right_info.roi.do_rectify, _x.data.pixel_indices.header.seq, _x.data.pixel_indices.header.stamp.secs, _x.data.pixel_indices.header.stamp.nsecs))
01397       _x = self.data.pixel_indices.header.frame_id
01398       length = len(_x)
01399       if python3 or type(_x) == unicode:
01400         _x = _x.encode('utf-8')
01401         length = len(_x)
01402       buff.write(struct.pack('<I%ss'%length, length, _x))
01403       length = len(self.data.pixel_indices.indices)
01404       buff.write(_struct_I.pack(length))
01405       pattern = '<%si'%length
01406       buff.write(self.data.pixel_indices.indices.tostring())
01407       _x = self
01408       buff.write(_struct_3I.pack(_x.data.point_cloud.header.seq, _x.data.point_cloud.header.stamp.secs, _x.data.point_cloud.header.stamp.nsecs))
01409       _x = self.data.point_cloud.header.frame_id
01410       length = len(_x)
01411       if python3 or type(_x) == unicode:
01412         _x = _x.encode('utf-8')
01413         length = len(_x)
01414       buff.write(struct.pack('<I%ss'%length, length, _x))
01415       _x = self
01416       buff.write(_struct_2I.pack(_x.data.point_cloud.height, _x.data.point_cloud.width))
01417       length = len(self.data.point_cloud.fields)
01418       buff.write(_struct_I.pack(length))
01419       for val1 in self.data.point_cloud.fields:
01420         _x = val1.name
01421         length = len(_x)
01422         if python3 or type(_x) == unicode:
01423           _x = _x.encode('utf-8')
01424           length = len(_x)
01425         buff.write(struct.pack('<I%ss'%length, length, _x))
01426         _x = val1
01427         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01428       _x = self
01429       buff.write(_struct_B2I.pack(_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step))
01430       _x = self.data.point_cloud.data
01431       length = len(_x)
01432       # - if encoded as a list instead, serialize as bytes instead of string
01433       if type(_x) in [list, tuple]:
01434         buff.write(struct.pack('<I%sB'%length, length, *_x))
01435       else:
01436         buff.write(struct.pack('<I%ss'%length, length, _x))
01437       buff.write(_struct_B.pack(self.data.point_cloud.is_dense))
01438     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
01439     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
01440 
01441   def deserialize_numpy(self, str, numpy):
01442     """
01443     unpack serialized message in str into this message instance using numpy for array types
01444     :param str: byte array of serialized message, ``str``
01445     :param numpy: numpy python module
01446     """
01447     try:
01448       if self.data is None:
01449         self.data = cr_capture.msg.RawCloudData()
01450       end = 0
01451       _x = self
01452       start = end
01453       end += 12
01454       (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01455       start = end
01456       end += 4
01457       (length,) = _struct_I.unpack(str[start:end])
01458       start = end
01459       end += length
01460       if python3:
01461         self.data.header.frame_id = str[start:end].decode('utf-8')
01462       else:
01463         self.data.header.frame_id = str[start:end]
01464       _x = self
01465       start = end
01466       end += 12
01467       (_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01468       start = end
01469       end += 4
01470       (length,) = _struct_I.unpack(str[start:end])
01471       start = end
01472       end += length
01473       if python3:
01474         self.data.intensity.header.frame_id = str[start:end].decode('utf-8')
01475       else:
01476         self.data.intensity.header.frame_id = str[start:end]
01477       _x = self
01478       start = end
01479       end += 8
01480       (_x.data.intensity.height, _x.data.intensity.width,) = _struct_2I.unpack(str[start:end])
01481       start = end
01482       end += 4
01483       (length,) = _struct_I.unpack(str[start:end])
01484       start = end
01485       end += length
01486       if python3:
01487         self.data.intensity.encoding = str[start:end].decode('utf-8')
01488       else:
01489         self.data.intensity.encoding = str[start:end]
01490       _x = self
01491       start = end
01492       end += 5
01493       (_x.data.intensity.is_bigendian, _x.data.intensity.step,) = _struct_BI.unpack(str[start:end])
01494       start = end
01495       end += 4
01496       (length,) = _struct_I.unpack(str[start:end])
01497       start = end
01498       end += length
01499       self.data.intensity.data = str[start:end]
01500       _x = self
01501       start = end
01502       end += 12
01503       (_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01504       start = end
01505       end += 4
01506       (length,) = _struct_I.unpack(str[start:end])
01507       start = end
01508       end += length
01509       if python3:
01510         self.data.confidence.header.frame_id = str[start:end].decode('utf-8')
01511       else:
01512         self.data.confidence.header.frame_id = str[start:end]
01513       _x = self
01514       start = end
01515       end += 8
01516       (_x.data.confidence.height, _x.data.confidence.width,) = _struct_2I.unpack(str[start:end])
01517       start = end
01518       end += 4
01519       (length,) = _struct_I.unpack(str[start:end])
01520       start = end
01521       end += length
01522       if python3:
01523         self.data.confidence.encoding = str[start:end].decode('utf-8')
01524       else:
01525         self.data.confidence.encoding = str[start:end]
01526       _x = self
01527       start = end
01528       end += 5
01529       (_x.data.confidence.is_bigendian, _x.data.confidence.step,) = _struct_BI.unpack(str[start:end])
01530       start = end
01531       end += 4
01532       (length,) = _struct_I.unpack(str[start:end])
01533       start = end
01534       end += length
01535       self.data.confidence.data = str[start:end]
01536       _x = self
01537       start = end
01538       end += 12
01539       (_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01540       start = end
01541       end += 4
01542       (length,) = _struct_I.unpack(str[start:end])
01543       start = end
01544       end += length
01545       if python3:
01546         self.data.depth.header.frame_id = str[start:end].decode('utf-8')
01547       else:
01548         self.data.depth.header.frame_id = str[start:end]
01549       _x = self
01550       start = end
01551       end += 8
01552       (_x.data.depth.height, _x.data.depth.width,) = _struct_2I.unpack(str[start:end])
01553       start = end
01554       end += 4
01555       (length,) = _struct_I.unpack(str[start:end])
01556       start = end
01557       end += length
01558       if python3:
01559         self.data.depth.encoding = str[start:end].decode('utf-8')
01560       else:
01561         self.data.depth.encoding = str[start:end]
01562       _x = self
01563       start = end
01564       end += 5
01565       (_x.data.depth.is_bigendian, _x.data.depth.step,) = _struct_BI.unpack(str[start:end])
01566       start = end
01567       end += 4
01568       (length,) = _struct_I.unpack(str[start:end])
01569       start = end
01570       end += length
01571       self.data.depth.data = str[start:end]
01572       _x = self
01573       start = end
01574       end += 12
01575       (_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01576       start = end
01577       end += 4
01578       (length,) = _struct_I.unpack(str[start:end])
01579       start = end
01580       end += length
01581       if python3:
01582         self.data.depth16.header.frame_id = str[start:end].decode('utf-8')
01583       else:
01584         self.data.depth16.header.frame_id = str[start:end]
01585       _x = self
01586       start = end
01587       end += 8
01588       (_x.data.depth16.height, _x.data.depth16.width,) = _struct_2I.unpack(str[start:end])
01589       start = end
01590       end += 4
01591       (length,) = _struct_I.unpack(str[start:end])
01592       start = end
01593       end += length
01594       if python3:
01595         self.data.depth16.encoding = str[start:end].decode('utf-8')
01596       else:
01597         self.data.depth16.encoding = str[start:end]
01598       _x = self
01599       start = end
01600       end += 5
01601       (_x.data.depth16.is_bigendian, _x.data.depth16.step,) = _struct_BI.unpack(str[start:end])
01602       start = end
01603       end += 4
01604       (length,) = _struct_I.unpack(str[start:end])
01605       start = end
01606       end += length
01607       self.data.depth16.data = str[start:end]
01608       _x = self
01609       start = end
01610       end += 12
01611       (_x.data.range_info.header.seq, _x.data.range_info.header.stamp.secs, _x.data.range_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01612       start = end
01613       end += 4
01614       (length,) = _struct_I.unpack(str[start:end])
01615       start = end
01616       end += length
01617       if python3:
01618         self.data.range_info.header.frame_id = str[start:end].decode('utf-8')
01619       else:
01620         self.data.range_info.header.frame_id = str[start:end]
01621       _x = self
01622       start = end
01623       end += 8
01624       (_x.data.range_info.height, _x.data.range_info.width,) = _struct_2I.unpack(str[start:end])
01625       start = end
01626       end += 4
01627       (length,) = _struct_I.unpack(str[start:end])
01628       start = end
01629       end += length
01630       if python3:
01631         self.data.range_info.distortion_model = str[start:end].decode('utf-8')
01632       else:
01633         self.data.range_info.distortion_model = str[start:end]
01634       start = end
01635       end += 4
01636       (length,) = _struct_I.unpack(str[start:end])
01637       pattern = '<%sd'%length
01638       start = end
01639       end += struct.calcsize(pattern)
01640       self.data.range_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01641       start = end
01642       end += 72
01643       self.data.range_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01644       start = end
01645       end += 72
01646       self.data.range_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01647       start = end
01648       end += 96
01649       self.data.range_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01650       _x = self
01651       start = end
01652       end += 37
01653       (_x.data.range_info.binning_x, _x.data.range_info.binning_y, _x.data.range_info.roi.x_offset, _x.data.range_info.roi.y_offset, _x.data.range_info.roi.height, _x.data.range_info.roi.width, _x.data.range_info.roi.do_rectify, _x.data.left_image.header.seq, _x.data.left_image.header.stamp.secs, _x.data.left_image.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01654       self.data.range_info.roi.do_rectify = bool(self.data.range_info.roi.do_rectify)
01655       start = end
01656       end += 4
01657       (length,) = _struct_I.unpack(str[start:end])
01658       start = end
01659       end += length
01660       if python3:
01661         self.data.left_image.header.frame_id = str[start:end].decode('utf-8')
01662       else:
01663         self.data.left_image.header.frame_id = str[start:end]
01664       _x = self
01665       start = end
01666       end += 8
01667       (_x.data.left_image.height, _x.data.left_image.width,) = _struct_2I.unpack(str[start:end])
01668       start = end
01669       end += 4
01670       (length,) = _struct_I.unpack(str[start:end])
01671       start = end
01672       end += length
01673       if python3:
01674         self.data.left_image.encoding = str[start:end].decode('utf-8')
01675       else:
01676         self.data.left_image.encoding = str[start:end]
01677       _x = self
01678       start = end
01679       end += 5
01680       (_x.data.left_image.is_bigendian, _x.data.left_image.step,) = _struct_BI.unpack(str[start:end])
01681       start = end
01682       end += 4
01683       (length,) = _struct_I.unpack(str[start:end])
01684       start = end
01685       end += length
01686       self.data.left_image.data = str[start:end]
01687       _x = self
01688       start = end
01689       end += 12
01690       (_x.data.right_image.header.seq, _x.data.right_image.header.stamp.secs, _x.data.right_image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01691       start = end
01692       end += 4
01693       (length,) = _struct_I.unpack(str[start:end])
01694       start = end
01695       end += length
01696       if python3:
01697         self.data.right_image.header.frame_id = str[start:end].decode('utf-8')
01698       else:
01699         self.data.right_image.header.frame_id = str[start:end]
01700       _x = self
01701       start = end
01702       end += 8
01703       (_x.data.right_image.height, _x.data.right_image.width,) = _struct_2I.unpack(str[start:end])
01704       start = end
01705       end += 4
01706       (length,) = _struct_I.unpack(str[start:end])
01707       start = end
01708       end += length
01709       if python3:
01710         self.data.right_image.encoding = str[start:end].decode('utf-8')
01711       else:
01712         self.data.right_image.encoding = str[start:end]
01713       _x = self
01714       start = end
01715       end += 5
01716       (_x.data.right_image.is_bigendian, _x.data.right_image.step,) = _struct_BI.unpack(str[start:end])
01717       start = end
01718       end += 4
01719       (length,) = _struct_I.unpack(str[start:end])
01720       start = end
01721       end += length
01722       self.data.right_image.data = str[start:end]
01723       _x = self
01724       start = end
01725       end += 12
01726       (_x.data.left_info.header.seq, _x.data.left_info.header.stamp.secs, _x.data.left_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01727       start = end
01728       end += 4
01729       (length,) = _struct_I.unpack(str[start:end])
01730       start = end
01731       end += length
01732       if python3:
01733         self.data.left_info.header.frame_id = str[start:end].decode('utf-8')
01734       else:
01735         self.data.left_info.header.frame_id = str[start:end]
01736       _x = self
01737       start = end
01738       end += 8
01739       (_x.data.left_info.height, _x.data.left_info.width,) = _struct_2I.unpack(str[start:end])
01740       start = end
01741       end += 4
01742       (length,) = _struct_I.unpack(str[start:end])
01743       start = end
01744       end += length
01745       if python3:
01746         self.data.left_info.distortion_model = str[start:end].decode('utf-8')
01747       else:
01748         self.data.left_info.distortion_model = str[start:end]
01749       start = end
01750       end += 4
01751       (length,) = _struct_I.unpack(str[start:end])
01752       pattern = '<%sd'%length
01753       start = end
01754       end += struct.calcsize(pattern)
01755       self.data.left_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01756       start = end
01757       end += 72
01758       self.data.left_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01759       start = end
01760       end += 72
01761       self.data.left_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01762       start = end
01763       end += 96
01764       self.data.left_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01765       _x = self
01766       start = end
01767       end += 37
01768       (_x.data.left_info.binning_x, _x.data.left_info.binning_y, _x.data.left_info.roi.x_offset, _x.data.left_info.roi.y_offset, _x.data.left_info.roi.height, _x.data.left_info.roi.width, _x.data.left_info.roi.do_rectify, _x.data.right_info.header.seq, _x.data.right_info.header.stamp.secs, _x.data.right_info.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01769       self.data.left_info.roi.do_rectify = bool(self.data.left_info.roi.do_rectify)
01770       start = end
01771       end += 4
01772       (length,) = _struct_I.unpack(str[start:end])
01773       start = end
01774       end += length
01775       if python3:
01776         self.data.right_info.header.frame_id = str[start:end].decode('utf-8')
01777       else:
01778         self.data.right_info.header.frame_id = str[start:end]
01779       _x = self
01780       start = end
01781       end += 8
01782       (_x.data.right_info.height, _x.data.right_info.width,) = _struct_2I.unpack(str[start:end])
01783       start = end
01784       end += 4
01785       (length,) = _struct_I.unpack(str[start:end])
01786       start = end
01787       end += length
01788       if python3:
01789         self.data.right_info.distortion_model = str[start:end].decode('utf-8')
01790       else:
01791         self.data.right_info.distortion_model = str[start:end]
01792       start = end
01793       end += 4
01794       (length,) = _struct_I.unpack(str[start:end])
01795       pattern = '<%sd'%length
01796       start = end
01797       end += struct.calcsize(pattern)
01798       self.data.right_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01799       start = end
01800       end += 72
01801       self.data.right_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01802       start = end
01803       end += 72
01804       self.data.right_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01805       start = end
01806       end += 96
01807       self.data.right_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01808       _x = self
01809       start = end
01810       end += 37
01811       (_x.data.right_info.binning_x, _x.data.right_info.binning_y, _x.data.right_info.roi.x_offset, _x.data.right_info.roi.y_offset, _x.data.right_info.roi.height, _x.data.right_info.roi.width, _x.data.right_info.roi.do_rectify, _x.data.pixel_indices.header.seq, _x.data.pixel_indices.header.stamp.secs, _x.data.pixel_indices.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01812       self.data.right_info.roi.do_rectify = bool(self.data.right_info.roi.do_rectify)
01813       start = end
01814       end += 4
01815       (length,) = _struct_I.unpack(str[start:end])
01816       start = end
01817       end += length
01818       if python3:
01819         self.data.pixel_indices.header.frame_id = str[start:end].decode('utf-8')
01820       else:
01821         self.data.pixel_indices.header.frame_id = str[start:end]
01822       start = end
01823       end += 4
01824       (length,) = _struct_I.unpack(str[start:end])
01825       pattern = '<%si'%length
01826       start = end
01827       end += struct.calcsize(pattern)
01828       self.data.pixel_indices.indices = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01829       _x = self
01830       start = end
01831       end += 12
01832       (_x.data.point_cloud.header.seq, _x.data.point_cloud.header.stamp.secs, _x.data.point_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01833       start = end
01834       end += 4
01835       (length,) = _struct_I.unpack(str[start:end])
01836       start = end
01837       end += length
01838       if python3:
01839         self.data.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01840       else:
01841         self.data.point_cloud.header.frame_id = str[start:end]
01842       _x = self
01843       start = end
01844       end += 8
01845       (_x.data.point_cloud.height, _x.data.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01846       start = end
01847       end += 4
01848       (length,) = _struct_I.unpack(str[start:end])
01849       self.data.point_cloud.fields = []
01850       for i in range(0, length):
01851         val1 = sensor_msgs.msg.PointField()
01852         start = end
01853         end += 4
01854         (length,) = _struct_I.unpack(str[start:end])
01855         start = end
01856         end += length
01857         if python3:
01858           val1.name = str[start:end].decode('utf-8')
01859         else:
01860           val1.name = str[start:end]
01861         _x = val1
01862         start = end
01863         end += 9
01864         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01865         self.data.point_cloud.fields.append(val1)
01866       _x = self
01867       start = end
01868       end += 9
01869       (_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01870       self.data.point_cloud.is_bigendian = bool(self.data.point_cloud.is_bigendian)
01871       start = end
01872       end += 4
01873       (length,) = _struct_I.unpack(str[start:end])
01874       start = end
01875       end += length
01876       self.data.point_cloud.data = str[start:end]
01877       start = end
01878       end += 1
01879       (self.data.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
01880       self.data.point_cloud.is_dense = bool(self.data.point_cloud.is_dense)
01881       return self
01882     except struct.error as e:
01883       raise genpy.DeserializationError(e) #most likely buffer underfill
01884 
01885 _struct_I = genpy.struct_I
01886 _struct_IBI = struct.Struct("<IBI")
01887 _struct_6IB3I = struct.Struct("<6IB3I")
01888 _struct_B = struct.Struct("<B")
01889 _struct_12d = struct.Struct("<12d")
01890 _struct_9d = struct.Struct("<9d")
01891 _struct_BI = struct.Struct("<BI")
01892 _struct_3I = struct.Struct("<3I")
01893 _struct_B2I = struct.Struct("<B2I")
01894 _struct_2I = struct.Struct("<2I")
01895 class PullRawData(object):
01896   _type          = 'cr_capture/PullRawData'
01897   _md5sum = '3abdecedc0af3d50efa293207f37226e'
01898   _request_class  = PullRawDataRequest
01899   _response_class = PullRawDataResponse


cr_capture
Author(s): youhei kakiuchi, JSK
autogenerated on Mon Oct 6 2014 01:16:15