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