_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(se)
00059     except TypeError as te: self._check_types(te)
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(se)
00089     except TypeError as te: self._check_types(te)
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 src/image_encodings.cpp
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(se)
00715     except TypeError as te: self._check_types(te)
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       if python3:
00775         self.data.intensity.data = str[start:end].decode('utf-8')
00776       else:
00777         self.data.intensity.data = str[start:end]
00778       _x = self
00779       start = end
00780       end += 12
00781       (_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00782       start = end
00783       end += 4
00784       (length,) = _struct_I.unpack(str[start:end])
00785       start = end
00786       end += length
00787       if python3:
00788         self.data.confidence.header.frame_id = str[start:end].decode('utf-8')
00789       else:
00790         self.data.confidence.header.frame_id = str[start:end]
00791       _x = self
00792       start = end
00793       end += 8
00794       (_x.data.confidence.height, _x.data.confidence.width,) = _struct_2I.unpack(str[start:end])
00795       start = end
00796       end += 4
00797       (length,) = _struct_I.unpack(str[start:end])
00798       start = end
00799       end += length
00800       if python3:
00801         self.data.confidence.encoding = str[start:end].decode('utf-8')
00802       else:
00803         self.data.confidence.encoding = str[start:end]
00804       _x = self
00805       start = end
00806       end += 5
00807       (_x.data.confidence.is_bigendian, _x.data.confidence.step,) = _struct_BI.unpack(str[start:end])
00808       start = end
00809       end += 4
00810       (length,) = _struct_I.unpack(str[start:end])
00811       start = end
00812       end += length
00813       if python3:
00814         self.data.confidence.data = str[start:end].decode('utf-8')
00815       else:
00816         self.data.confidence.data = str[start:end]
00817       _x = self
00818       start = end
00819       end += 12
00820       (_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00821       start = end
00822       end += 4
00823       (length,) = _struct_I.unpack(str[start:end])
00824       start = end
00825       end += length
00826       if python3:
00827         self.data.depth.header.frame_id = str[start:end].decode('utf-8')
00828       else:
00829         self.data.depth.header.frame_id = str[start:end]
00830       _x = self
00831       start = end
00832       end += 8
00833       (_x.data.depth.height, _x.data.depth.width,) = _struct_2I.unpack(str[start:end])
00834       start = end
00835       end += 4
00836       (length,) = _struct_I.unpack(str[start:end])
00837       start = end
00838       end += length
00839       if python3:
00840         self.data.depth.encoding = str[start:end].decode('utf-8')
00841       else:
00842         self.data.depth.encoding = str[start:end]
00843       _x = self
00844       start = end
00845       end += 5
00846       (_x.data.depth.is_bigendian, _x.data.depth.step,) = _struct_BI.unpack(str[start:end])
00847       start = end
00848       end += 4
00849       (length,) = _struct_I.unpack(str[start:end])
00850       start = end
00851       end += length
00852       if python3:
00853         self.data.depth.data = str[start:end].decode('utf-8')
00854       else:
00855         self.data.depth.data = str[start:end]
00856       _x = self
00857       start = end
00858       end += 12
00859       (_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00860       start = end
00861       end += 4
00862       (length,) = _struct_I.unpack(str[start:end])
00863       start = end
00864       end += length
00865       if python3:
00866         self.data.depth16.header.frame_id = str[start:end].decode('utf-8')
00867       else:
00868         self.data.depth16.header.frame_id = str[start:end]
00869       _x = self
00870       start = end
00871       end += 8
00872       (_x.data.depth16.height, _x.data.depth16.width,) = _struct_2I.unpack(str[start:end])
00873       start = end
00874       end += 4
00875       (length,) = _struct_I.unpack(str[start:end])
00876       start = end
00877       end += length
00878       if python3:
00879         self.data.depth16.encoding = str[start:end].decode('utf-8')
00880       else:
00881         self.data.depth16.encoding = str[start:end]
00882       _x = self
00883       start = end
00884       end += 5
00885       (_x.data.depth16.is_bigendian, _x.data.depth16.step,) = _struct_BI.unpack(str[start:end])
00886       start = end
00887       end += 4
00888       (length,) = _struct_I.unpack(str[start:end])
00889       start = end
00890       end += length
00891       if python3:
00892         self.data.depth16.data = str[start:end].decode('utf-8')
00893       else:
00894         self.data.depth16.data = str[start:end]
00895       _x = self
00896       start = end
00897       end += 12
00898       (_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])
00899       start = end
00900       end += 4
00901       (length,) = _struct_I.unpack(str[start:end])
00902       start = end
00903       end += length
00904       if python3:
00905         self.data.range_info.header.frame_id = str[start:end].decode('utf-8')
00906       else:
00907         self.data.range_info.header.frame_id = str[start:end]
00908       _x = self
00909       start = end
00910       end += 8
00911       (_x.data.range_info.height, _x.data.range_info.width,) = _struct_2I.unpack(str[start:end])
00912       start = end
00913       end += 4
00914       (length,) = _struct_I.unpack(str[start:end])
00915       start = end
00916       end += length
00917       if python3:
00918         self.data.range_info.distortion_model = str[start:end].decode('utf-8')
00919       else:
00920         self.data.range_info.distortion_model = str[start:end]
00921       start = end
00922       end += 4
00923       (length,) = _struct_I.unpack(str[start:end])
00924       pattern = '<%sd'%length
00925       start = end
00926       end += struct.calcsize(pattern)
00927       self.data.range_info.D = struct.unpack(pattern, str[start:end])
00928       start = end
00929       end += 72
00930       self.data.range_info.K = _struct_9d.unpack(str[start:end])
00931       start = end
00932       end += 72
00933       self.data.range_info.R = _struct_9d.unpack(str[start:end])
00934       start = end
00935       end += 96
00936       self.data.range_info.P = _struct_12d.unpack(str[start:end])
00937       _x = self
00938       start = end
00939       end += 37
00940       (_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])
00941       self.data.range_info.roi.do_rectify = bool(self.data.range_info.roi.do_rectify)
00942       start = end
00943       end += 4
00944       (length,) = _struct_I.unpack(str[start:end])
00945       start = end
00946       end += length
00947       if python3:
00948         self.data.left_image.header.frame_id = str[start:end].decode('utf-8')
00949       else:
00950         self.data.left_image.header.frame_id = str[start:end]
00951       _x = self
00952       start = end
00953       end += 8
00954       (_x.data.left_image.height, _x.data.left_image.width,) = _struct_2I.unpack(str[start:end])
00955       start = end
00956       end += 4
00957       (length,) = _struct_I.unpack(str[start:end])
00958       start = end
00959       end += length
00960       if python3:
00961         self.data.left_image.encoding = str[start:end].decode('utf-8')
00962       else:
00963         self.data.left_image.encoding = str[start:end]
00964       _x = self
00965       start = end
00966       end += 5
00967       (_x.data.left_image.is_bigendian, _x.data.left_image.step,) = _struct_BI.unpack(str[start:end])
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.data.left_image.data = str[start:end].decode('utf-8')
00975       else:
00976         self.data.left_image.data = str[start:end]
00977       _x = self
00978       start = end
00979       end += 12
00980       (_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])
00981       start = end
00982       end += 4
00983       (length,) = _struct_I.unpack(str[start:end])
00984       start = end
00985       end += length
00986       if python3:
00987         self.data.right_image.header.frame_id = str[start:end].decode('utf-8')
00988       else:
00989         self.data.right_image.header.frame_id = str[start:end]
00990       _x = self
00991       start = end
00992       end += 8
00993       (_x.data.right_image.height, _x.data.right_image.width,) = _struct_2I.unpack(str[start:end])
00994       start = end
00995       end += 4
00996       (length,) = _struct_I.unpack(str[start:end])
00997       start = end
00998       end += length
00999       if python3:
01000         self.data.right_image.encoding = str[start:end].decode('utf-8')
01001       else:
01002         self.data.right_image.encoding = str[start:end]
01003       _x = self
01004       start = end
01005       end += 5
01006       (_x.data.right_image.is_bigendian, _x.data.right_image.step,) = _struct_BI.unpack(str[start:end])
01007       start = end
01008       end += 4
01009       (length,) = _struct_I.unpack(str[start:end])
01010       start = end
01011       end += length
01012       if python3:
01013         self.data.right_image.data = str[start:end].decode('utf-8')
01014       else:
01015         self.data.right_image.data = str[start:end]
01016       _x = self
01017       start = end
01018       end += 12
01019       (_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])
01020       start = end
01021       end += 4
01022       (length,) = _struct_I.unpack(str[start:end])
01023       start = end
01024       end += length
01025       if python3:
01026         self.data.left_info.header.frame_id = str[start:end].decode('utf-8')
01027       else:
01028         self.data.left_info.header.frame_id = str[start:end]
01029       _x = self
01030       start = end
01031       end += 8
01032       (_x.data.left_info.height, _x.data.left_info.width,) = _struct_2I.unpack(str[start:end])
01033       start = end
01034       end += 4
01035       (length,) = _struct_I.unpack(str[start:end])
01036       start = end
01037       end += length
01038       if python3:
01039         self.data.left_info.distortion_model = str[start:end].decode('utf-8')
01040       else:
01041         self.data.left_info.distortion_model = str[start:end]
01042       start = end
01043       end += 4
01044       (length,) = _struct_I.unpack(str[start:end])
01045       pattern = '<%sd'%length
01046       start = end
01047       end += struct.calcsize(pattern)
01048       self.data.left_info.D = struct.unpack(pattern, str[start:end])
01049       start = end
01050       end += 72
01051       self.data.left_info.K = _struct_9d.unpack(str[start:end])
01052       start = end
01053       end += 72
01054       self.data.left_info.R = _struct_9d.unpack(str[start:end])
01055       start = end
01056       end += 96
01057       self.data.left_info.P = _struct_12d.unpack(str[start:end])
01058       _x = self
01059       start = end
01060       end += 37
01061       (_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])
01062       self.data.left_info.roi.do_rectify = bool(self.data.left_info.roi.do_rectify)
01063       start = end
01064       end += 4
01065       (length,) = _struct_I.unpack(str[start:end])
01066       start = end
01067       end += length
01068       if python3:
01069         self.data.right_info.header.frame_id = str[start:end].decode('utf-8')
01070       else:
01071         self.data.right_info.header.frame_id = str[start:end]
01072       _x = self
01073       start = end
01074       end += 8
01075       (_x.data.right_info.height, _x.data.right_info.width,) = _struct_2I.unpack(str[start:end])
01076       start = end
01077       end += 4
01078       (length,) = _struct_I.unpack(str[start:end])
01079       start = end
01080       end += length
01081       if python3:
01082         self.data.right_info.distortion_model = str[start:end].decode('utf-8')
01083       else:
01084         self.data.right_info.distortion_model = str[start:end]
01085       start = end
01086       end += 4
01087       (length,) = _struct_I.unpack(str[start:end])
01088       pattern = '<%sd'%length
01089       start = end
01090       end += struct.calcsize(pattern)
01091       self.data.right_info.D = struct.unpack(pattern, str[start:end])
01092       start = end
01093       end += 72
01094       self.data.right_info.K = _struct_9d.unpack(str[start:end])
01095       start = end
01096       end += 72
01097       self.data.right_info.R = _struct_9d.unpack(str[start:end])
01098       start = end
01099       end += 96
01100       self.data.right_info.P = _struct_12d.unpack(str[start:end])
01101       _x = self
01102       start = end
01103       end += 37
01104       (_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])
01105       self.data.right_info.roi.do_rectify = bool(self.data.right_info.roi.do_rectify)
01106       start = end
01107       end += 4
01108       (length,) = _struct_I.unpack(str[start:end])
01109       start = end
01110       end += length
01111       if python3:
01112         self.data.pixel_indices.header.frame_id = str[start:end].decode('utf-8')
01113       else:
01114         self.data.pixel_indices.header.frame_id = str[start:end]
01115       start = end
01116       end += 4
01117       (length,) = _struct_I.unpack(str[start:end])
01118       pattern = '<%si'%length
01119       start = end
01120       end += struct.calcsize(pattern)
01121       self.data.pixel_indices.indices = struct.unpack(pattern, str[start:end])
01122       _x = self
01123       start = end
01124       end += 12
01125       (_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])
01126       start = end
01127       end += 4
01128       (length,) = _struct_I.unpack(str[start:end])
01129       start = end
01130       end += length
01131       if python3:
01132         self.data.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01133       else:
01134         self.data.point_cloud.header.frame_id = str[start:end]
01135       _x = self
01136       start = end
01137       end += 8
01138       (_x.data.point_cloud.height, _x.data.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01139       start = end
01140       end += 4
01141       (length,) = _struct_I.unpack(str[start:end])
01142       self.data.point_cloud.fields = []
01143       for i in range(0, length):
01144         val1 = sensor_msgs.msg.PointField()
01145         start = end
01146         end += 4
01147         (length,) = _struct_I.unpack(str[start:end])
01148         start = end
01149         end += length
01150         if python3:
01151           val1.name = str[start:end].decode('utf-8')
01152         else:
01153           val1.name = str[start:end]
01154         _x = val1
01155         start = end
01156         end += 9
01157         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01158         self.data.point_cloud.fields.append(val1)
01159       _x = self
01160       start = end
01161       end += 9
01162       (_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01163       self.data.point_cloud.is_bigendian = bool(self.data.point_cloud.is_bigendian)
01164       start = end
01165       end += 4
01166       (length,) = _struct_I.unpack(str[start:end])
01167       start = end
01168       end += length
01169       if python3:
01170         self.data.point_cloud.data = str[start:end].decode('utf-8')
01171       else:
01172         self.data.point_cloud.data = str[start:end]
01173       start = end
01174       end += 1
01175       (self.data.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
01176       self.data.point_cloud.is_dense = bool(self.data.point_cloud.is_dense)
01177       return self
01178     except struct.error as e:
01179       raise genpy.DeserializationError(e) #most likely buffer underfill
01180 
01181 
01182   def serialize_numpy(self, buff, numpy):
01183     """
01184     serialize message with numpy array types into buffer
01185     :param buff: buffer, ``StringIO``
01186     :param numpy: numpy python module
01187     """
01188     try:
01189       _x = self
01190       buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
01191       _x = self.data.header.frame_id
01192       length = len(_x)
01193       if python3 or type(_x) == unicode:
01194         _x = _x.encode('utf-8')
01195         length = len(_x)
01196       buff.write(struct.pack('<I%ss'%length, length, _x))
01197       _x = self
01198       buff.write(_struct_3I.pack(_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs))
01199       _x = self.data.intensity.header.frame_id
01200       length = len(_x)
01201       if python3 or type(_x) == unicode:
01202         _x = _x.encode('utf-8')
01203         length = len(_x)
01204       buff.write(struct.pack('<I%ss'%length, length, _x))
01205       _x = self
01206       buff.write(_struct_2I.pack(_x.data.intensity.height, _x.data.intensity.width))
01207       _x = self.data.intensity.encoding
01208       length = len(_x)
01209       if python3 or type(_x) == unicode:
01210         _x = _x.encode('utf-8')
01211         length = len(_x)
01212       buff.write(struct.pack('<I%ss'%length, length, _x))
01213       _x = self
01214       buff.write(_struct_BI.pack(_x.data.intensity.is_bigendian, _x.data.intensity.step))
01215       _x = self.data.intensity.data
01216       length = len(_x)
01217       # - if encoded as a list instead, serialize as bytes instead of string
01218       if type(_x) in [list, tuple]:
01219         buff.write(struct.pack('<I%sB'%length, length, *_x))
01220       else:
01221         buff.write(struct.pack('<I%ss'%length, length, _x))
01222       _x = self
01223       buff.write(_struct_3I.pack(_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs))
01224       _x = self.data.confidence.header.frame_id
01225       length = len(_x)
01226       if python3 or type(_x) == unicode:
01227         _x = _x.encode('utf-8')
01228         length = len(_x)
01229       buff.write(struct.pack('<I%ss'%length, length, _x))
01230       _x = self
01231       buff.write(_struct_2I.pack(_x.data.confidence.height, _x.data.confidence.width))
01232       _x = self.data.confidence.encoding
01233       length = len(_x)
01234       if python3 or type(_x) == unicode:
01235         _x = _x.encode('utf-8')
01236         length = len(_x)
01237       buff.write(struct.pack('<I%ss'%length, length, _x))
01238       _x = self
01239       buff.write(_struct_BI.pack(_x.data.confidence.is_bigendian, _x.data.confidence.step))
01240       _x = self.data.confidence.data
01241       length = len(_x)
01242       # - if encoded as a list instead, serialize as bytes instead of string
01243       if type(_x) in [list, tuple]:
01244         buff.write(struct.pack('<I%sB'%length, length, *_x))
01245       else:
01246         buff.write(struct.pack('<I%ss'%length, length, _x))
01247       _x = self
01248       buff.write(_struct_3I.pack(_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs))
01249       _x = self.data.depth.header.frame_id
01250       length = len(_x)
01251       if python3 or type(_x) == unicode:
01252         _x = _x.encode('utf-8')
01253         length = len(_x)
01254       buff.write(struct.pack('<I%ss'%length, length, _x))
01255       _x = self
01256       buff.write(_struct_2I.pack(_x.data.depth.height, _x.data.depth.width))
01257       _x = self.data.depth.encoding
01258       length = len(_x)
01259       if python3 or type(_x) == unicode:
01260         _x = _x.encode('utf-8')
01261         length = len(_x)
01262       buff.write(struct.pack('<I%ss'%length, length, _x))
01263       _x = self
01264       buff.write(_struct_BI.pack(_x.data.depth.is_bigendian, _x.data.depth.step))
01265       _x = self.data.depth.data
01266       length = len(_x)
01267       # - if encoded as a list instead, serialize as bytes instead of string
01268       if type(_x) in [list, tuple]:
01269         buff.write(struct.pack('<I%sB'%length, length, *_x))
01270       else:
01271         buff.write(struct.pack('<I%ss'%length, length, _x))
01272       _x = self
01273       buff.write(_struct_3I.pack(_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs))
01274       _x = self.data.depth16.header.frame_id
01275       length = len(_x)
01276       if python3 or type(_x) == unicode:
01277         _x = _x.encode('utf-8')
01278         length = len(_x)
01279       buff.write(struct.pack('<I%ss'%length, length, _x))
01280       _x = self
01281       buff.write(_struct_2I.pack(_x.data.depth16.height, _x.data.depth16.width))
01282       _x = self.data.depth16.encoding
01283       length = len(_x)
01284       if python3 or type(_x) == unicode:
01285         _x = _x.encode('utf-8')
01286         length = len(_x)
01287       buff.write(struct.pack('<I%ss'%length, length, _x))
01288       _x = self
01289       buff.write(_struct_BI.pack(_x.data.depth16.is_bigendian, _x.data.depth16.step))
01290       _x = self.data.depth16.data
01291       length = len(_x)
01292       # - if encoded as a list instead, serialize as bytes instead of string
01293       if type(_x) in [list, tuple]:
01294         buff.write(struct.pack('<I%sB'%length, length, *_x))
01295       else:
01296         buff.write(struct.pack('<I%ss'%length, length, _x))
01297       _x = self
01298       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))
01299       _x = self.data.range_info.header.frame_id
01300       length = len(_x)
01301       if python3 or type(_x) == unicode:
01302         _x = _x.encode('utf-8')
01303         length = len(_x)
01304       buff.write(struct.pack('<I%ss'%length, length, _x))
01305       _x = self
01306       buff.write(_struct_2I.pack(_x.data.range_info.height, _x.data.range_info.width))
01307       _x = self.data.range_info.distortion_model
01308       length = len(_x)
01309       if python3 or type(_x) == unicode:
01310         _x = _x.encode('utf-8')
01311         length = len(_x)
01312       buff.write(struct.pack('<I%ss'%length, length, _x))
01313       length = len(self.data.range_info.D)
01314       buff.write(_struct_I.pack(length))
01315       pattern = '<%sd'%length
01316       buff.write(self.data.range_info.D.tostring())
01317       buff.write(self.data.range_info.K.tostring())
01318       buff.write(self.data.range_info.R.tostring())
01319       buff.write(self.data.range_info.P.tostring())
01320       _x = self
01321       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))
01322       _x = self.data.left_image.header.frame_id
01323       length = len(_x)
01324       if python3 or type(_x) == unicode:
01325         _x = _x.encode('utf-8')
01326         length = len(_x)
01327       buff.write(struct.pack('<I%ss'%length, length, _x))
01328       _x = self
01329       buff.write(_struct_2I.pack(_x.data.left_image.height, _x.data.left_image.width))
01330       _x = self.data.left_image.encoding
01331       length = len(_x)
01332       if python3 or type(_x) == unicode:
01333         _x = _x.encode('utf-8')
01334         length = len(_x)
01335       buff.write(struct.pack('<I%ss'%length, length, _x))
01336       _x = self
01337       buff.write(_struct_BI.pack(_x.data.left_image.is_bigendian, _x.data.left_image.step))
01338       _x = self.data.left_image.data
01339       length = len(_x)
01340       # - if encoded as a list instead, serialize as bytes instead of string
01341       if type(_x) in [list, tuple]:
01342         buff.write(struct.pack('<I%sB'%length, length, *_x))
01343       else:
01344         buff.write(struct.pack('<I%ss'%length, length, _x))
01345       _x = self
01346       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))
01347       _x = self.data.right_image.header.frame_id
01348       length = len(_x)
01349       if python3 or type(_x) == unicode:
01350         _x = _x.encode('utf-8')
01351         length = len(_x)
01352       buff.write(struct.pack('<I%ss'%length, length, _x))
01353       _x = self
01354       buff.write(_struct_2I.pack(_x.data.right_image.height, _x.data.right_image.width))
01355       _x = self.data.right_image.encoding
01356       length = len(_x)
01357       if python3 or type(_x) == unicode:
01358         _x = _x.encode('utf-8')
01359         length = len(_x)
01360       buff.write(struct.pack('<I%ss'%length, length, _x))
01361       _x = self
01362       buff.write(_struct_BI.pack(_x.data.right_image.is_bigendian, _x.data.right_image.step))
01363       _x = self.data.right_image.data
01364       length = len(_x)
01365       # - if encoded as a list instead, serialize as bytes instead of string
01366       if type(_x) in [list, tuple]:
01367         buff.write(struct.pack('<I%sB'%length, length, *_x))
01368       else:
01369         buff.write(struct.pack('<I%ss'%length, length, _x))
01370       _x = self
01371       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))
01372       _x = self.data.left_info.header.frame_id
01373       length = len(_x)
01374       if python3 or type(_x) == unicode:
01375         _x = _x.encode('utf-8')
01376         length = len(_x)
01377       buff.write(struct.pack('<I%ss'%length, length, _x))
01378       _x = self
01379       buff.write(_struct_2I.pack(_x.data.left_info.height, _x.data.left_info.width))
01380       _x = self.data.left_info.distortion_model
01381       length = len(_x)
01382       if python3 or type(_x) == unicode:
01383         _x = _x.encode('utf-8')
01384         length = len(_x)
01385       buff.write(struct.pack('<I%ss'%length, length, _x))
01386       length = len(self.data.left_info.D)
01387       buff.write(_struct_I.pack(length))
01388       pattern = '<%sd'%length
01389       buff.write(self.data.left_info.D.tostring())
01390       buff.write(self.data.left_info.K.tostring())
01391       buff.write(self.data.left_info.R.tostring())
01392       buff.write(self.data.left_info.P.tostring())
01393       _x = self
01394       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))
01395       _x = self.data.right_info.header.frame_id
01396       length = len(_x)
01397       if python3 or type(_x) == unicode:
01398         _x = _x.encode('utf-8')
01399         length = len(_x)
01400       buff.write(struct.pack('<I%ss'%length, length, _x))
01401       _x = self
01402       buff.write(_struct_2I.pack(_x.data.right_info.height, _x.data.right_info.width))
01403       _x = self.data.right_info.distortion_model
01404       length = len(_x)
01405       if python3 or type(_x) == unicode:
01406         _x = _x.encode('utf-8')
01407         length = len(_x)
01408       buff.write(struct.pack('<I%ss'%length, length, _x))
01409       length = len(self.data.right_info.D)
01410       buff.write(_struct_I.pack(length))
01411       pattern = '<%sd'%length
01412       buff.write(self.data.right_info.D.tostring())
01413       buff.write(self.data.right_info.K.tostring())
01414       buff.write(self.data.right_info.R.tostring())
01415       buff.write(self.data.right_info.P.tostring())
01416       _x = self
01417       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))
01418       _x = self.data.pixel_indices.header.frame_id
01419       length = len(_x)
01420       if python3 or type(_x) == unicode:
01421         _x = _x.encode('utf-8')
01422         length = len(_x)
01423       buff.write(struct.pack('<I%ss'%length, length, _x))
01424       length = len(self.data.pixel_indices.indices)
01425       buff.write(_struct_I.pack(length))
01426       pattern = '<%si'%length
01427       buff.write(self.data.pixel_indices.indices.tostring())
01428       _x = self
01429       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))
01430       _x = self.data.point_cloud.header.frame_id
01431       length = len(_x)
01432       if python3 or type(_x) == unicode:
01433         _x = _x.encode('utf-8')
01434         length = len(_x)
01435       buff.write(struct.pack('<I%ss'%length, length, _x))
01436       _x = self
01437       buff.write(_struct_2I.pack(_x.data.point_cloud.height, _x.data.point_cloud.width))
01438       length = len(self.data.point_cloud.fields)
01439       buff.write(_struct_I.pack(length))
01440       for val1 in self.data.point_cloud.fields:
01441         _x = val1.name
01442         length = len(_x)
01443         if python3 or type(_x) == unicode:
01444           _x = _x.encode('utf-8')
01445           length = len(_x)
01446         buff.write(struct.pack('<I%ss'%length, length, _x))
01447         _x = val1
01448         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01449       _x = self
01450       buff.write(_struct_B2I.pack(_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step))
01451       _x = self.data.point_cloud.data
01452       length = len(_x)
01453       # - if encoded as a list instead, serialize as bytes instead of string
01454       if type(_x) in [list, tuple]:
01455         buff.write(struct.pack('<I%sB'%length, length, *_x))
01456       else:
01457         buff.write(struct.pack('<I%ss'%length, length, _x))
01458       buff.write(_struct_B.pack(self.data.point_cloud.is_dense))
01459     except struct.error as se: self._check_types(se)
01460     except TypeError as te: self._check_types(te)
01461 
01462   def deserialize_numpy(self, str, numpy):
01463     """
01464     unpack serialized message in str into this message instance using numpy for array types
01465     :param str: byte array of serialized message, ``str``
01466     :param numpy: numpy python module
01467     """
01468     try:
01469       if self.data is None:
01470         self.data = cr_capture.msg.RawCloudData()
01471       end = 0
01472       _x = self
01473       start = end
01474       end += 12
01475       (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01476       start = end
01477       end += 4
01478       (length,) = _struct_I.unpack(str[start:end])
01479       start = end
01480       end += length
01481       if python3:
01482         self.data.header.frame_id = str[start:end].decode('utf-8')
01483       else:
01484         self.data.header.frame_id = str[start:end]
01485       _x = self
01486       start = end
01487       end += 12
01488       (_x.data.intensity.header.seq, _x.data.intensity.header.stamp.secs, _x.data.intensity.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01489       start = end
01490       end += 4
01491       (length,) = _struct_I.unpack(str[start:end])
01492       start = end
01493       end += length
01494       if python3:
01495         self.data.intensity.header.frame_id = str[start:end].decode('utf-8')
01496       else:
01497         self.data.intensity.header.frame_id = str[start:end]
01498       _x = self
01499       start = end
01500       end += 8
01501       (_x.data.intensity.height, _x.data.intensity.width,) = _struct_2I.unpack(str[start:end])
01502       start = end
01503       end += 4
01504       (length,) = _struct_I.unpack(str[start:end])
01505       start = end
01506       end += length
01507       if python3:
01508         self.data.intensity.encoding = str[start:end].decode('utf-8')
01509       else:
01510         self.data.intensity.encoding = str[start:end]
01511       _x = self
01512       start = end
01513       end += 5
01514       (_x.data.intensity.is_bigendian, _x.data.intensity.step,) = _struct_BI.unpack(str[start:end])
01515       start = end
01516       end += 4
01517       (length,) = _struct_I.unpack(str[start:end])
01518       start = end
01519       end += length
01520       if python3:
01521         self.data.intensity.data = str[start:end].decode('utf-8')
01522       else:
01523         self.data.intensity.data = str[start:end]
01524       _x = self
01525       start = end
01526       end += 12
01527       (_x.data.confidence.header.seq, _x.data.confidence.header.stamp.secs, _x.data.confidence.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01528       start = end
01529       end += 4
01530       (length,) = _struct_I.unpack(str[start:end])
01531       start = end
01532       end += length
01533       if python3:
01534         self.data.confidence.header.frame_id = str[start:end].decode('utf-8')
01535       else:
01536         self.data.confidence.header.frame_id = str[start:end]
01537       _x = self
01538       start = end
01539       end += 8
01540       (_x.data.confidence.height, _x.data.confidence.width,) = _struct_2I.unpack(str[start:end])
01541       start = end
01542       end += 4
01543       (length,) = _struct_I.unpack(str[start:end])
01544       start = end
01545       end += length
01546       if python3:
01547         self.data.confidence.encoding = str[start:end].decode('utf-8')
01548       else:
01549         self.data.confidence.encoding = str[start:end]
01550       _x = self
01551       start = end
01552       end += 5
01553       (_x.data.confidence.is_bigendian, _x.data.confidence.step,) = _struct_BI.unpack(str[start:end])
01554       start = end
01555       end += 4
01556       (length,) = _struct_I.unpack(str[start:end])
01557       start = end
01558       end += length
01559       if python3:
01560         self.data.confidence.data = str[start:end].decode('utf-8')
01561       else:
01562         self.data.confidence.data = str[start:end]
01563       _x = self
01564       start = end
01565       end += 12
01566       (_x.data.depth.header.seq, _x.data.depth.header.stamp.secs, _x.data.depth.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01567       start = end
01568       end += 4
01569       (length,) = _struct_I.unpack(str[start:end])
01570       start = end
01571       end += length
01572       if python3:
01573         self.data.depth.header.frame_id = str[start:end].decode('utf-8')
01574       else:
01575         self.data.depth.header.frame_id = str[start:end]
01576       _x = self
01577       start = end
01578       end += 8
01579       (_x.data.depth.height, _x.data.depth.width,) = _struct_2I.unpack(str[start:end])
01580       start = end
01581       end += 4
01582       (length,) = _struct_I.unpack(str[start:end])
01583       start = end
01584       end += length
01585       if python3:
01586         self.data.depth.encoding = str[start:end].decode('utf-8')
01587       else:
01588         self.data.depth.encoding = str[start:end]
01589       _x = self
01590       start = end
01591       end += 5
01592       (_x.data.depth.is_bigendian, _x.data.depth.step,) = _struct_BI.unpack(str[start:end])
01593       start = end
01594       end += 4
01595       (length,) = _struct_I.unpack(str[start:end])
01596       start = end
01597       end += length
01598       if python3:
01599         self.data.depth.data = str[start:end].decode('utf-8')
01600       else:
01601         self.data.depth.data = str[start:end]
01602       _x = self
01603       start = end
01604       end += 12
01605       (_x.data.depth16.header.seq, _x.data.depth16.header.stamp.secs, _x.data.depth16.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01606       start = end
01607       end += 4
01608       (length,) = _struct_I.unpack(str[start:end])
01609       start = end
01610       end += length
01611       if python3:
01612         self.data.depth16.header.frame_id = str[start:end].decode('utf-8')
01613       else:
01614         self.data.depth16.header.frame_id = str[start:end]
01615       _x = self
01616       start = end
01617       end += 8
01618       (_x.data.depth16.height, _x.data.depth16.width,) = _struct_2I.unpack(str[start:end])
01619       start = end
01620       end += 4
01621       (length,) = _struct_I.unpack(str[start:end])
01622       start = end
01623       end += length
01624       if python3:
01625         self.data.depth16.encoding = str[start:end].decode('utf-8')
01626       else:
01627         self.data.depth16.encoding = str[start:end]
01628       _x = self
01629       start = end
01630       end += 5
01631       (_x.data.depth16.is_bigendian, _x.data.depth16.step,) = _struct_BI.unpack(str[start:end])
01632       start = end
01633       end += 4
01634       (length,) = _struct_I.unpack(str[start:end])
01635       start = end
01636       end += length
01637       if python3:
01638         self.data.depth16.data = str[start:end].decode('utf-8')
01639       else:
01640         self.data.depth16.data = str[start:end]
01641       _x = self
01642       start = end
01643       end += 12
01644       (_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])
01645       start = end
01646       end += 4
01647       (length,) = _struct_I.unpack(str[start:end])
01648       start = end
01649       end += length
01650       if python3:
01651         self.data.range_info.header.frame_id = str[start:end].decode('utf-8')
01652       else:
01653         self.data.range_info.header.frame_id = str[start:end]
01654       _x = self
01655       start = end
01656       end += 8
01657       (_x.data.range_info.height, _x.data.range_info.width,) = _struct_2I.unpack(str[start:end])
01658       start = end
01659       end += 4
01660       (length,) = _struct_I.unpack(str[start:end])
01661       start = end
01662       end += length
01663       if python3:
01664         self.data.range_info.distortion_model = str[start:end].decode('utf-8')
01665       else:
01666         self.data.range_info.distortion_model = str[start:end]
01667       start = end
01668       end += 4
01669       (length,) = _struct_I.unpack(str[start:end])
01670       pattern = '<%sd'%length
01671       start = end
01672       end += struct.calcsize(pattern)
01673       self.data.range_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01674       start = end
01675       end += 72
01676       self.data.range_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01677       start = end
01678       end += 72
01679       self.data.range_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01680       start = end
01681       end += 96
01682       self.data.range_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01683       _x = self
01684       start = end
01685       end += 37
01686       (_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])
01687       self.data.range_info.roi.do_rectify = bool(self.data.range_info.roi.do_rectify)
01688       start = end
01689       end += 4
01690       (length,) = _struct_I.unpack(str[start:end])
01691       start = end
01692       end += length
01693       if python3:
01694         self.data.left_image.header.frame_id = str[start:end].decode('utf-8')
01695       else:
01696         self.data.left_image.header.frame_id = str[start:end]
01697       _x = self
01698       start = end
01699       end += 8
01700       (_x.data.left_image.height, _x.data.left_image.width,) = _struct_2I.unpack(str[start:end])
01701       start = end
01702       end += 4
01703       (length,) = _struct_I.unpack(str[start:end])
01704       start = end
01705       end += length
01706       if python3:
01707         self.data.left_image.encoding = str[start:end].decode('utf-8')
01708       else:
01709         self.data.left_image.encoding = str[start:end]
01710       _x = self
01711       start = end
01712       end += 5
01713       (_x.data.left_image.is_bigendian, _x.data.left_image.step,) = _struct_BI.unpack(str[start:end])
01714       start = end
01715       end += 4
01716       (length,) = _struct_I.unpack(str[start:end])
01717       start = end
01718       end += length
01719       if python3:
01720         self.data.left_image.data = str[start:end].decode('utf-8')
01721       else:
01722         self.data.left_image.data = str[start:end]
01723       _x = self
01724       start = end
01725       end += 12
01726       (_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])
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.right_image.header.frame_id = str[start:end].decode('utf-8')
01734       else:
01735         self.data.right_image.header.frame_id = str[start:end]
01736       _x = self
01737       start = end
01738       end += 8
01739       (_x.data.right_image.height, _x.data.right_image.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.right_image.encoding = str[start:end].decode('utf-8')
01747       else:
01748         self.data.right_image.encoding = str[start:end]
01749       _x = self
01750       start = end
01751       end += 5
01752       (_x.data.right_image.is_bigendian, _x.data.right_image.step,) = _struct_BI.unpack(str[start:end])
01753       start = end
01754       end += 4
01755       (length,) = _struct_I.unpack(str[start:end])
01756       start = end
01757       end += length
01758       if python3:
01759         self.data.right_image.data = str[start:end].decode('utf-8')
01760       else:
01761         self.data.right_image.data = str[start:end]
01762       _x = self
01763       start = end
01764       end += 12
01765       (_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])
01766       start = end
01767       end += 4
01768       (length,) = _struct_I.unpack(str[start:end])
01769       start = end
01770       end += length
01771       if python3:
01772         self.data.left_info.header.frame_id = str[start:end].decode('utf-8')
01773       else:
01774         self.data.left_info.header.frame_id = str[start:end]
01775       _x = self
01776       start = end
01777       end += 8
01778       (_x.data.left_info.height, _x.data.left_info.width,) = _struct_2I.unpack(str[start:end])
01779       start = end
01780       end += 4
01781       (length,) = _struct_I.unpack(str[start:end])
01782       start = end
01783       end += length
01784       if python3:
01785         self.data.left_info.distortion_model = str[start:end].decode('utf-8')
01786       else:
01787         self.data.left_info.distortion_model = str[start:end]
01788       start = end
01789       end += 4
01790       (length,) = _struct_I.unpack(str[start:end])
01791       pattern = '<%sd'%length
01792       start = end
01793       end += struct.calcsize(pattern)
01794       self.data.left_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01795       start = end
01796       end += 72
01797       self.data.left_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01798       start = end
01799       end += 72
01800       self.data.left_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01801       start = end
01802       end += 96
01803       self.data.left_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01804       _x = self
01805       start = end
01806       end += 37
01807       (_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])
01808       self.data.left_info.roi.do_rectify = bool(self.data.left_info.roi.do_rectify)
01809       start = end
01810       end += 4
01811       (length,) = _struct_I.unpack(str[start:end])
01812       start = end
01813       end += length
01814       if python3:
01815         self.data.right_info.header.frame_id = str[start:end].decode('utf-8')
01816       else:
01817         self.data.right_info.header.frame_id = str[start:end]
01818       _x = self
01819       start = end
01820       end += 8
01821       (_x.data.right_info.height, _x.data.right_info.width,) = _struct_2I.unpack(str[start:end])
01822       start = end
01823       end += 4
01824       (length,) = _struct_I.unpack(str[start:end])
01825       start = end
01826       end += length
01827       if python3:
01828         self.data.right_info.distortion_model = str[start:end].decode('utf-8')
01829       else:
01830         self.data.right_info.distortion_model = str[start:end]
01831       start = end
01832       end += 4
01833       (length,) = _struct_I.unpack(str[start:end])
01834       pattern = '<%sd'%length
01835       start = end
01836       end += struct.calcsize(pattern)
01837       self.data.right_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01838       start = end
01839       end += 72
01840       self.data.right_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01841       start = end
01842       end += 72
01843       self.data.right_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01844       start = end
01845       end += 96
01846       self.data.right_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01847       _x = self
01848       start = end
01849       end += 37
01850       (_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])
01851       self.data.right_info.roi.do_rectify = bool(self.data.right_info.roi.do_rectify)
01852       start = end
01853       end += 4
01854       (length,) = _struct_I.unpack(str[start:end])
01855       start = end
01856       end += length
01857       if python3:
01858         self.data.pixel_indices.header.frame_id = str[start:end].decode('utf-8')
01859       else:
01860         self.data.pixel_indices.header.frame_id = str[start:end]
01861       start = end
01862       end += 4
01863       (length,) = _struct_I.unpack(str[start:end])
01864       pattern = '<%si'%length
01865       start = end
01866       end += struct.calcsize(pattern)
01867       self.data.pixel_indices.indices = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01868       _x = self
01869       start = end
01870       end += 12
01871       (_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])
01872       start = end
01873       end += 4
01874       (length,) = _struct_I.unpack(str[start:end])
01875       start = end
01876       end += length
01877       if python3:
01878         self.data.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01879       else:
01880         self.data.point_cloud.header.frame_id = str[start:end]
01881       _x = self
01882       start = end
01883       end += 8
01884       (_x.data.point_cloud.height, _x.data.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01885       start = end
01886       end += 4
01887       (length,) = _struct_I.unpack(str[start:end])
01888       self.data.point_cloud.fields = []
01889       for i in range(0, length):
01890         val1 = sensor_msgs.msg.PointField()
01891         start = end
01892         end += 4
01893         (length,) = _struct_I.unpack(str[start:end])
01894         start = end
01895         end += length
01896         if python3:
01897           val1.name = str[start:end].decode('utf-8')
01898         else:
01899           val1.name = str[start:end]
01900         _x = val1
01901         start = end
01902         end += 9
01903         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01904         self.data.point_cloud.fields.append(val1)
01905       _x = self
01906       start = end
01907       end += 9
01908       (_x.data.point_cloud.is_bigendian, _x.data.point_cloud.point_step, _x.data.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01909       self.data.point_cloud.is_bigendian = bool(self.data.point_cloud.is_bigendian)
01910       start = end
01911       end += 4
01912       (length,) = _struct_I.unpack(str[start:end])
01913       start = end
01914       end += length
01915       if python3:
01916         self.data.point_cloud.data = str[start:end].decode('utf-8')
01917       else:
01918         self.data.point_cloud.data = str[start:end]
01919       start = end
01920       end += 1
01921       (self.data.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
01922       self.data.point_cloud.is_dense = bool(self.data.point_cloud.is_dense)
01923       return self
01924     except struct.error as e:
01925       raise genpy.DeserializationError(e) #most likely buffer underfill
01926 
01927 _struct_I = genpy.struct_I
01928 _struct_IBI = struct.Struct("<IBI")
01929 _struct_6IB3I = struct.Struct("<6IB3I")
01930 _struct_B = struct.Struct("<B")
01931 _struct_12d = struct.Struct("<12d")
01932 _struct_9d = struct.Struct("<9d")
01933 _struct_BI = struct.Struct("<BI")
01934 _struct_3I = struct.Struct("<3I")
01935 _struct_B2I = struct.Struct("<B2I")
01936 _struct_2I = struct.Struct("<2I")
01937 class PullRawData(object):
01938   _type          = 'cr_capture/PullRawData'
01939   _md5sum = '3abdecedc0af3d50efa293207f37226e'
01940   _request_class  = PullRawDataRequest
01941   _response_class = PullRawDataResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


cr_capture
Author(s): youhei kakiuchi, JSK
autogenerated on Sun Mar 24 2013 02:36:20