_CameraMeasurement.py
Go to the documentation of this file.
00001 """autogenerated by genpy from camera_pose_calibration/CameraMeasurement.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import sensor_msgs.msg
00008 import calibration_msgs.msg
00009 import geometry_msgs.msg
00010 import std_msgs.msg
00011 
00012 class CameraMeasurement(genpy.Message):
00013   _md5sum = "d3ae2f15509fe7ea7859c8e2a9ea04c9"
00014   _type = "camera_pose_calibration/CameraMeasurement"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """Header header
00017 string camera_id
00018 calibration_msgs/CalibrationPattern features
00019 sensor_msgs/CameraInfo cam_info
00020 
00021 ================================================================================
00022 MSG: std_msgs/Header
00023 # Standard metadata for higher-level stamped data types.
00024 # This is generally used to communicate timestamped data 
00025 # in a particular coordinate frame.
00026 # 
00027 # sequence ID: consecutively increasing ID 
00028 uint32 seq
00029 #Two-integer timestamp that is expressed as:
00030 # * stamp.secs: seconds (stamp_secs) since epoch
00031 # * stamp.nsecs: nanoseconds since stamp_secs
00032 # time-handling sugar is provided by the client library
00033 time stamp
00034 #Frame this data is associated with
00035 # 0: no frame
00036 # 1: global frame
00037 string frame_id
00038 
00039 ================================================================================
00040 MSG: calibration_msgs/CalibrationPattern
00041 Header header
00042 geometry_msgs/Point[] object_points
00043 geometry_msgs/Point[] image_points
00044 uint8 success
00045 
00046 ================================================================================
00047 MSG: geometry_msgs/Point
00048 # This contains the position of a point in free space
00049 float64 x
00050 float64 y
00051 float64 z
00052 
00053 ================================================================================
00054 MSG: sensor_msgs/CameraInfo
00055 # This message defines meta information for a camera. It should be in a
00056 # camera namespace on topic "camera_info" and accompanied by up to five
00057 # image topics named:
00058 #
00059 #   image_raw - raw data from the camera driver, possibly Bayer encoded
00060 #   image            - monochrome, distorted
00061 #   image_color      - color, distorted
00062 #   image_rect       - monochrome, rectified
00063 #   image_rect_color - color, rectified
00064 #
00065 # The image_pipeline contains packages (image_proc, stereo_image_proc)
00066 # for producing the four processed image topics from image_raw and
00067 # camera_info. The meaning of the camera parameters are described in
00068 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.
00069 #
00070 # The image_geometry package provides a user-friendly interface to
00071 # common operations using this meta information. If you want to, e.g.,
00072 # project a 3d point into image coordinates, we strongly recommend
00073 # using image_geometry.
00074 #
00075 # If the camera is uncalibrated, the matrices D, K, R, P should be left
00076 # zeroed out. In particular, clients may assume that K[0] == 0.0
00077 # indicates an uncalibrated camera.
00078 
00079 #######################################################################
00080 #                     Image acquisition info                          #
00081 #######################################################################
00082 
00083 # Time of image acquisition, camera coordinate frame ID
00084 Header header    # Header timestamp should be acquisition time of image
00085                  # Header frame_id should be optical frame of camera
00086                  # origin of frame should be optical center of camera
00087                  # +x should point to the right in the image
00088                  # +y should point down in the image
00089                  # +z should point into the plane of the image
00090 
00091 
00092 #######################################################################
00093 #                      Calibration Parameters                         #
00094 #######################################################################
00095 # These are fixed during camera calibration. Their values will be the #
00096 # same in all messages until the camera is recalibrated. Note that    #
00097 # self-calibrating systems may "recalibrate" frequently.              #
00098 #                                                                     #
00099 # The internal parameters can be used to warp a raw (distorted) image #
00100 # to:                                                                 #
00101 #   1. An undistorted image (requires D and K)                        #
00102 #   2. A rectified image (requires D, K, R)                           #
00103 # The projection matrix P projects 3D points into the rectified image.#
00104 #######################################################################
00105 
00106 # The image dimensions with which the camera was calibrated. Normally
00107 # this will be the full camera resolution in pixels.
00108 uint32 height
00109 uint32 width
00110 
00111 # The distortion model used. Supported models are listed in
00112 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a
00113 # simple model of radial and tangential distortion - is sufficent.
00114 string distortion_model
00115 
00116 # The distortion parameters, size depending on the distortion model.
00117 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
00118 float64[] D
00119 
00120 # Intrinsic camera matrix for the raw (distorted) images.
00121 #     [fx  0 cx]
00122 # K = [ 0 fy cy]
00123 #     [ 0  0  1]
00124 # Projects 3D points in the camera coordinate frame to 2D pixel
00125 # coordinates using the focal lengths (fx, fy) and principal point
00126 # (cx, cy).
00127 float64[9]  K # 3x3 row-major matrix
00128 
00129 # Rectification matrix (stereo cameras only)
00130 # A rotation matrix aligning the camera coordinate system to the ideal
00131 # stereo image plane so that epipolar lines in both stereo images are
00132 # parallel.
00133 float64[9]  R # 3x3 row-major matrix
00134 
00135 # Projection/camera matrix
00136 #     [fx'  0  cx' Tx]
00137 # P = [ 0  fy' cy' Ty]
00138 #     [ 0   0   1   0]
00139 # By convention, this matrix specifies the intrinsic (camera) matrix
00140 #  of the processed (rectified) image. That is, the left 3x3 portion
00141 #  is the normal camera intrinsic matrix for the rectified image.
00142 # It projects 3D points in the camera coordinate frame to 2D pixel
00143 #  coordinates using the focal lengths (fx', fy') and principal point
00144 #  (cx', cy') - these may differ from the values in K.
00145 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will
00146 #  also have R = the identity and P[1:3,1:3] = K.
00147 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the
00148 #  position of the optical center of the second camera in the first
00149 #  camera's frame. We assume Tz = 0 so both cameras are in the same
00150 #  stereo image plane. The first camera always has Tx = Ty = 0. For
00151 #  the right (second) camera of a horizontal stereo pair, Ty = 0 and
00152 #  Tx = -fx' * B, where B is the baseline between the cameras.
00153 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto
00154 #  the rectified image is given by:
00155 #  [u v w]' = P * [X Y Z 1]'
00156 #         x = u / w
00157 #         y = v / w
00158 #  This holds for both images of a stereo pair.
00159 float64[12] P # 3x4 row-major matrix
00160 
00161 
00162 #######################################################################
00163 #                      Operational Parameters                         #
00164 #######################################################################
00165 # These define the image region actually captured by the camera       #
00166 # driver. Although they affect the geometry of the output image, they #
00167 # may be changed freely without recalibrating the camera.             #
00168 #######################################################################
00169 
00170 # Binning refers here to any camera setting which combines rectangular
00171 #  neighborhoods of pixels into larger "super-pixels." It reduces the
00172 #  resolution of the output image to
00173 #  (width / binning_x) x (height / binning_y).
00174 # The default values binning_x = binning_y = 0 is considered the same
00175 #  as binning_x = binning_y = 1 (no subsampling).
00176 uint32 binning_x
00177 uint32 binning_y
00178 
00179 # Region of interest (subwindow of full camera resolution), given in
00180 #  full resolution (unbinned) image coordinates. A particular ROI
00181 #  always denotes the same window of pixels on the camera sensor,
00182 #  regardless of binning settings.
00183 # The default setting of roi (all values 0) is considered the same as
00184 #  full resolution (roi.width = width, roi.height = height).
00185 RegionOfInterest roi
00186 
00187 ================================================================================
00188 MSG: sensor_msgs/RegionOfInterest
00189 # This message is used to specify a region of interest within an image.
00190 #
00191 # When used to specify the ROI setting of the camera when the image was
00192 # taken, the height and width fields should either match the height and
00193 # width fields for the associated image; or height = width = 0
00194 # indicates that the full resolution image was captured.
00195 
00196 uint32 x_offset  # Leftmost pixel of the ROI
00197                  # (0 if the ROI includes the left edge of the image)
00198 uint32 y_offset  # Topmost pixel of the ROI
00199                  # (0 if the ROI includes the top edge of the image)
00200 uint32 height    # Height of ROI
00201 uint32 width     # Width of ROI
00202 
00203 # True if a distinct rectified ROI should be calculated from the "raw"
00204 # ROI in this message. Typically this should be False if the full image
00205 # is captured (ROI not used), and True if a subwindow is captured (ROI
00206 # used).
00207 bool do_rectify
00208 
00209 """
00210   __slots__ = ['header','camera_id','features','cam_info']
00211   _slot_types = ['std_msgs/Header','string','calibration_msgs/CalibrationPattern','sensor_msgs/CameraInfo']
00212 
00213   def __init__(self, *args, **kwds):
00214     """
00215     Constructor. Any message fields that are implicitly/explicitly
00216     set to None will be assigned a default value. The recommend
00217     use is keyword arguments as this is more robust to future message
00218     changes.  You cannot mix in-order arguments and keyword arguments.
00219 
00220     The available fields are:
00221        header,camera_id,features,cam_info
00222 
00223     :param args: complete set of field values, in .msg order
00224     :param kwds: use keyword arguments corresponding to message field names
00225     to set specific fields.
00226     """
00227     if args or kwds:
00228       super(CameraMeasurement, self).__init__(*args, **kwds)
00229       #message fields cannot be None, assign default values for those that are
00230       if self.header is None:
00231         self.header = std_msgs.msg.Header()
00232       if self.camera_id is None:
00233         self.camera_id = ''
00234       if self.features is None:
00235         self.features = calibration_msgs.msg.CalibrationPattern()
00236       if self.cam_info is None:
00237         self.cam_info = sensor_msgs.msg.CameraInfo()
00238     else:
00239       self.header = std_msgs.msg.Header()
00240       self.camera_id = ''
00241       self.features = calibration_msgs.msg.CalibrationPattern()
00242       self.cam_info = sensor_msgs.msg.CameraInfo()
00243 
00244   def _get_types(self):
00245     """
00246     internal API method
00247     """
00248     return self._slot_types
00249 
00250   def serialize(self, buff):
00251     """
00252     serialize message into buffer
00253     :param buff: buffer, ``StringIO``
00254     """
00255     try:
00256       _x = self
00257       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00258       _x = self.header.frame_id
00259       length = len(_x)
00260       if python3 or type(_x) == unicode:
00261         _x = _x.encode('utf-8')
00262         length = len(_x)
00263       buff.write(struct.pack('<I%ss'%length, length, _x))
00264       _x = self.camera_id
00265       length = len(_x)
00266       if python3 or type(_x) == unicode:
00267         _x = _x.encode('utf-8')
00268         length = len(_x)
00269       buff.write(struct.pack('<I%ss'%length, length, _x))
00270       _x = self
00271       buff.write(_struct_3I.pack(_x.features.header.seq, _x.features.header.stamp.secs, _x.features.header.stamp.nsecs))
00272       _x = self.features.header.frame_id
00273       length = len(_x)
00274       if python3 or type(_x) == unicode:
00275         _x = _x.encode('utf-8')
00276         length = len(_x)
00277       buff.write(struct.pack('<I%ss'%length, length, _x))
00278       length = len(self.features.object_points)
00279       buff.write(_struct_I.pack(length))
00280       for val1 in self.features.object_points:
00281         _x = val1
00282         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00283       length = len(self.features.image_points)
00284       buff.write(_struct_I.pack(length))
00285       for val1 in self.features.image_points:
00286         _x = val1
00287         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00288       _x = self
00289       buff.write(_struct_B3I.pack(_x.features.success, _x.cam_info.header.seq, _x.cam_info.header.stamp.secs, _x.cam_info.header.stamp.nsecs))
00290       _x = self.cam_info.header.frame_id
00291       length = len(_x)
00292       if python3 or type(_x) == unicode:
00293         _x = _x.encode('utf-8')
00294         length = len(_x)
00295       buff.write(struct.pack('<I%ss'%length, length, _x))
00296       _x = self
00297       buff.write(_struct_2I.pack(_x.cam_info.height, _x.cam_info.width))
00298       _x = self.cam_info.distortion_model
00299       length = len(_x)
00300       if python3 or type(_x) == unicode:
00301         _x = _x.encode('utf-8')
00302         length = len(_x)
00303       buff.write(struct.pack('<I%ss'%length, length, _x))
00304       length = len(self.cam_info.D)
00305       buff.write(_struct_I.pack(length))
00306       pattern = '<%sd'%length
00307       buff.write(struct.pack(pattern, *self.cam_info.D))
00308       buff.write(_struct_9d.pack(*self.cam_info.K))
00309       buff.write(_struct_9d.pack(*self.cam_info.R))
00310       buff.write(_struct_12d.pack(*self.cam_info.P))
00311       _x = self
00312       buff.write(_struct_6IB.pack(_x.cam_info.binning_x, _x.cam_info.binning_y, _x.cam_info.roi.x_offset, _x.cam_info.roi.y_offset, _x.cam_info.roi.height, _x.cam_info.roi.width, _x.cam_info.roi.do_rectify))
00313     except struct.error as se: self._check_types(se)
00314     except TypeError as te: self._check_types(te)
00315 
00316   def deserialize(self, str):
00317     """
00318     unpack serialized message in str into this message instance
00319     :param str: byte array of serialized message, ``str``
00320     """
00321     try:
00322       if self.header is None:
00323         self.header = std_msgs.msg.Header()
00324       if self.features is None:
00325         self.features = calibration_msgs.msg.CalibrationPattern()
00326       if self.cam_info is None:
00327         self.cam_info = sensor_msgs.msg.CameraInfo()
00328       end = 0
00329       _x = self
00330       start = end
00331       end += 12
00332       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00333       start = end
00334       end += 4
00335       (length,) = _struct_I.unpack(str[start:end])
00336       start = end
00337       end += length
00338       if python3:
00339         self.header.frame_id = str[start:end].decode('utf-8')
00340       else:
00341         self.header.frame_id = str[start:end]
00342       start = end
00343       end += 4
00344       (length,) = _struct_I.unpack(str[start:end])
00345       start = end
00346       end += length
00347       if python3:
00348         self.camera_id = str[start:end].decode('utf-8')
00349       else:
00350         self.camera_id = str[start:end]
00351       _x = self
00352       start = end
00353       end += 12
00354       (_x.features.header.seq, _x.features.header.stamp.secs, _x.features.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00355       start = end
00356       end += 4
00357       (length,) = _struct_I.unpack(str[start:end])
00358       start = end
00359       end += length
00360       if python3:
00361         self.features.header.frame_id = str[start:end].decode('utf-8')
00362       else:
00363         self.features.header.frame_id = str[start:end]
00364       start = end
00365       end += 4
00366       (length,) = _struct_I.unpack(str[start:end])
00367       self.features.object_points = []
00368       for i in range(0, length):
00369         val1 = geometry_msgs.msg.Point()
00370         _x = val1
00371         start = end
00372         end += 24
00373         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00374         self.features.object_points.append(val1)
00375       start = end
00376       end += 4
00377       (length,) = _struct_I.unpack(str[start:end])
00378       self.features.image_points = []
00379       for i in range(0, length):
00380         val1 = geometry_msgs.msg.Point()
00381         _x = val1
00382         start = end
00383         end += 24
00384         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00385         self.features.image_points.append(val1)
00386       _x = self
00387       start = end
00388       end += 13
00389       (_x.features.success, _x.cam_info.header.seq, _x.cam_info.header.stamp.secs, _x.cam_info.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00390       start = end
00391       end += 4
00392       (length,) = _struct_I.unpack(str[start:end])
00393       start = end
00394       end += length
00395       if python3:
00396         self.cam_info.header.frame_id = str[start:end].decode('utf-8')
00397       else:
00398         self.cam_info.header.frame_id = str[start:end]
00399       _x = self
00400       start = end
00401       end += 8
00402       (_x.cam_info.height, _x.cam_info.width,) = _struct_2I.unpack(str[start:end])
00403       start = end
00404       end += 4
00405       (length,) = _struct_I.unpack(str[start:end])
00406       start = end
00407       end += length
00408       if python3:
00409         self.cam_info.distortion_model = str[start:end].decode('utf-8')
00410       else:
00411         self.cam_info.distortion_model = str[start:end]
00412       start = end
00413       end += 4
00414       (length,) = _struct_I.unpack(str[start:end])
00415       pattern = '<%sd'%length
00416       start = end
00417       end += struct.calcsize(pattern)
00418       self.cam_info.D = struct.unpack(pattern, str[start:end])
00419       start = end
00420       end += 72
00421       self.cam_info.K = _struct_9d.unpack(str[start:end])
00422       start = end
00423       end += 72
00424       self.cam_info.R = _struct_9d.unpack(str[start:end])
00425       start = end
00426       end += 96
00427       self.cam_info.P = _struct_12d.unpack(str[start:end])
00428       _x = self
00429       start = end
00430       end += 25
00431       (_x.cam_info.binning_x, _x.cam_info.binning_y, _x.cam_info.roi.x_offset, _x.cam_info.roi.y_offset, _x.cam_info.roi.height, _x.cam_info.roi.width, _x.cam_info.roi.do_rectify,) = _struct_6IB.unpack(str[start:end])
00432       self.cam_info.roi.do_rectify = bool(self.cam_info.roi.do_rectify)
00433       return self
00434     except struct.error as e:
00435       raise genpy.DeserializationError(e) #most likely buffer underfill
00436 
00437 
00438   def serialize_numpy(self, buff, numpy):
00439     """
00440     serialize message with numpy array types into buffer
00441     :param buff: buffer, ``StringIO``
00442     :param numpy: numpy python module
00443     """
00444     try:
00445       _x = self
00446       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00447       _x = self.header.frame_id
00448       length = len(_x)
00449       if python3 or type(_x) == unicode:
00450         _x = _x.encode('utf-8')
00451         length = len(_x)
00452       buff.write(struct.pack('<I%ss'%length, length, _x))
00453       _x = self.camera_id
00454       length = len(_x)
00455       if python3 or type(_x) == unicode:
00456         _x = _x.encode('utf-8')
00457         length = len(_x)
00458       buff.write(struct.pack('<I%ss'%length, length, _x))
00459       _x = self
00460       buff.write(_struct_3I.pack(_x.features.header.seq, _x.features.header.stamp.secs, _x.features.header.stamp.nsecs))
00461       _x = self.features.header.frame_id
00462       length = len(_x)
00463       if python3 or type(_x) == unicode:
00464         _x = _x.encode('utf-8')
00465         length = len(_x)
00466       buff.write(struct.pack('<I%ss'%length, length, _x))
00467       length = len(self.features.object_points)
00468       buff.write(_struct_I.pack(length))
00469       for val1 in self.features.object_points:
00470         _x = val1
00471         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00472       length = len(self.features.image_points)
00473       buff.write(_struct_I.pack(length))
00474       for val1 in self.features.image_points:
00475         _x = val1
00476         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00477       _x = self
00478       buff.write(_struct_B3I.pack(_x.features.success, _x.cam_info.header.seq, _x.cam_info.header.stamp.secs, _x.cam_info.header.stamp.nsecs))
00479       _x = self.cam_info.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.cam_info.height, _x.cam_info.width))
00487       _x = self.cam_info.distortion_model
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       length = len(self.cam_info.D)
00494       buff.write(_struct_I.pack(length))
00495       pattern = '<%sd'%length
00496       buff.write(self.cam_info.D.tostring())
00497       buff.write(self.cam_info.K.tostring())
00498       buff.write(self.cam_info.R.tostring())
00499       buff.write(self.cam_info.P.tostring())
00500       _x = self
00501       buff.write(_struct_6IB.pack(_x.cam_info.binning_x, _x.cam_info.binning_y, _x.cam_info.roi.x_offset, _x.cam_info.roi.y_offset, _x.cam_info.roi.height, _x.cam_info.roi.width, _x.cam_info.roi.do_rectify))
00502     except struct.error as se: self._check_types(se)
00503     except TypeError as te: self._check_types(te)
00504 
00505   def deserialize_numpy(self, str, numpy):
00506     """
00507     unpack serialized message in str into this message instance using numpy for array types
00508     :param str: byte array of serialized message, ``str``
00509     :param numpy: numpy python module
00510     """
00511     try:
00512       if self.header is None:
00513         self.header = std_msgs.msg.Header()
00514       if self.features is None:
00515         self.features = calibration_msgs.msg.CalibrationPattern()
00516       if self.cam_info is None:
00517         self.cam_info = sensor_msgs.msg.CameraInfo()
00518       end = 0
00519       _x = self
00520       start = end
00521       end += 12
00522       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00523       start = end
00524       end += 4
00525       (length,) = _struct_I.unpack(str[start:end])
00526       start = end
00527       end += length
00528       if python3:
00529         self.header.frame_id = str[start:end].decode('utf-8')
00530       else:
00531         self.header.frame_id = str[start:end]
00532       start = end
00533       end += 4
00534       (length,) = _struct_I.unpack(str[start:end])
00535       start = end
00536       end += length
00537       if python3:
00538         self.camera_id = str[start:end].decode('utf-8')
00539       else:
00540         self.camera_id = str[start:end]
00541       _x = self
00542       start = end
00543       end += 12
00544       (_x.features.header.seq, _x.features.header.stamp.secs, _x.features.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00545       start = end
00546       end += 4
00547       (length,) = _struct_I.unpack(str[start:end])
00548       start = end
00549       end += length
00550       if python3:
00551         self.features.header.frame_id = str[start:end].decode('utf-8')
00552       else:
00553         self.features.header.frame_id = str[start:end]
00554       start = end
00555       end += 4
00556       (length,) = _struct_I.unpack(str[start:end])
00557       self.features.object_points = []
00558       for i in range(0, length):
00559         val1 = geometry_msgs.msg.Point()
00560         _x = val1
00561         start = end
00562         end += 24
00563         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00564         self.features.object_points.append(val1)
00565       start = end
00566       end += 4
00567       (length,) = _struct_I.unpack(str[start:end])
00568       self.features.image_points = []
00569       for i in range(0, length):
00570         val1 = geometry_msgs.msg.Point()
00571         _x = val1
00572         start = end
00573         end += 24
00574         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00575         self.features.image_points.append(val1)
00576       _x = self
00577       start = end
00578       end += 13
00579       (_x.features.success, _x.cam_info.header.seq, _x.cam_info.header.stamp.secs, _x.cam_info.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00580       start = end
00581       end += 4
00582       (length,) = _struct_I.unpack(str[start:end])
00583       start = end
00584       end += length
00585       if python3:
00586         self.cam_info.header.frame_id = str[start:end].decode('utf-8')
00587       else:
00588         self.cam_info.header.frame_id = str[start:end]
00589       _x = self
00590       start = end
00591       end += 8
00592       (_x.cam_info.height, _x.cam_info.width,) = _struct_2I.unpack(str[start:end])
00593       start = end
00594       end += 4
00595       (length,) = _struct_I.unpack(str[start:end])
00596       start = end
00597       end += length
00598       if python3:
00599         self.cam_info.distortion_model = str[start:end].decode('utf-8')
00600       else:
00601         self.cam_info.distortion_model = str[start:end]
00602       start = end
00603       end += 4
00604       (length,) = _struct_I.unpack(str[start:end])
00605       pattern = '<%sd'%length
00606       start = end
00607       end += struct.calcsize(pattern)
00608       self.cam_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00609       start = end
00610       end += 72
00611       self.cam_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
00612       start = end
00613       end += 72
00614       self.cam_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
00615       start = end
00616       end += 96
00617       self.cam_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
00618       _x = self
00619       start = end
00620       end += 25
00621       (_x.cam_info.binning_x, _x.cam_info.binning_y, _x.cam_info.roi.x_offset, _x.cam_info.roi.y_offset, _x.cam_info.roi.height, _x.cam_info.roi.width, _x.cam_info.roi.do_rectify,) = _struct_6IB.unpack(str[start:end])
00622       self.cam_info.roi.do_rectify = bool(self.cam_info.roi.do_rectify)
00623       return self
00624     except struct.error as e:
00625       raise genpy.DeserializationError(e) #most likely buffer underfill
00626 
00627 _struct_I = genpy.struct_I
00628 _struct_6IB = struct.Struct("<6IB")
00629 _struct_12d = struct.Struct("<12d")
00630 _struct_9d = struct.Struct("<9d")
00631 _struct_3I = struct.Struct("<3I")
00632 _struct_B3I = struct.Struct("<B3I")
00633 _struct_2I = struct.Struct("<2I")
00634 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


camera_pose_calibration
Author(s): Vijay Pradeep, Wim Meeussen
autogenerated on Thu Aug 15 2013 12:02:24