_ObjectSegmentationGuiActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_segmentation_gui/ObjectSegmentationGuiActionGoal.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 actionlib_msgs.msg
00008 import stereo_msgs.msg
00009 import sensor_msgs.msg
00010 import genpy
00011 import object_segmentation_gui.msg
00012 import std_msgs.msg
00013 
00014 class ObjectSegmentationGuiActionGoal(genpy.Message):
00015   _md5sum = "c90d057a2cbad468bbf26bcf158e312e"
00016   _type = "object_segmentation_gui/ObjectSegmentationGuiActionGoal"
00017   _has_header = True #flag to mark the presence of a Header object
00018   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00019 
00020 Header header
00021 actionlib_msgs/GoalID goal_id
00022 ObjectSegmentationGuiGoal goal
00023 
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data 
00028 # in a particular coordinate frame.
00029 # 
00030 # sequence ID: consecutively increasing ID 
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041 
00042 ================================================================================
00043 MSG: actionlib_msgs/GoalID
00044 # The stamp should store the time at which this goal was requested.
00045 # It is used by an action server when it tries to preempt all
00046 # goals that were requested before a certain time
00047 time stamp
00048 
00049 # The id provides a way to associate feedback and
00050 # result message with specific goal requests. The id
00051 # specified must be unique.
00052 string id
00053 
00054 
00055 ================================================================================
00056 MSG: object_segmentation_gui/ObjectSegmentationGuiGoal
00057 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00058 sensor_msgs/Image image
00059 sensor_msgs/CameraInfo camera_info
00060 sensor_msgs/Image wide_field
00061 sensor_msgs/CameraInfo wide_camera_info
00062 
00063 sensor_msgs/PointCloud2 point_cloud
00064 stereo_msgs/DisparityImage disparity_image
00065 
00066 
00067 ================================================================================
00068 MSG: sensor_msgs/Image
00069 # This message contains an uncompressed image
00070 # (0, 0) is at top-left corner of image
00071 #
00072 
00073 Header header        # Header timestamp should be acquisition time of image
00074                      # Header frame_id should be optical frame of camera
00075                      # origin of frame should be optical center of cameara
00076                      # +x should point to the right in the image
00077                      # +y should point down in the image
00078                      # +z should point into to plane of the image
00079                      # If the frame_id here and the frame_id of the CameraInfo
00080                      # message associated with the image conflict
00081                      # the behavior is undefined
00082 
00083 uint32 height         # image height, that is, number of rows
00084 uint32 width          # image width, that is, number of columns
00085 
00086 # The legal values for encoding are in file src/image_encodings.cpp
00087 # If you want to standardize a new string format, join
00088 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00089 
00090 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00091                       # taken from the list of strings in src/image_encodings.cpp
00092 
00093 uint8 is_bigendian    # is this data bigendian?
00094 uint32 step           # Full row length in bytes
00095 uint8[] data          # actual matrix data, size is (step * rows)
00096 
00097 ================================================================================
00098 MSG: sensor_msgs/CameraInfo
00099 # This message defines meta information for a camera. It should be in a
00100 # camera namespace on topic "camera_info" and accompanied by up to five
00101 # image topics named:
00102 #
00103 #   image_raw - raw data from the camera driver, possibly Bayer encoded
00104 #   image            - monochrome, distorted
00105 #   image_color      - color, distorted
00106 #   image_rect       - monochrome, rectified
00107 #   image_rect_color - color, rectified
00108 #
00109 # The image_pipeline contains packages (image_proc, stereo_image_proc)
00110 # for producing the four processed image topics from image_raw and
00111 # camera_info. The meaning of the camera parameters are described in
00112 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.
00113 #
00114 # The image_geometry package provides a user-friendly interface to
00115 # common operations using this meta information. If you want to, e.g.,
00116 # project a 3d point into image coordinates, we strongly recommend
00117 # using image_geometry.
00118 #
00119 # If the camera is uncalibrated, the matrices D, K, R, P should be left
00120 # zeroed out. In particular, clients may assume that K[0] == 0.0
00121 # indicates an uncalibrated camera.
00122 
00123 #######################################################################
00124 #                     Image acquisition info                          #
00125 #######################################################################
00126 
00127 # Time of image acquisition, camera coordinate frame ID
00128 Header header    # Header timestamp should be acquisition time of image
00129                  # Header frame_id should be optical frame of camera
00130                  # origin of frame should be optical center of camera
00131                  # +x should point to the right in the image
00132                  # +y should point down in the image
00133                  # +z should point into the plane of the image
00134 
00135 
00136 #######################################################################
00137 #                      Calibration Parameters                         #
00138 #######################################################################
00139 # These are fixed during camera calibration. Their values will be the #
00140 # same in all messages until the camera is recalibrated. Note that    #
00141 # self-calibrating systems may "recalibrate" frequently.              #
00142 #                                                                     #
00143 # The internal parameters can be used to warp a raw (distorted) image #
00144 # to:                                                                 #
00145 #   1. An undistorted image (requires D and K)                        #
00146 #   2. A rectified image (requires D, K, R)                           #
00147 # The projection matrix P projects 3D points into the rectified image.#
00148 #######################################################################
00149 
00150 # The image dimensions with which the camera was calibrated. Normally
00151 # this will be the full camera resolution in pixels.
00152 uint32 height
00153 uint32 width
00154 
00155 # The distortion model used. Supported models are listed in
00156 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a
00157 # simple model of radial and tangential distortion - is sufficent.
00158 string distortion_model
00159 
00160 # The distortion parameters, size depending on the distortion model.
00161 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
00162 float64[] D
00163 
00164 # Intrinsic camera matrix for the raw (distorted) images.
00165 #     [fx  0 cx]
00166 # K = [ 0 fy cy]
00167 #     [ 0  0  1]
00168 # Projects 3D points in the camera coordinate frame to 2D pixel
00169 # coordinates using the focal lengths (fx, fy) and principal point
00170 # (cx, cy).
00171 float64[9]  K # 3x3 row-major matrix
00172 
00173 # Rectification matrix (stereo cameras only)
00174 # A rotation matrix aligning the camera coordinate system to the ideal
00175 # stereo image plane so that epipolar lines in both stereo images are
00176 # parallel.
00177 float64[9]  R # 3x3 row-major matrix
00178 
00179 # Projection/camera matrix
00180 #     [fx'  0  cx' Tx]
00181 # P = [ 0  fy' cy' Ty]
00182 #     [ 0   0   1   0]
00183 # By convention, this matrix specifies the intrinsic (camera) matrix
00184 #  of the processed (rectified) image. That is, the left 3x3 portion
00185 #  is the normal camera intrinsic matrix for the rectified image.
00186 # It projects 3D points in the camera coordinate frame to 2D pixel
00187 #  coordinates using the focal lengths (fx', fy') and principal point
00188 #  (cx', cy') - these may differ from the values in K.
00189 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will
00190 #  also have R = the identity and P[1:3,1:3] = K.
00191 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the
00192 #  position of the optical center of the second camera in the first
00193 #  camera's frame. We assume Tz = 0 so both cameras are in the same
00194 #  stereo image plane. The first camera always has Tx = Ty = 0. For
00195 #  the right (second) camera of a horizontal stereo pair, Ty = 0 and
00196 #  Tx = -fx' * B, where B is the baseline between the cameras.
00197 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto
00198 #  the rectified image is given by:
00199 #  [u v w]' = P * [X Y Z 1]'
00200 #         x = u / w
00201 #         y = v / w
00202 #  This holds for both images of a stereo pair.
00203 float64[12] P # 3x4 row-major matrix
00204 
00205 
00206 #######################################################################
00207 #                      Operational Parameters                         #
00208 #######################################################################
00209 # These define the image region actually captured by the camera       #
00210 # driver. Although they affect the geometry of the output image, they #
00211 # may be changed freely without recalibrating the camera.             #
00212 #######################################################################
00213 
00214 # Binning refers here to any camera setting which combines rectangular
00215 #  neighborhoods of pixels into larger "super-pixels." It reduces the
00216 #  resolution of the output image to
00217 #  (width / binning_x) x (height / binning_y).
00218 # The default values binning_x = binning_y = 0 is considered the same
00219 #  as binning_x = binning_y = 1 (no subsampling).
00220 uint32 binning_x
00221 uint32 binning_y
00222 
00223 # Region of interest (subwindow of full camera resolution), given in
00224 #  full resolution (unbinned) image coordinates. A particular ROI
00225 #  always denotes the same window of pixels on the camera sensor,
00226 #  regardless of binning settings.
00227 # The default setting of roi (all values 0) is considered the same as
00228 #  full resolution (roi.width = width, roi.height = height).
00229 RegionOfInterest roi
00230 
00231 ================================================================================
00232 MSG: sensor_msgs/RegionOfInterest
00233 # This message is used to specify a region of interest within an image.
00234 #
00235 # When used to specify the ROI setting of the camera when the image was
00236 # taken, the height and width fields should either match the height and
00237 # width fields for the associated image; or height = width = 0
00238 # indicates that the full resolution image was captured.
00239 
00240 uint32 x_offset  # Leftmost pixel of the ROI
00241                  # (0 if the ROI includes the left edge of the image)
00242 uint32 y_offset  # Topmost pixel of the ROI
00243                  # (0 if the ROI includes the top edge of the image)
00244 uint32 height    # Height of ROI
00245 uint32 width     # Width of ROI
00246 
00247 # True if a distinct rectified ROI should be calculated from the "raw"
00248 # ROI in this message. Typically this should be False if the full image
00249 # is captured (ROI not used), and True if a subwindow is captured (ROI
00250 # used).
00251 bool do_rectify
00252 
00253 ================================================================================
00254 MSG: sensor_msgs/PointCloud2
00255 # This message holds a collection of N-dimensional points, which may
00256 # contain additional information such as normals, intensity, etc. The
00257 # point data is stored as a binary blob, its layout described by the
00258 # contents of the "fields" array.
00259 
00260 # The point cloud data may be organized 2d (image-like) or 1d
00261 # (unordered). Point clouds organized as 2d images may be produced by
00262 # camera depth sensors such as stereo or time-of-flight.
00263 
00264 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00265 # points).
00266 Header header
00267 
00268 # 2D structure of the point cloud. If the cloud is unordered, height is
00269 # 1 and width is the length of the point cloud.
00270 uint32 height
00271 uint32 width
00272 
00273 # Describes the channels and their layout in the binary data blob.
00274 PointField[] fields
00275 
00276 bool    is_bigendian # Is this data bigendian?
00277 uint32  point_step   # Length of a point in bytes
00278 uint32  row_step     # Length of a row in bytes
00279 uint8[] data         # Actual point data, size is (row_step*height)
00280 
00281 bool is_dense        # True if there are no invalid points
00282 
00283 ================================================================================
00284 MSG: sensor_msgs/PointField
00285 # This message holds the description of one point entry in the
00286 # PointCloud2 message format.
00287 uint8 INT8    = 1
00288 uint8 UINT8   = 2
00289 uint8 INT16   = 3
00290 uint8 UINT16  = 4
00291 uint8 INT32   = 5
00292 uint8 UINT32  = 6
00293 uint8 FLOAT32 = 7
00294 uint8 FLOAT64 = 8
00295 
00296 string name      # Name of field
00297 uint32 offset    # Offset from start of point struct
00298 uint8  datatype  # Datatype enumeration, see above
00299 uint32 count     # How many elements in the field
00300 
00301 ================================================================================
00302 MSG: stereo_msgs/DisparityImage
00303 # Separate header for compatibility with current TimeSynchronizer.
00304 # Likely to be removed in a later release, use image.header instead.
00305 Header header
00306 
00307 # Floating point disparity image. The disparities are pre-adjusted for any
00308 # x-offset between the principal points of the two cameras (in the case
00309 # that they are verged). That is: d = x_l - x_r - (cx_l - cx_r)
00310 sensor_msgs/Image image
00311 
00312 # Stereo geometry. For disparity d, the depth from the camera is Z = fT/d.
00313 float32 f # Focal length, pixels
00314 float32 T # Baseline, world units
00315 
00316 # Subwindow of (potentially) valid disparity values.
00317 sensor_msgs/RegionOfInterest valid_window
00318 
00319 # The range of disparities searched.
00320 # In the disparity image, any disparity less than min_disparity is invalid.
00321 # The disparity search range defines the horopter, or 3D volume that the
00322 # stereo algorithm can "see". Points with Z outside of:
00323 #     Z_min = fT / max_disparity
00324 #     Z_max = fT / min_disparity
00325 # could not be found.
00326 float32 min_disparity
00327 float32 max_disparity
00328 
00329 # Smallest allowed disparity increment. The smallest achievable depth range
00330 # resolution is delta_Z = (Z^2/fT)*delta_d.
00331 float32 delta_d
00332 
00333 """
00334   __slots__ = ['header','goal_id','goal']
00335   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','object_segmentation_gui/ObjectSegmentationGuiGoal']
00336 
00337   def __init__(self, *args, **kwds):
00338     """
00339     Constructor. Any message fields that are implicitly/explicitly
00340     set to None will be assigned a default value. The recommend
00341     use is keyword arguments as this is more robust to future message
00342     changes.  You cannot mix in-order arguments and keyword arguments.
00343 
00344     The available fields are:
00345        header,goal_id,goal
00346 
00347     :param args: complete set of field values, in .msg order
00348     :param kwds: use keyword arguments corresponding to message field names
00349     to set specific fields.
00350     """
00351     if args or kwds:
00352       super(ObjectSegmentationGuiActionGoal, self).__init__(*args, **kwds)
00353       #message fields cannot be None, assign default values for those that are
00354       if self.header is None:
00355         self.header = std_msgs.msg.Header()
00356       if self.goal_id is None:
00357         self.goal_id = actionlib_msgs.msg.GoalID()
00358       if self.goal is None:
00359         self.goal = object_segmentation_gui.msg.ObjectSegmentationGuiGoal()
00360     else:
00361       self.header = std_msgs.msg.Header()
00362       self.goal_id = actionlib_msgs.msg.GoalID()
00363       self.goal = object_segmentation_gui.msg.ObjectSegmentationGuiGoal()
00364 
00365   def _get_types(self):
00366     """
00367     internal API method
00368     """
00369     return self._slot_types
00370 
00371   def serialize(self, buff):
00372     """
00373     serialize message into buffer
00374     :param buff: buffer, ``StringIO``
00375     """
00376     try:
00377       _x = self
00378       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00379       _x = self.header.frame_id
00380       length = len(_x)
00381       if python3 or type(_x) == unicode:
00382         _x = _x.encode('utf-8')
00383         length = len(_x)
00384       buff.write(struct.pack('<I%ss'%length, length, _x))
00385       _x = self
00386       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00387       _x = self.goal_id.id
00388       length = len(_x)
00389       if python3 or type(_x) == unicode:
00390         _x = _x.encode('utf-8')
00391         length = len(_x)
00392       buff.write(struct.pack('<I%ss'%length, length, _x))
00393       _x = self
00394       buff.write(_struct_3I.pack(_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs))
00395       _x = self.goal.image.header.frame_id
00396       length = len(_x)
00397       if python3 or type(_x) == unicode:
00398         _x = _x.encode('utf-8')
00399         length = len(_x)
00400       buff.write(struct.pack('<I%ss'%length, length, _x))
00401       _x = self
00402       buff.write(_struct_2I.pack(_x.goal.image.height, _x.goal.image.width))
00403       _x = self.goal.image.encoding
00404       length = len(_x)
00405       if python3 or type(_x) == unicode:
00406         _x = _x.encode('utf-8')
00407         length = len(_x)
00408       buff.write(struct.pack('<I%ss'%length, length, _x))
00409       _x = self
00410       buff.write(_struct_BI.pack(_x.goal.image.is_bigendian, _x.goal.image.step))
00411       _x = self.goal.image.data
00412       length = len(_x)
00413       # - if encoded as a list instead, serialize as bytes instead of string
00414       if type(_x) in [list, tuple]:
00415         buff.write(struct.pack('<I%sB'%length, length, *_x))
00416       else:
00417         buff.write(struct.pack('<I%ss'%length, length, _x))
00418       _x = self
00419       buff.write(_struct_3I.pack(_x.goal.camera_info.header.seq, _x.goal.camera_info.header.stamp.secs, _x.goal.camera_info.header.stamp.nsecs))
00420       _x = self.goal.camera_info.header.frame_id
00421       length = len(_x)
00422       if python3 or type(_x) == unicode:
00423         _x = _x.encode('utf-8')
00424         length = len(_x)
00425       buff.write(struct.pack('<I%ss'%length, length, _x))
00426       _x = self
00427       buff.write(_struct_2I.pack(_x.goal.camera_info.height, _x.goal.camera_info.width))
00428       _x = self.goal.camera_info.distortion_model
00429       length = len(_x)
00430       if python3 or type(_x) == unicode:
00431         _x = _x.encode('utf-8')
00432         length = len(_x)
00433       buff.write(struct.pack('<I%ss'%length, length, _x))
00434       length = len(self.goal.camera_info.D)
00435       buff.write(_struct_I.pack(length))
00436       pattern = '<%sd'%length
00437       buff.write(struct.pack(pattern, *self.goal.camera_info.D))
00438       buff.write(_struct_9d.pack(*self.goal.camera_info.K))
00439       buff.write(_struct_9d.pack(*self.goal.camera_info.R))
00440       buff.write(_struct_12d.pack(*self.goal.camera_info.P))
00441       _x = self
00442       buff.write(_struct_6IB3I.pack(_x.goal.camera_info.binning_x, _x.goal.camera_info.binning_y, _x.goal.camera_info.roi.x_offset, _x.goal.camera_info.roi.y_offset, _x.goal.camera_info.roi.height, _x.goal.camera_info.roi.width, _x.goal.camera_info.roi.do_rectify, _x.goal.wide_field.header.seq, _x.goal.wide_field.header.stamp.secs, _x.goal.wide_field.header.stamp.nsecs))
00443       _x = self.goal.wide_field.header.frame_id
00444       length = len(_x)
00445       if python3 or type(_x) == unicode:
00446         _x = _x.encode('utf-8')
00447         length = len(_x)
00448       buff.write(struct.pack('<I%ss'%length, length, _x))
00449       _x = self
00450       buff.write(_struct_2I.pack(_x.goal.wide_field.height, _x.goal.wide_field.width))
00451       _x = self.goal.wide_field.encoding
00452       length = len(_x)
00453       if python3 or type(_x) == unicode:
00454         _x = _x.encode('utf-8')
00455         length = len(_x)
00456       buff.write(struct.pack('<I%ss'%length, length, _x))
00457       _x = self
00458       buff.write(_struct_BI.pack(_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step))
00459       _x = self.goal.wide_field.data
00460       length = len(_x)
00461       # - if encoded as a list instead, serialize as bytes instead of string
00462       if type(_x) in [list, tuple]:
00463         buff.write(struct.pack('<I%sB'%length, length, *_x))
00464       else:
00465         buff.write(struct.pack('<I%ss'%length, length, _x))
00466       _x = self
00467       buff.write(_struct_3I.pack(_x.goal.wide_camera_info.header.seq, _x.goal.wide_camera_info.header.stamp.secs, _x.goal.wide_camera_info.header.stamp.nsecs))
00468       _x = self.goal.wide_camera_info.header.frame_id
00469       length = len(_x)
00470       if python3 or type(_x) == unicode:
00471         _x = _x.encode('utf-8')
00472         length = len(_x)
00473       buff.write(struct.pack('<I%ss'%length, length, _x))
00474       _x = self
00475       buff.write(_struct_2I.pack(_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width))
00476       _x = self.goal.wide_camera_info.distortion_model
00477       length = len(_x)
00478       if python3 or type(_x) == unicode:
00479         _x = _x.encode('utf-8')
00480         length = len(_x)
00481       buff.write(struct.pack('<I%ss'%length, length, _x))
00482       length = len(self.goal.wide_camera_info.D)
00483       buff.write(_struct_I.pack(length))
00484       pattern = '<%sd'%length
00485       buff.write(struct.pack(pattern, *self.goal.wide_camera_info.D))
00486       buff.write(_struct_9d.pack(*self.goal.wide_camera_info.K))
00487       buff.write(_struct_9d.pack(*self.goal.wide_camera_info.R))
00488       buff.write(_struct_12d.pack(*self.goal.wide_camera_info.P))
00489       _x = self
00490       buff.write(_struct_6IB3I.pack(_x.goal.wide_camera_info.binning_x, _x.goal.wide_camera_info.binning_y, _x.goal.wide_camera_info.roi.x_offset, _x.goal.wide_camera_info.roi.y_offset, _x.goal.wide_camera_info.roi.height, _x.goal.wide_camera_info.roi.width, _x.goal.wide_camera_info.roi.do_rectify, _x.goal.point_cloud.header.seq, _x.goal.point_cloud.header.stamp.secs, _x.goal.point_cloud.header.stamp.nsecs))
00491       _x = self.goal.point_cloud.header.frame_id
00492       length = len(_x)
00493       if python3 or type(_x) == unicode:
00494         _x = _x.encode('utf-8')
00495         length = len(_x)
00496       buff.write(struct.pack('<I%ss'%length, length, _x))
00497       _x = self
00498       buff.write(_struct_2I.pack(_x.goal.point_cloud.height, _x.goal.point_cloud.width))
00499       length = len(self.goal.point_cloud.fields)
00500       buff.write(_struct_I.pack(length))
00501       for val1 in self.goal.point_cloud.fields:
00502         _x = val1.name
00503         length = len(_x)
00504         if python3 or type(_x) == unicode:
00505           _x = _x.encode('utf-8')
00506           length = len(_x)
00507         buff.write(struct.pack('<I%ss'%length, length, _x))
00508         _x = val1
00509         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00510       _x = self
00511       buff.write(_struct_B2I.pack(_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step))
00512       _x = self.goal.point_cloud.data
00513       length = len(_x)
00514       # - if encoded as a list instead, serialize as bytes instead of string
00515       if type(_x) in [list, tuple]:
00516         buff.write(struct.pack('<I%sB'%length, length, *_x))
00517       else:
00518         buff.write(struct.pack('<I%ss'%length, length, _x))
00519       _x = self
00520       buff.write(_struct_B3I.pack(_x.goal.point_cloud.is_dense, _x.goal.disparity_image.header.seq, _x.goal.disparity_image.header.stamp.secs, _x.goal.disparity_image.header.stamp.nsecs))
00521       _x = self.goal.disparity_image.header.frame_id
00522       length = len(_x)
00523       if python3 or type(_x) == unicode:
00524         _x = _x.encode('utf-8')
00525         length = len(_x)
00526       buff.write(struct.pack('<I%ss'%length, length, _x))
00527       _x = self
00528       buff.write(_struct_3I.pack(_x.goal.disparity_image.image.header.seq, _x.goal.disparity_image.image.header.stamp.secs, _x.goal.disparity_image.image.header.stamp.nsecs))
00529       _x = self.goal.disparity_image.image.header.frame_id
00530       length = len(_x)
00531       if python3 or type(_x) == unicode:
00532         _x = _x.encode('utf-8')
00533         length = len(_x)
00534       buff.write(struct.pack('<I%ss'%length, length, _x))
00535       _x = self
00536       buff.write(_struct_2I.pack(_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width))
00537       _x = self.goal.disparity_image.image.encoding
00538       length = len(_x)
00539       if python3 or type(_x) == unicode:
00540         _x = _x.encode('utf-8')
00541         length = len(_x)
00542       buff.write(struct.pack('<I%ss'%length, length, _x))
00543       _x = self
00544       buff.write(_struct_BI.pack(_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step))
00545       _x = self.goal.disparity_image.image.data
00546       length = len(_x)
00547       # - if encoded as a list instead, serialize as bytes instead of string
00548       if type(_x) in [list, tuple]:
00549         buff.write(struct.pack('<I%sB'%length, length, *_x))
00550       else:
00551         buff.write(struct.pack('<I%ss'%length, length, _x))
00552       _x = self
00553       buff.write(_struct_2f4IB3f.pack(_x.goal.disparity_image.f, _x.goal.disparity_image.T, _x.goal.disparity_image.valid_window.x_offset, _x.goal.disparity_image.valid_window.y_offset, _x.goal.disparity_image.valid_window.height, _x.goal.disparity_image.valid_window.width, _x.goal.disparity_image.valid_window.do_rectify, _x.goal.disparity_image.min_disparity, _x.goal.disparity_image.max_disparity, _x.goal.disparity_image.delta_d))
00554     except struct.error as se: self._check_types(se)
00555     except TypeError as te: self._check_types(te)
00556 
00557   def deserialize(self, str):
00558     """
00559     unpack serialized message in str into this message instance
00560     :param str: byte array of serialized message, ``str``
00561     """
00562     try:
00563       if self.header is None:
00564         self.header = std_msgs.msg.Header()
00565       if self.goal_id is None:
00566         self.goal_id = actionlib_msgs.msg.GoalID()
00567       if self.goal is None:
00568         self.goal = object_segmentation_gui.msg.ObjectSegmentationGuiGoal()
00569       end = 0
00570       _x = self
00571       start = end
00572       end += 12
00573       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00574       start = end
00575       end += 4
00576       (length,) = _struct_I.unpack(str[start:end])
00577       start = end
00578       end += length
00579       if python3:
00580         self.header.frame_id = str[start:end].decode('utf-8')
00581       else:
00582         self.header.frame_id = str[start:end]
00583       _x = self
00584       start = end
00585       end += 8
00586       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00587       start = end
00588       end += 4
00589       (length,) = _struct_I.unpack(str[start:end])
00590       start = end
00591       end += length
00592       if python3:
00593         self.goal_id.id = str[start:end].decode('utf-8')
00594       else:
00595         self.goal_id.id = str[start:end]
00596       _x = self
00597       start = end
00598       end += 12
00599       (_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00600       start = end
00601       end += 4
00602       (length,) = _struct_I.unpack(str[start:end])
00603       start = end
00604       end += length
00605       if python3:
00606         self.goal.image.header.frame_id = str[start:end].decode('utf-8')
00607       else:
00608         self.goal.image.header.frame_id = str[start:end]
00609       _x = self
00610       start = end
00611       end += 8
00612       (_x.goal.image.height, _x.goal.image.width,) = _struct_2I.unpack(str[start:end])
00613       start = end
00614       end += 4
00615       (length,) = _struct_I.unpack(str[start:end])
00616       start = end
00617       end += length
00618       if python3:
00619         self.goal.image.encoding = str[start:end].decode('utf-8')
00620       else:
00621         self.goal.image.encoding = str[start:end]
00622       _x = self
00623       start = end
00624       end += 5
00625       (_x.goal.image.is_bigendian, _x.goal.image.step,) = _struct_BI.unpack(str[start:end])
00626       start = end
00627       end += 4
00628       (length,) = _struct_I.unpack(str[start:end])
00629       start = end
00630       end += length
00631       if python3:
00632         self.goal.image.data = str[start:end].decode('utf-8')
00633       else:
00634         self.goal.image.data = str[start:end]
00635       _x = self
00636       start = end
00637       end += 12
00638       (_x.goal.camera_info.header.seq, _x.goal.camera_info.header.stamp.secs, _x.goal.camera_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00639       start = end
00640       end += 4
00641       (length,) = _struct_I.unpack(str[start:end])
00642       start = end
00643       end += length
00644       if python3:
00645         self.goal.camera_info.header.frame_id = str[start:end].decode('utf-8')
00646       else:
00647         self.goal.camera_info.header.frame_id = str[start:end]
00648       _x = self
00649       start = end
00650       end += 8
00651       (_x.goal.camera_info.height, _x.goal.camera_info.width,) = _struct_2I.unpack(str[start:end])
00652       start = end
00653       end += 4
00654       (length,) = _struct_I.unpack(str[start:end])
00655       start = end
00656       end += length
00657       if python3:
00658         self.goal.camera_info.distortion_model = str[start:end].decode('utf-8')
00659       else:
00660         self.goal.camera_info.distortion_model = str[start:end]
00661       start = end
00662       end += 4
00663       (length,) = _struct_I.unpack(str[start:end])
00664       pattern = '<%sd'%length
00665       start = end
00666       end += struct.calcsize(pattern)
00667       self.goal.camera_info.D = struct.unpack(pattern, str[start:end])
00668       start = end
00669       end += 72
00670       self.goal.camera_info.K = _struct_9d.unpack(str[start:end])
00671       start = end
00672       end += 72
00673       self.goal.camera_info.R = _struct_9d.unpack(str[start:end])
00674       start = end
00675       end += 96
00676       self.goal.camera_info.P = _struct_12d.unpack(str[start:end])
00677       _x = self
00678       start = end
00679       end += 37
00680       (_x.goal.camera_info.binning_x, _x.goal.camera_info.binning_y, _x.goal.camera_info.roi.x_offset, _x.goal.camera_info.roi.y_offset, _x.goal.camera_info.roi.height, _x.goal.camera_info.roi.width, _x.goal.camera_info.roi.do_rectify, _x.goal.wide_field.header.seq, _x.goal.wide_field.header.stamp.secs, _x.goal.wide_field.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
00681       self.goal.camera_info.roi.do_rectify = bool(self.goal.camera_info.roi.do_rectify)
00682       start = end
00683       end += 4
00684       (length,) = _struct_I.unpack(str[start:end])
00685       start = end
00686       end += length
00687       if python3:
00688         self.goal.wide_field.header.frame_id = str[start:end].decode('utf-8')
00689       else:
00690         self.goal.wide_field.header.frame_id = str[start:end]
00691       _x = self
00692       start = end
00693       end += 8
00694       (_x.goal.wide_field.height, _x.goal.wide_field.width,) = _struct_2I.unpack(str[start:end])
00695       start = end
00696       end += 4
00697       (length,) = _struct_I.unpack(str[start:end])
00698       start = end
00699       end += length
00700       if python3:
00701         self.goal.wide_field.encoding = str[start:end].decode('utf-8')
00702       else:
00703         self.goal.wide_field.encoding = str[start:end]
00704       _x = self
00705       start = end
00706       end += 5
00707       (_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step,) = _struct_BI.unpack(str[start:end])
00708       start = end
00709       end += 4
00710       (length,) = _struct_I.unpack(str[start:end])
00711       start = end
00712       end += length
00713       if python3:
00714         self.goal.wide_field.data = str[start:end].decode('utf-8')
00715       else:
00716         self.goal.wide_field.data = str[start:end]
00717       _x = self
00718       start = end
00719       end += 12
00720       (_x.goal.wide_camera_info.header.seq, _x.goal.wide_camera_info.header.stamp.secs, _x.goal.wide_camera_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00721       start = end
00722       end += 4
00723       (length,) = _struct_I.unpack(str[start:end])
00724       start = end
00725       end += length
00726       if python3:
00727         self.goal.wide_camera_info.header.frame_id = str[start:end].decode('utf-8')
00728       else:
00729         self.goal.wide_camera_info.header.frame_id = str[start:end]
00730       _x = self
00731       start = end
00732       end += 8
00733       (_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width,) = _struct_2I.unpack(str[start:end])
00734       start = end
00735       end += 4
00736       (length,) = _struct_I.unpack(str[start:end])
00737       start = end
00738       end += length
00739       if python3:
00740         self.goal.wide_camera_info.distortion_model = str[start:end].decode('utf-8')
00741       else:
00742         self.goal.wide_camera_info.distortion_model = str[start:end]
00743       start = end
00744       end += 4
00745       (length,) = _struct_I.unpack(str[start:end])
00746       pattern = '<%sd'%length
00747       start = end
00748       end += struct.calcsize(pattern)
00749       self.goal.wide_camera_info.D = struct.unpack(pattern, str[start:end])
00750       start = end
00751       end += 72
00752       self.goal.wide_camera_info.K = _struct_9d.unpack(str[start:end])
00753       start = end
00754       end += 72
00755       self.goal.wide_camera_info.R = _struct_9d.unpack(str[start:end])
00756       start = end
00757       end += 96
00758       self.goal.wide_camera_info.P = _struct_12d.unpack(str[start:end])
00759       _x = self
00760       start = end
00761       end += 37
00762       (_x.goal.wide_camera_info.binning_x, _x.goal.wide_camera_info.binning_y, _x.goal.wide_camera_info.roi.x_offset, _x.goal.wide_camera_info.roi.y_offset, _x.goal.wide_camera_info.roi.height, _x.goal.wide_camera_info.roi.width, _x.goal.wide_camera_info.roi.do_rectify, _x.goal.point_cloud.header.seq, _x.goal.point_cloud.header.stamp.secs, _x.goal.point_cloud.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
00763       self.goal.wide_camera_info.roi.do_rectify = bool(self.goal.wide_camera_info.roi.do_rectify)
00764       start = end
00765       end += 4
00766       (length,) = _struct_I.unpack(str[start:end])
00767       start = end
00768       end += length
00769       if python3:
00770         self.goal.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00771       else:
00772         self.goal.point_cloud.header.frame_id = str[start:end]
00773       _x = self
00774       start = end
00775       end += 8
00776       (_x.goal.point_cloud.height, _x.goal.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00777       start = end
00778       end += 4
00779       (length,) = _struct_I.unpack(str[start:end])
00780       self.goal.point_cloud.fields = []
00781       for i in range(0, length):
00782         val1 = sensor_msgs.msg.PointField()
00783         start = end
00784         end += 4
00785         (length,) = _struct_I.unpack(str[start:end])
00786         start = end
00787         end += length
00788         if python3:
00789           val1.name = str[start:end].decode('utf-8')
00790         else:
00791           val1.name = str[start:end]
00792         _x = val1
00793         start = end
00794         end += 9
00795         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00796         self.goal.point_cloud.fields.append(val1)
00797       _x = self
00798       start = end
00799       end += 9
00800       (_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00801       self.goal.point_cloud.is_bigendian = bool(self.goal.point_cloud.is_bigendian)
00802       start = end
00803       end += 4
00804       (length,) = _struct_I.unpack(str[start:end])
00805       start = end
00806       end += length
00807       if python3:
00808         self.goal.point_cloud.data = str[start:end].decode('utf-8')
00809       else:
00810         self.goal.point_cloud.data = str[start:end]
00811       _x = self
00812       start = end
00813       end += 13
00814       (_x.goal.point_cloud.is_dense, _x.goal.disparity_image.header.seq, _x.goal.disparity_image.header.stamp.secs, _x.goal.disparity_image.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00815       self.goal.point_cloud.is_dense = bool(self.goal.point_cloud.is_dense)
00816       start = end
00817       end += 4
00818       (length,) = _struct_I.unpack(str[start:end])
00819       start = end
00820       end += length
00821       if python3:
00822         self.goal.disparity_image.header.frame_id = str[start:end].decode('utf-8')
00823       else:
00824         self.goal.disparity_image.header.frame_id = str[start:end]
00825       _x = self
00826       start = end
00827       end += 12
00828       (_x.goal.disparity_image.image.header.seq, _x.goal.disparity_image.image.header.stamp.secs, _x.goal.disparity_image.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00829       start = end
00830       end += 4
00831       (length,) = _struct_I.unpack(str[start:end])
00832       start = end
00833       end += length
00834       if python3:
00835         self.goal.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
00836       else:
00837         self.goal.disparity_image.image.header.frame_id = str[start:end]
00838       _x = self
00839       start = end
00840       end += 8
00841       (_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
00842       start = end
00843       end += 4
00844       (length,) = _struct_I.unpack(str[start:end])
00845       start = end
00846       end += length
00847       if python3:
00848         self.goal.disparity_image.image.encoding = str[start:end].decode('utf-8')
00849       else:
00850         self.goal.disparity_image.image.encoding = str[start:end]
00851       _x = self
00852       start = end
00853       end += 5
00854       (_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
00855       start = end
00856       end += 4
00857       (length,) = _struct_I.unpack(str[start:end])
00858       start = end
00859       end += length
00860       if python3:
00861         self.goal.disparity_image.image.data = str[start:end].decode('utf-8')
00862       else:
00863         self.goal.disparity_image.image.data = str[start:end]
00864       _x = self
00865       start = end
00866       end += 37
00867       (_x.goal.disparity_image.f, _x.goal.disparity_image.T, _x.goal.disparity_image.valid_window.x_offset, _x.goal.disparity_image.valid_window.y_offset, _x.goal.disparity_image.valid_window.height, _x.goal.disparity_image.valid_window.width, _x.goal.disparity_image.valid_window.do_rectify, _x.goal.disparity_image.min_disparity, _x.goal.disparity_image.max_disparity, _x.goal.disparity_image.delta_d,) = _struct_2f4IB3f.unpack(str[start:end])
00868       self.goal.disparity_image.valid_window.do_rectify = bool(self.goal.disparity_image.valid_window.do_rectify)
00869       return self
00870     except struct.error as e:
00871       raise genpy.DeserializationError(e) #most likely buffer underfill
00872 
00873 
00874   def serialize_numpy(self, buff, numpy):
00875     """
00876     serialize message with numpy array types into buffer
00877     :param buff: buffer, ``StringIO``
00878     :param numpy: numpy python module
00879     """
00880     try:
00881       _x = self
00882       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00883       _x = self.header.frame_id
00884       length = len(_x)
00885       if python3 or type(_x) == unicode:
00886         _x = _x.encode('utf-8')
00887         length = len(_x)
00888       buff.write(struct.pack('<I%ss'%length, length, _x))
00889       _x = self
00890       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00891       _x = self.goal_id.id
00892       length = len(_x)
00893       if python3 or type(_x) == unicode:
00894         _x = _x.encode('utf-8')
00895         length = len(_x)
00896       buff.write(struct.pack('<I%ss'%length, length, _x))
00897       _x = self
00898       buff.write(_struct_3I.pack(_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs))
00899       _x = self.goal.image.header.frame_id
00900       length = len(_x)
00901       if python3 or type(_x) == unicode:
00902         _x = _x.encode('utf-8')
00903         length = len(_x)
00904       buff.write(struct.pack('<I%ss'%length, length, _x))
00905       _x = self
00906       buff.write(_struct_2I.pack(_x.goal.image.height, _x.goal.image.width))
00907       _x = self.goal.image.encoding
00908       length = len(_x)
00909       if python3 or type(_x) == unicode:
00910         _x = _x.encode('utf-8')
00911         length = len(_x)
00912       buff.write(struct.pack('<I%ss'%length, length, _x))
00913       _x = self
00914       buff.write(_struct_BI.pack(_x.goal.image.is_bigendian, _x.goal.image.step))
00915       _x = self.goal.image.data
00916       length = len(_x)
00917       # - if encoded as a list instead, serialize as bytes instead of string
00918       if type(_x) in [list, tuple]:
00919         buff.write(struct.pack('<I%sB'%length, length, *_x))
00920       else:
00921         buff.write(struct.pack('<I%ss'%length, length, _x))
00922       _x = self
00923       buff.write(_struct_3I.pack(_x.goal.camera_info.header.seq, _x.goal.camera_info.header.stamp.secs, _x.goal.camera_info.header.stamp.nsecs))
00924       _x = self.goal.camera_info.header.frame_id
00925       length = len(_x)
00926       if python3 or type(_x) == unicode:
00927         _x = _x.encode('utf-8')
00928         length = len(_x)
00929       buff.write(struct.pack('<I%ss'%length, length, _x))
00930       _x = self
00931       buff.write(_struct_2I.pack(_x.goal.camera_info.height, _x.goal.camera_info.width))
00932       _x = self.goal.camera_info.distortion_model
00933       length = len(_x)
00934       if python3 or type(_x) == unicode:
00935         _x = _x.encode('utf-8')
00936         length = len(_x)
00937       buff.write(struct.pack('<I%ss'%length, length, _x))
00938       length = len(self.goal.camera_info.D)
00939       buff.write(_struct_I.pack(length))
00940       pattern = '<%sd'%length
00941       buff.write(self.goal.camera_info.D.tostring())
00942       buff.write(self.goal.camera_info.K.tostring())
00943       buff.write(self.goal.camera_info.R.tostring())
00944       buff.write(self.goal.camera_info.P.tostring())
00945       _x = self
00946       buff.write(_struct_6IB3I.pack(_x.goal.camera_info.binning_x, _x.goal.camera_info.binning_y, _x.goal.camera_info.roi.x_offset, _x.goal.camera_info.roi.y_offset, _x.goal.camera_info.roi.height, _x.goal.camera_info.roi.width, _x.goal.camera_info.roi.do_rectify, _x.goal.wide_field.header.seq, _x.goal.wide_field.header.stamp.secs, _x.goal.wide_field.header.stamp.nsecs))
00947       _x = self.goal.wide_field.header.frame_id
00948       length = len(_x)
00949       if python3 or type(_x) == unicode:
00950         _x = _x.encode('utf-8')
00951         length = len(_x)
00952       buff.write(struct.pack('<I%ss'%length, length, _x))
00953       _x = self
00954       buff.write(_struct_2I.pack(_x.goal.wide_field.height, _x.goal.wide_field.width))
00955       _x = self.goal.wide_field.encoding
00956       length = len(_x)
00957       if python3 or type(_x) == unicode:
00958         _x = _x.encode('utf-8')
00959         length = len(_x)
00960       buff.write(struct.pack('<I%ss'%length, length, _x))
00961       _x = self
00962       buff.write(_struct_BI.pack(_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step))
00963       _x = self.goal.wide_field.data
00964       length = len(_x)
00965       # - if encoded as a list instead, serialize as bytes instead of string
00966       if type(_x) in [list, tuple]:
00967         buff.write(struct.pack('<I%sB'%length, length, *_x))
00968       else:
00969         buff.write(struct.pack('<I%ss'%length, length, _x))
00970       _x = self
00971       buff.write(_struct_3I.pack(_x.goal.wide_camera_info.header.seq, _x.goal.wide_camera_info.header.stamp.secs, _x.goal.wide_camera_info.header.stamp.nsecs))
00972       _x = self.goal.wide_camera_info.header.frame_id
00973       length = len(_x)
00974       if python3 or type(_x) == unicode:
00975         _x = _x.encode('utf-8')
00976         length = len(_x)
00977       buff.write(struct.pack('<I%ss'%length, length, _x))
00978       _x = self
00979       buff.write(_struct_2I.pack(_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width))
00980       _x = self.goal.wide_camera_info.distortion_model
00981       length = len(_x)
00982       if python3 or type(_x) == unicode:
00983         _x = _x.encode('utf-8')
00984         length = len(_x)
00985       buff.write(struct.pack('<I%ss'%length, length, _x))
00986       length = len(self.goal.wide_camera_info.D)
00987       buff.write(_struct_I.pack(length))
00988       pattern = '<%sd'%length
00989       buff.write(self.goal.wide_camera_info.D.tostring())
00990       buff.write(self.goal.wide_camera_info.K.tostring())
00991       buff.write(self.goal.wide_camera_info.R.tostring())
00992       buff.write(self.goal.wide_camera_info.P.tostring())
00993       _x = self
00994       buff.write(_struct_6IB3I.pack(_x.goal.wide_camera_info.binning_x, _x.goal.wide_camera_info.binning_y, _x.goal.wide_camera_info.roi.x_offset, _x.goal.wide_camera_info.roi.y_offset, _x.goal.wide_camera_info.roi.height, _x.goal.wide_camera_info.roi.width, _x.goal.wide_camera_info.roi.do_rectify, _x.goal.point_cloud.header.seq, _x.goal.point_cloud.header.stamp.secs, _x.goal.point_cloud.header.stamp.nsecs))
00995       _x = self.goal.point_cloud.header.frame_id
00996       length = len(_x)
00997       if python3 or type(_x) == unicode:
00998         _x = _x.encode('utf-8')
00999         length = len(_x)
01000       buff.write(struct.pack('<I%ss'%length, length, _x))
01001       _x = self
01002       buff.write(_struct_2I.pack(_x.goal.point_cloud.height, _x.goal.point_cloud.width))
01003       length = len(self.goal.point_cloud.fields)
01004       buff.write(_struct_I.pack(length))
01005       for val1 in self.goal.point_cloud.fields:
01006         _x = val1.name
01007         length = len(_x)
01008         if python3 or type(_x) == unicode:
01009           _x = _x.encode('utf-8')
01010           length = len(_x)
01011         buff.write(struct.pack('<I%ss'%length, length, _x))
01012         _x = val1
01013         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01014       _x = self
01015       buff.write(_struct_B2I.pack(_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step))
01016       _x = self.goal.point_cloud.data
01017       length = len(_x)
01018       # - if encoded as a list instead, serialize as bytes instead of string
01019       if type(_x) in [list, tuple]:
01020         buff.write(struct.pack('<I%sB'%length, length, *_x))
01021       else:
01022         buff.write(struct.pack('<I%ss'%length, length, _x))
01023       _x = self
01024       buff.write(_struct_B3I.pack(_x.goal.point_cloud.is_dense, _x.goal.disparity_image.header.seq, _x.goal.disparity_image.header.stamp.secs, _x.goal.disparity_image.header.stamp.nsecs))
01025       _x = self.goal.disparity_image.header.frame_id
01026       length = len(_x)
01027       if python3 or type(_x) == unicode:
01028         _x = _x.encode('utf-8')
01029         length = len(_x)
01030       buff.write(struct.pack('<I%ss'%length, length, _x))
01031       _x = self
01032       buff.write(_struct_3I.pack(_x.goal.disparity_image.image.header.seq, _x.goal.disparity_image.image.header.stamp.secs, _x.goal.disparity_image.image.header.stamp.nsecs))
01033       _x = self.goal.disparity_image.image.header.frame_id
01034       length = len(_x)
01035       if python3 or type(_x) == unicode:
01036         _x = _x.encode('utf-8')
01037         length = len(_x)
01038       buff.write(struct.pack('<I%ss'%length, length, _x))
01039       _x = self
01040       buff.write(_struct_2I.pack(_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width))
01041       _x = self.goal.disparity_image.image.encoding
01042       length = len(_x)
01043       if python3 or type(_x) == unicode:
01044         _x = _x.encode('utf-8')
01045         length = len(_x)
01046       buff.write(struct.pack('<I%ss'%length, length, _x))
01047       _x = self
01048       buff.write(_struct_BI.pack(_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step))
01049       _x = self.goal.disparity_image.image.data
01050       length = len(_x)
01051       # - if encoded as a list instead, serialize as bytes instead of string
01052       if type(_x) in [list, tuple]:
01053         buff.write(struct.pack('<I%sB'%length, length, *_x))
01054       else:
01055         buff.write(struct.pack('<I%ss'%length, length, _x))
01056       _x = self
01057       buff.write(_struct_2f4IB3f.pack(_x.goal.disparity_image.f, _x.goal.disparity_image.T, _x.goal.disparity_image.valid_window.x_offset, _x.goal.disparity_image.valid_window.y_offset, _x.goal.disparity_image.valid_window.height, _x.goal.disparity_image.valid_window.width, _x.goal.disparity_image.valid_window.do_rectify, _x.goal.disparity_image.min_disparity, _x.goal.disparity_image.max_disparity, _x.goal.disparity_image.delta_d))
01058     except struct.error as se: self._check_types(se)
01059     except TypeError as te: self._check_types(te)
01060 
01061   def deserialize_numpy(self, str, numpy):
01062     """
01063     unpack serialized message in str into this message instance using numpy for array types
01064     :param str: byte array of serialized message, ``str``
01065     :param numpy: numpy python module
01066     """
01067     try:
01068       if self.header is None:
01069         self.header = std_msgs.msg.Header()
01070       if self.goal_id is None:
01071         self.goal_id = actionlib_msgs.msg.GoalID()
01072       if self.goal is None:
01073         self.goal = object_segmentation_gui.msg.ObjectSegmentationGuiGoal()
01074       end = 0
01075       _x = self
01076       start = end
01077       end += 12
01078       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01079       start = end
01080       end += 4
01081       (length,) = _struct_I.unpack(str[start:end])
01082       start = end
01083       end += length
01084       if python3:
01085         self.header.frame_id = str[start:end].decode('utf-8')
01086       else:
01087         self.header.frame_id = str[start:end]
01088       _x = self
01089       start = end
01090       end += 8
01091       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
01092       start = end
01093       end += 4
01094       (length,) = _struct_I.unpack(str[start:end])
01095       start = end
01096       end += length
01097       if python3:
01098         self.goal_id.id = str[start:end].decode('utf-8')
01099       else:
01100         self.goal_id.id = str[start:end]
01101       _x = self
01102       start = end
01103       end += 12
01104       (_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01105       start = end
01106       end += 4
01107       (length,) = _struct_I.unpack(str[start:end])
01108       start = end
01109       end += length
01110       if python3:
01111         self.goal.image.header.frame_id = str[start:end].decode('utf-8')
01112       else:
01113         self.goal.image.header.frame_id = str[start:end]
01114       _x = self
01115       start = end
01116       end += 8
01117       (_x.goal.image.height, _x.goal.image.width,) = _struct_2I.unpack(str[start:end])
01118       start = end
01119       end += 4
01120       (length,) = _struct_I.unpack(str[start:end])
01121       start = end
01122       end += length
01123       if python3:
01124         self.goal.image.encoding = str[start:end].decode('utf-8')
01125       else:
01126         self.goal.image.encoding = str[start:end]
01127       _x = self
01128       start = end
01129       end += 5
01130       (_x.goal.image.is_bigendian, _x.goal.image.step,) = _struct_BI.unpack(str[start:end])
01131       start = end
01132       end += 4
01133       (length,) = _struct_I.unpack(str[start:end])
01134       start = end
01135       end += length
01136       if python3:
01137         self.goal.image.data = str[start:end].decode('utf-8')
01138       else:
01139         self.goal.image.data = str[start:end]
01140       _x = self
01141       start = end
01142       end += 12
01143       (_x.goal.camera_info.header.seq, _x.goal.camera_info.header.stamp.secs, _x.goal.camera_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01144       start = end
01145       end += 4
01146       (length,) = _struct_I.unpack(str[start:end])
01147       start = end
01148       end += length
01149       if python3:
01150         self.goal.camera_info.header.frame_id = str[start:end].decode('utf-8')
01151       else:
01152         self.goal.camera_info.header.frame_id = str[start:end]
01153       _x = self
01154       start = end
01155       end += 8
01156       (_x.goal.camera_info.height, _x.goal.camera_info.width,) = _struct_2I.unpack(str[start:end])
01157       start = end
01158       end += 4
01159       (length,) = _struct_I.unpack(str[start:end])
01160       start = end
01161       end += length
01162       if python3:
01163         self.goal.camera_info.distortion_model = str[start:end].decode('utf-8')
01164       else:
01165         self.goal.camera_info.distortion_model = str[start:end]
01166       start = end
01167       end += 4
01168       (length,) = _struct_I.unpack(str[start:end])
01169       pattern = '<%sd'%length
01170       start = end
01171       end += struct.calcsize(pattern)
01172       self.goal.camera_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01173       start = end
01174       end += 72
01175       self.goal.camera_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01176       start = end
01177       end += 72
01178       self.goal.camera_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01179       start = end
01180       end += 96
01181       self.goal.camera_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01182       _x = self
01183       start = end
01184       end += 37
01185       (_x.goal.camera_info.binning_x, _x.goal.camera_info.binning_y, _x.goal.camera_info.roi.x_offset, _x.goal.camera_info.roi.y_offset, _x.goal.camera_info.roi.height, _x.goal.camera_info.roi.width, _x.goal.camera_info.roi.do_rectify, _x.goal.wide_field.header.seq, _x.goal.wide_field.header.stamp.secs, _x.goal.wide_field.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01186       self.goal.camera_info.roi.do_rectify = bool(self.goal.camera_info.roi.do_rectify)
01187       start = end
01188       end += 4
01189       (length,) = _struct_I.unpack(str[start:end])
01190       start = end
01191       end += length
01192       if python3:
01193         self.goal.wide_field.header.frame_id = str[start:end].decode('utf-8')
01194       else:
01195         self.goal.wide_field.header.frame_id = str[start:end]
01196       _x = self
01197       start = end
01198       end += 8
01199       (_x.goal.wide_field.height, _x.goal.wide_field.width,) = _struct_2I.unpack(str[start:end])
01200       start = end
01201       end += 4
01202       (length,) = _struct_I.unpack(str[start:end])
01203       start = end
01204       end += length
01205       if python3:
01206         self.goal.wide_field.encoding = str[start:end].decode('utf-8')
01207       else:
01208         self.goal.wide_field.encoding = str[start:end]
01209       _x = self
01210       start = end
01211       end += 5
01212       (_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step,) = _struct_BI.unpack(str[start:end])
01213       start = end
01214       end += 4
01215       (length,) = _struct_I.unpack(str[start:end])
01216       start = end
01217       end += length
01218       if python3:
01219         self.goal.wide_field.data = str[start:end].decode('utf-8')
01220       else:
01221         self.goal.wide_field.data = str[start:end]
01222       _x = self
01223       start = end
01224       end += 12
01225       (_x.goal.wide_camera_info.header.seq, _x.goal.wide_camera_info.header.stamp.secs, _x.goal.wide_camera_info.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01226       start = end
01227       end += 4
01228       (length,) = _struct_I.unpack(str[start:end])
01229       start = end
01230       end += length
01231       if python3:
01232         self.goal.wide_camera_info.header.frame_id = str[start:end].decode('utf-8')
01233       else:
01234         self.goal.wide_camera_info.header.frame_id = str[start:end]
01235       _x = self
01236       start = end
01237       end += 8
01238       (_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width,) = _struct_2I.unpack(str[start:end])
01239       start = end
01240       end += 4
01241       (length,) = _struct_I.unpack(str[start:end])
01242       start = end
01243       end += length
01244       if python3:
01245         self.goal.wide_camera_info.distortion_model = str[start:end].decode('utf-8')
01246       else:
01247         self.goal.wide_camera_info.distortion_model = str[start:end]
01248       start = end
01249       end += 4
01250       (length,) = _struct_I.unpack(str[start:end])
01251       pattern = '<%sd'%length
01252       start = end
01253       end += struct.calcsize(pattern)
01254       self.goal.wide_camera_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01255       start = end
01256       end += 72
01257       self.goal.wide_camera_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01258       start = end
01259       end += 72
01260       self.goal.wide_camera_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01261       start = end
01262       end += 96
01263       self.goal.wide_camera_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01264       _x = self
01265       start = end
01266       end += 37
01267       (_x.goal.wide_camera_info.binning_x, _x.goal.wide_camera_info.binning_y, _x.goal.wide_camera_info.roi.x_offset, _x.goal.wide_camera_info.roi.y_offset, _x.goal.wide_camera_info.roi.height, _x.goal.wide_camera_info.roi.width, _x.goal.wide_camera_info.roi.do_rectify, _x.goal.point_cloud.header.seq, _x.goal.point_cloud.header.stamp.secs, _x.goal.point_cloud.header.stamp.nsecs,) = _struct_6IB3I.unpack(str[start:end])
01268       self.goal.wide_camera_info.roi.do_rectify = bool(self.goal.wide_camera_info.roi.do_rectify)
01269       start = end
01270       end += 4
01271       (length,) = _struct_I.unpack(str[start:end])
01272       start = end
01273       end += length
01274       if python3:
01275         self.goal.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01276       else:
01277         self.goal.point_cloud.header.frame_id = str[start:end]
01278       _x = self
01279       start = end
01280       end += 8
01281       (_x.goal.point_cloud.height, _x.goal.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01282       start = end
01283       end += 4
01284       (length,) = _struct_I.unpack(str[start:end])
01285       self.goal.point_cloud.fields = []
01286       for i in range(0, length):
01287         val1 = sensor_msgs.msg.PointField()
01288         start = end
01289         end += 4
01290         (length,) = _struct_I.unpack(str[start:end])
01291         start = end
01292         end += length
01293         if python3:
01294           val1.name = str[start:end].decode('utf-8')
01295         else:
01296           val1.name = str[start:end]
01297         _x = val1
01298         start = end
01299         end += 9
01300         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01301         self.goal.point_cloud.fields.append(val1)
01302       _x = self
01303       start = end
01304       end += 9
01305       (_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01306       self.goal.point_cloud.is_bigendian = bool(self.goal.point_cloud.is_bigendian)
01307       start = end
01308       end += 4
01309       (length,) = _struct_I.unpack(str[start:end])
01310       start = end
01311       end += length
01312       if python3:
01313         self.goal.point_cloud.data = str[start:end].decode('utf-8')
01314       else:
01315         self.goal.point_cloud.data = str[start:end]
01316       _x = self
01317       start = end
01318       end += 13
01319       (_x.goal.point_cloud.is_dense, _x.goal.disparity_image.header.seq, _x.goal.disparity_image.header.stamp.secs, _x.goal.disparity_image.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
01320       self.goal.point_cloud.is_dense = bool(self.goal.point_cloud.is_dense)
01321       start = end
01322       end += 4
01323       (length,) = _struct_I.unpack(str[start:end])
01324       start = end
01325       end += length
01326       if python3:
01327         self.goal.disparity_image.header.frame_id = str[start:end].decode('utf-8')
01328       else:
01329         self.goal.disparity_image.header.frame_id = str[start:end]
01330       _x = self
01331       start = end
01332       end += 12
01333       (_x.goal.disparity_image.image.header.seq, _x.goal.disparity_image.image.header.stamp.secs, _x.goal.disparity_image.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01334       start = end
01335       end += 4
01336       (length,) = _struct_I.unpack(str[start:end])
01337       start = end
01338       end += length
01339       if python3:
01340         self.goal.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
01341       else:
01342         self.goal.disparity_image.image.header.frame_id = str[start:end]
01343       _x = self
01344       start = end
01345       end += 8
01346       (_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
01347       start = end
01348       end += 4
01349       (length,) = _struct_I.unpack(str[start:end])
01350       start = end
01351       end += length
01352       if python3:
01353         self.goal.disparity_image.image.encoding = str[start:end].decode('utf-8')
01354       else:
01355         self.goal.disparity_image.image.encoding = str[start:end]
01356       _x = self
01357       start = end
01358       end += 5
01359       (_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
01360       start = end
01361       end += 4
01362       (length,) = _struct_I.unpack(str[start:end])
01363       start = end
01364       end += length
01365       if python3:
01366         self.goal.disparity_image.image.data = str[start:end].decode('utf-8')
01367       else:
01368         self.goal.disparity_image.image.data = str[start:end]
01369       _x = self
01370       start = end
01371       end += 37
01372       (_x.goal.disparity_image.f, _x.goal.disparity_image.T, _x.goal.disparity_image.valid_window.x_offset, _x.goal.disparity_image.valid_window.y_offset, _x.goal.disparity_image.valid_window.height, _x.goal.disparity_image.valid_window.width, _x.goal.disparity_image.valid_window.do_rectify, _x.goal.disparity_image.min_disparity, _x.goal.disparity_image.max_disparity, _x.goal.disparity_image.delta_d,) = _struct_2f4IB3f.unpack(str[start:end])
01373       self.goal.disparity_image.valid_window.do_rectify = bool(self.goal.disparity_image.valid_window.do_rectify)
01374       return self
01375     except struct.error as e:
01376       raise genpy.DeserializationError(e) #most likely buffer underfill
01377 
01378 _struct_I = genpy.struct_I
01379 _struct_IBI = struct.Struct("<IBI")
01380 _struct_6IB3I = struct.Struct("<6IB3I")
01381 _struct_12d = struct.Struct("<12d")
01382 _struct_2f4IB3f = struct.Struct("<2f4IB3f")
01383 _struct_9d = struct.Struct("<9d")
01384 _struct_BI = struct.Struct("<BI")
01385 _struct_3I = struct.Struct("<3I")
01386 _struct_B3I = struct.Struct("<B3I")
01387 _struct_B2I = struct.Struct("<B2I")
01388 _struct_2I = struct.Struct("<2I")


object_segmentation_gui
Author(s): Jeannette Bohg
autogenerated on Fri Jan 3 2014 12:03:36