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


worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Sep 2 2013 11:37:27