_ObjectSegmentationGuiActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from interactive_perception_msgs/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 interactive_perception_msgs.msg
00008 import actionlib_msgs.msg
00009 import stereo_msgs.msg
00010 import sensor_msgs.msg
00011 import genpy
00012 import std_msgs.msg
00013 
00014 class ObjectSegmentationGuiActionGoal(genpy.Message):
00015   _md5sum = "c90d057a2cbad468bbf26bcf158e312e"
00016   _type = "interactive_perception_msgs/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: interactive_perception_msgs/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 include/sensor_msgs/image_encodings.h
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','interactive_perception_msgs/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 = interactive_perception_msgs.msg.ObjectSegmentationGuiGoal()
00360     else:
00361       self.header = std_msgs.msg.Header()
00362       self.goal_id = actionlib_msgs.msg.GoalID()
00363       self.goal = interactive_perception_msgs.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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00555     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 = interactive_perception_msgs.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       self.goal.image.data = str[start:end]
00632       _x = self
00633       start = end
00634       end += 12
00635       (_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])
00636       start = end
00637       end += 4
00638       (length,) = _struct_I.unpack(str[start:end])
00639       start = end
00640       end += length
00641       if python3:
00642         self.goal.camera_info.header.frame_id = str[start:end].decode('utf-8')
00643       else:
00644         self.goal.camera_info.header.frame_id = str[start:end]
00645       _x = self
00646       start = end
00647       end += 8
00648       (_x.goal.camera_info.height, _x.goal.camera_info.width,) = _struct_2I.unpack(str[start:end])
00649       start = end
00650       end += 4
00651       (length,) = _struct_I.unpack(str[start:end])
00652       start = end
00653       end += length
00654       if python3:
00655         self.goal.camera_info.distortion_model = str[start:end].decode('utf-8')
00656       else:
00657         self.goal.camera_info.distortion_model = str[start:end]
00658       start = end
00659       end += 4
00660       (length,) = _struct_I.unpack(str[start:end])
00661       pattern = '<%sd'%length
00662       start = end
00663       end += struct.calcsize(pattern)
00664       self.goal.camera_info.D = struct.unpack(pattern, str[start:end])
00665       start = end
00666       end += 72
00667       self.goal.camera_info.K = _struct_9d.unpack(str[start:end])
00668       start = end
00669       end += 72
00670       self.goal.camera_info.R = _struct_9d.unpack(str[start:end])
00671       start = end
00672       end += 96
00673       self.goal.camera_info.P = _struct_12d.unpack(str[start:end])
00674       _x = self
00675       start = end
00676       end += 37
00677       (_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])
00678       self.goal.camera_info.roi.do_rectify = bool(self.goal.camera_info.roi.do_rectify)
00679       start = end
00680       end += 4
00681       (length,) = _struct_I.unpack(str[start:end])
00682       start = end
00683       end += length
00684       if python3:
00685         self.goal.wide_field.header.frame_id = str[start:end].decode('utf-8')
00686       else:
00687         self.goal.wide_field.header.frame_id = str[start:end]
00688       _x = self
00689       start = end
00690       end += 8
00691       (_x.goal.wide_field.height, _x.goal.wide_field.width,) = _struct_2I.unpack(str[start:end])
00692       start = end
00693       end += 4
00694       (length,) = _struct_I.unpack(str[start:end])
00695       start = end
00696       end += length
00697       if python3:
00698         self.goal.wide_field.encoding = str[start:end].decode('utf-8')
00699       else:
00700         self.goal.wide_field.encoding = str[start:end]
00701       _x = self
00702       start = end
00703       end += 5
00704       (_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step,) = _struct_BI.unpack(str[start:end])
00705       start = end
00706       end += 4
00707       (length,) = _struct_I.unpack(str[start:end])
00708       start = end
00709       end += length
00710       self.goal.wide_field.data = str[start:end]
00711       _x = self
00712       start = end
00713       end += 12
00714       (_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])
00715       start = end
00716       end += 4
00717       (length,) = _struct_I.unpack(str[start:end])
00718       start = end
00719       end += length
00720       if python3:
00721         self.goal.wide_camera_info.header.frame_id = str[start:end].decode('utf-8')
00722       else:
00723         self.goal.wide_camera_info.header.frame_id = str[start:end]
00724       _x = self
00725       start = end
00726       end += 8
00727       (_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width,) = _struct_2I.unpack(str[start:end])
00728       start = end
00729       end += 4
00730       (length,) = _struct_I.unpack(str[start:end])
00731       start = end
00732       end += length
00733       if python3:
00734         self.goal.wide_camera_info.distortion_model = str[start:end].decode('utf-8')
00735       else:
00736         self.goal.wide_camera_info.distortion_model = str[start:end]
00737       start = end
00738       end += 4
00739       (length,) = _struct_I.unpack(str[start:end])
00740       pattern = '<%sd'%length
00741       start = end
00742       end += struct.calcsize(pattern)
00743       self.goal.wide_camera_info.D = struct.unpack(pattern, str[start:end])
00744       start = end
00745       end += 72
00746       self.goal.wide_camera_info.K = _struct_9d.unpack(str[start:end])
00747       start = end
00748       end += 72
00749       self.goal.wide_camera_info.R = _struct_9d.unpack(str[start:end])
00750       start = end
00751       end += 96
00752       self.goal.wide_camera_info.P = _struct_12d.unpack(str[start:end])
00753       _x = self
00754       start = end
00755       end += 37
00756       (_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])
00757       self.goal.wide_camera_info.roi.do_rectify = bool(self.goal.wide_camera_info.roi.do_rectify)
00758       start = end
00759       end += 4
00760       (length,) = _struct_I.unpack(str[start:end])
00761       start = end
00762       end += length
00763       if python3:
00764         self.goal.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00765       else:
00766         self.goal.point_cloud.header.frame_id = str[start:end]
00767       _x = self
00768       start = end
00769       end += 8
00770       (_x.goal.point_cloud.height, _x.goal.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00771       start = end
00772       end += 4
00773       (length,) = _struct_I.unpack(str[start:end])
00774       self.goal.point_cloud.fields = []
00775       for i in range(0, length):
00776         val1 = sensor_msgs.msg.PointField()
00777         start = end
00778         end += 4
00779         (length,) = _struct_I.unpack(str[start:end])
00780         start = end
00781         end += length
00782         if python3:
00783           val1.name = str[start:end].decode('utf-8')
00784         else:
00785           val1.name = str[start:end]
00786         _x = val1
00787         start = end
00788         end += 9
00789         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00790         self.goal.point_cloud.fields.append(val1)
00791       _x = self
00792       start = end
00793       end += 9
00794       (_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00795       self.goal.point_cloud.is_bigendian = bool(self.goal.point_cloud.is_bigendian)
00796       start = end
00797       end += 4
00798       (length,) = _struct_I.unpack(str[start:end])
00799       start = end
00800       end += length
00801       self.goal.point_cloud.data = str[start:end]
00802       _x = self
00803       start = end
00804       end += 13
00805       (_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])
00806       self.goal.point_cloud.is_dense = bool(self.goal.point_cloud.is_dense)
00807       start = end
00808       end += 4
00809       (length,) = _struct_I.unpack(str[start:end])
00810       start = end
00811       end += length
00812       if python3:
00813         self.goal.disparity_image.header.frame_id = str[start:end].decode('utf-8')
00814       else:
00815         self.goal.disparity_image.header.frame_id = str[start:end]
00816       _x = self
00817       start = end
00818       end += 12
00819       (_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])
00820       start = end
00821       end += 4
00822       (length,) = _struct_I.unpack(str[start:end])
00823       start = end
00824       end += length
00825       if python3:
00826         self.goal.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
00827       else:
00828         self.goal.disparity_image.image.header.frame_id = str[start:end]
00829       _x = self
00830       start = end
00831       end += 8
00832       (_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
00833       start = end
00834       end += 4
00835       (length,) = _struct_I.unpack(str[start:end])
00836       start = end
00837       end += length
00838       if python3:
00839         self.goal.disparity_image.image.encoding = str[start:end].decode('utf-8')
00840       else:
00841         self.goal.disparity_image.image.encoding = str[start:end]
00842       _x = self
00843       start = end
00844       end += 5
00845       (_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
00846       start = end
00847       end += 4
00848       (length,) = _struct_I.unpack(str[start:end])
00849       start = end
00850       end += length
00851       self.goal.disparity_image.image.data = str[start:end]
00852       _x = self
00853       start = end
00854       end += 37
00855       (_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])
00856       self.goal.disparity_image.valid_window.do_rectify = bool(self.goal.disparity_image.valid_window.do_rectify)
00857       return self
00858     except struct.error as e:
00859       raise genpy.DeserializationError(e) #most likely buffer underfill
00860 
00861 
00862   def serialize_numpy(self, buff, numpy):
00863     """
00864     serialize message with numpy array types into buffer
00865     :param buff: buffer, ``StringIO``
00866     :param numpy: numpy python module
00867     """
00868     try:
00869       _x = self
00870       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00871       _x = self.header.frame_id
00872       length = len(_x)
00873       if python3 or type(_x) == unicode:
00874         _x = _x.encode('utf-8')
00875         length = len(_x)
00876       buff.write(struct.pack('<I%ss'%length, length, _x))
00877       _x = self
00878       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00879       _x = self.goal_id.id
00880       length = len(_x)
00881       if python3 or type(_x) == unicode:
00882         _x = _x.encode('utf-8')
00883         length = len(_x)
00884       buff.write(struct.pack('<I%ss'%length, length, _x))
00885       _x = self
00886       buff.write(_struct_3I.pack(_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs))
00887       _x = self.goal.image.header.frame_id
00888       length = len(_x)
00889       if python3 or type(_x) == unicode:
00890         _x = _x.encode('utf-8')
00891         length = len(_x)
00892       buff.write(struct.pack('<I%ss'%length, length, _x))
00893       _x = self
00894       buff.write(_struct_2I.pack(_x.goal.image.height, _x.goal.image.width))
00895       _x = self.goal.image.encoding
00896       length = len(_x)
00897       if python3 or type(_x) == unicode:
00898         _x = _x.encode('utf-8')
00899         length = len(_x)
00900       buff.write(struct.pack('<I%ss'%length, length, _x))
00901       _x = self
00902       buff.write(_struct_BI.pack(_x.goal.image.is_bigendian, _x.goal.image.step))
00903       _x = self.goal.image.data
00904       length = len(_x)
00905       # - if encoded as a list instead, serialize as bytes instead of string
00906       if type(_x) in [list, tuple]:
00907         buff.write(struct.pack('<I%sB'%length, length, *_x))
00908       else:
00909         buff.write(struct.pack('<I%ss'%length, length, _x))
00910       _x = self
00911       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))
00912       _x = self.goal.camera_info.header.frame_id
00913       length = len(_x)
00914       if python3 or type(_x) == unicode:
00915         _x = _x.encode('utf-8')
00916         length = len(_x)
00917       buff.write(struct.pack('<I%ss'%length, length, _x))
00918       _x = self
00919       buff.write(_struct_2I.pack(_x.goal.camera_info.height, _x.goal.camera_info.width))
00920       _x = self.goal.camera_info.distortion_model
00921       length = len(_x)
00922       if python3 or type(_x) == unicode:
00923         _x = _x.encode('utf-8')
00924         length = len(_x)
00925       buff.write(struct.pack('<I%ss'%length, length, _x))
00926       length = len(self.goal.camera_info.D)
00927       buff.write(_struct_I.pack(length))
00928       pattern = '<%sd'%length
00929       buff.write(self.goal.camera_info.D.tostring())
00930       buff.write(self.goal.camera_info.K.tostring())
00931       buff.write(self.goal.camera_info.R.tostring())
00932       buff.write(self.goal.camera_info.P.tostring())
00933       _x = self
00934       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))
00935       _x = self.goal.wide_field.header.frame_id
00936       length = len(_x)
00937       if python3 or type(_x) == unicode:
00938         _x = _x.encode('utf-8')
00939         length = len(_x)
00940       buff.write(struct.pack('<I%ss'%length, length, _x))
00941       _x = self
00942       buff.write(_struct_2I.pack(_x.goal.wide_field.height, _x.goal.wide_field.width))
00943       _x = self.goal.wide_field.encoding
00944       length = len(_x)
00945       if python3 or type(_x) == unicode:
00946         _x = _x.encode('utf-8')
00947         length = len(_x)
00948       buff.write(struct.pack('<I%ss'%length, length, _x))
00949       _x = self
00950       buff.write(_struct_BI.pack(_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step))
00951       _x = self.goal.wide_field.data
00952       length = len(_x)
00953       # - if encoded as a list instead, serialize as bytes instead of string
00954       if type(_x) in [list, tuple]:
00955         buff.write(struct.pack('<I%sB'%length, length, *_x))
00956       else:
00957         buff.write(struct.pack('<I%ss'%length, length, _x))
00958       _x = self
00959       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))
00960       _x = self.goal.wide_camera_info.header.frame_id
00961       length = len(_x)
00962       if python3 or type(_x) == unicode:
00963         _x = _x.encode('utf-8')
00964         length = len(_x)
00965       buff.write(struct.pack('<I%ss'%length, length, _x))
00966       _x = self
00967       buff.write(_struct_2I.pack(_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width))
00968       _x = self.goal.wide_camera_info.distortion_model
00969       length = len(_x)
00970       if python3 or type(_x) == unicode:
00971         _x = _x.encode('utf-8')
00972         length = len(_x)
00973       buff.write(struct.pack('<I%ss'%length, length, _x))
00974       length = len(self.goal.wide_camera_info.D)
00975       buff.write(_struct_I.pack(length))
00976       pattern = '<%sd'%length
00977       buff.write(self.goal.wide_camera_info.D.tostring())
00978       buff.write(self.goal.wide_camera_info.K.tostring())
00979       buff.write(self.goal.wide_camera_info.R.tostring())
00980       buff.write(self.goal.wide_camera_info.P.tostring())
00981       _x = self
00982       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))
00983       _x = self.goal.point_cloud.header.frame_id
00984       length = len(_x)
00985       if python3 or type(_x) == unicode:
00986         _x = _x.encode('utf-8')
00987         length = len(_x)
00988       buff.write(struct.pack('<I%ss'%length, length, _x))
00989       _x = self
00990       buff.write(_struct_2I.pack(_x.goal.point_cloud.height, _x.goal.point_cloud.width))
00991       length = len(self.goal.point_cloud.fields)
00992       buff.write(_struct_I.pack(length))
00993       for val1 in self.goal.point_cloud.fields:
00994         _x = val1.name
00995         length = len(_x)
00996         if python3 or type(_x) == unicode:
00997           _x = _x.encode('utf-8')
00998           length = len(_x)
00999         buff.write(struct.pack('<I%ss'%length, length, _x))
01000         _x = val1
01001         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01002       _x = self
01003       buff.write(_struct_B2I.pack(_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step))
01004       _x = self.goal.point_cloud.data
01005       length = len(_x)
01006       # - if encoded as a list instead, serialize as bytes instead of string
01007       if type(_x) in [list, tuple]:
01008         buff.write(struct.pack('<I%sB'%length, length, *_x))
01009       else:
01010         buff.write(struct.pack('<I%ss'%length, length, _x))
01011       _x = self
01012       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))
01013       _x = self.goal.disparity_image.header.frame_id
01014       length = len(_x)
01015       if python3 or type(_x) == unicode:
01016         _x = _x.encode('utf-8')
01017         length = len(_x)
01018       buff.write(struct.pack('<I%ss'%length, length, _x))
01019       _x = self
01020       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))
01021       _x = self.goal.disparity_image.image.header.frame_id
01022       length = len(_x)
01023       if python3 or type(_x) == unicode:
01024         _x = _x.encode('utf-8')
01025         length = len(_x)
01026       buff.write(struct.pack('<I%ss'%length, length, _x))
01027       _x = self
01028       buff.write(_struct_2I.pack(_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width))
01029       _x = self.goal.disparity_image.image.encoding
01030       length = len(_x)
01031       if python3 or type(_x) == unicode:
01032         _x = _x.encode('utf-8')
01033         length = len(_x)
01034       buff.write(struct.pack('<I%ss'%length, length, _x))
01035       _x = self
01036       buff.write(_struct_BI.pack(_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step))
01037       _x = self.goal.disparity_image.image.data
01038       length = len(_x)
01039       # - if encoded as a list instead, serialize as bytes instead of string
01040       if type(_x) in [list, tuple]:
01041         buff.write(struct.pack('<I%sB'%length, length, *_x))
01042       else:
01043         buff.write(struct.pack('<I%ss'%length, length, _x))
01044       _x = self
01045       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))
01046     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
01047     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
01048 
01049   def deserialize_numpy(self, str, numpy):
01050     """
01051     unpack serialized message in str into this message instance using numpy for array types
01052     :param str: byte array of serialized message, ``str``
01053     :param numpy: numpy python module
01054     """
01055     try:
01056       if self.header is None:
01057         self.header = std_msgs.msg.Header()
01058       if self.goal_id is None:
01059         self.goal_id = actionlib_msgs.msg.GoalID()
01060       if self.goal is None:
01061         self.goal = interactive_perception_msgs.msg.ObjectSegmentationGuiGoal()
01062       end = 0
01063       _x = self
01064       start = end
01065       end += 12
01066       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01067       start = end
01068       end += 4
01069       (length,) = _struct_I.unpack(str[start:end])
01070       start = end
01071       end += length
01072       if python3:
01073         self.header.frame_id = str[start:end].decode('utf-8')
01074       else:
01075         self.header.frame_id = str[start:end]
01076       _x = self
01077       start = end
01078       end += 8
01079       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
01080       start = end
01081       end += 4
01082       (length,) = _struct_I.unpack(str[start:end])
01083       start = end
01084       end += length
01085       if python3:
01086         self.goal_id.id = str[start:end].decode('utf-8')
01087       else:
01088         self.goal_id.id = str[start:end]
01089       _x = self
01090       start = end
01091       end += 12
01092       (_x.goal.image.header.seq, _x.goal.image.header.stamp.secs, _x.goal.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01093       start = end
01094       end += 4
01095       (length,) = _struct_I.unpack(str[start:end])
01096       start = end
01097       end += length
01098       if python3:
01099         self.goal.image.header.frame_id = str[start:end].decode('utf-8')
01100       else:
01101         self.goal.image.header.frame_id = str[start:end]
01102       _x = self
01103       start = end
01104       end += 8
01105       (_x.goal.image.height, _x.goal.image.width,) = _struct_2I.unpack(str[start:end])
01106       start = end
01107       end += 4
01108       (length,) = _struct_I.unpack(str[start:end])
01109       start = end
01110       end += length
01111       if python3:
01112         self.goal.image.encoding = str[start:end].decode('utf-8')
01113       else:
01114         self.goal.image.encoding = str[start:end]
01115       _x = self
01116       start = end
01117       end += 5
01118       (_x.goal.image.is_bigendian, _x.goal.image.step,) = _struct_BI.unpack(str[start:end])
01119       start = end
01120       end += 4
01121       (length,) = _struct_I.unpack(str[start:end])
01122       start = end
01123       end += length
01124       self.goal.image.data = str[start:end]
01125       _x = self
01126       start = end
01127       end += 12
01128       (_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])
01129       start = end
01130       end += 4
01131       (length,) = _struct_I.unpack(str[start:end])
01132       start = end
01133       end += length
01134       if python3:
01135         self.goal.camera_info.header.frame_id = str[start:end].decode('utf-8')
01136       else:
01137         self.goal.camera_info.header.frame_id = str[start:end]
01138       _x = self
01139       start = end
01140       end += 8
01141       (_x.goal.camera_info.height, _x.goal.camera_info.width,) = _struct_2I.unpack(str[start:end])
01142       start = end
01143       end += 4
01144       (length,) = _struct_I.unpack(str[start:end])
01145       start = end
01146       end += length
01147       if python3:
01148         self.goal.camera_info.distortion_model = str[start:end].decode('utf-8')
01149       else:
01150         self.goal.camera_info.distortion_model = str[start:end]
01151       start = end
01152       end += 4
01153       (length,) = _struct_I.unpack(str[start:end])
01154       pattern = '<%sd'%length
01155       start = end
01156       end += struct.calcsize(pattern)
01157       self.goal.camera_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01158       start = end
01159       end += 72
01160       self.goal.camera_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01161       start = end
01162       end += 72
01163       self.goal.camera_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01164       start = end
01165       end += 96
01166       self.goal.camera_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01167       _x = self
01168       start = end
01169       end += 37
01170       (_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])
01171       self.goal.camera_info.roi.do_rectify = bool(self.goal.camera_info.roi.do_rectify)
01172       start = end
01173       end += 4
01174       (length,) = _struct_I.unpack(str[start:end])
01175       start = end
01176       end += length
01177       if python3:
01178         self.goal.wide_field.header.frame_id = str[start:end].decode('utf-8')
01179       else:
01180         self.goal.wide_field.header.frame_id = str[start:end]
01181       _x = self
01182       start = end
01183       end += 8
01184       (_x.goal.wide_field.height, _x.goal.wide_field.width,) = _struct_2I.unpack(str[start:end])
01185       start = end
01186       end += 4
01187       (length,) = _struct_I.unpack(str[start:end])
01188       start = end
01189       end += length
01190       if python3:
01191         self.goal.wide_field.encoding = str[start:end].decode('utf-8')
01192       else:
01193         self.goal.wide_field.encoding = str[start:end]
01194       _x = self
01195       start = end
01196       end += 5
01197       (_x.goal.wide_field.is_bigendian, _x.goal.wide_field.step,) = _struct_BI.unpack(str[start:end])
01198       start = end
01199       end += 4
01200       (length,) = _struct_I.unpack(str[start:end])
01201       start = end
01202       end += length
01203       self.goal.wide_field.data = str[start:end]
01204       _x = self
01205       start = end
01206       end += 12
01207       (_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])
01208       start = end
01209       end += 4
01210       (length,) = _struct_I.unpack(str[start:end])
01211       start = end
01212       end += length
01213       if python3:
01214         self.goal.wide_camera_info.header.frame_id = str[start:end].decode('utf-8')
01215       else:
01216         self.goal.wide_camera_info.header.frame_id = str[start:end]
01217       _x = self
01218       start = end
01219       end += 8
01220       (_x.goal.wide_camera_info.height, _x.goal.wide_camera_info.width,) = _struct_2I.unpack(str[start:end])
01221       start = end
01222       end += 4
01223       (length,) = _struct_I.unpack(str[start:end])
01224       start = end
01225       end += length
01226       if python3:
01227         self.goal.wide_camera_info.distortion_model = str[start:end].decode('utf-8')
01228       else:
01229         self.goal.wide_camera_info.distortion_model = str[start:end]
01230       start = end
01231       end += 4
01232       (length,) = _struct_I.unpack(str[start:end])
01233       pattern = '<%sd'%length
01234       start = end
01235       end += struct.calcsize(pattern)
01236       self.goal.wide_camera_info.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01237       start = end
01238       end += 72
01239       self.goal.wide_camera_info.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01240       start = end
01241       end += 72
01242       self.goal.wide_camera_info.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01243       start = end
01244       end += 96
01245       self.goal.wide_camera_info.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01246       _x = self
01247       start = end
01248       end += 37
01249       (_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])
01250       self.goal.wide_camera_info.roi.do_rectify = bool(self.goal.wide_camera_info.roi.do_rectify)
01251       start = end
01252       end += 4
01253       (length,) = _struct_I.unpack(str[start:end])
01254       start = end
01255       end += length
01256       if python3:
01257         self.goal.point_cloud.header.frame_id = str[start:end].decode('utf-8')
01258       else:
01259         self.goal.point_cloud.header.frame_id = str[start:end]
01260       _x = self
01261       start = end
01262       end += 8
01263       (_x.goal.point_cloud.height, _x.goal.point_cloud.width,) = _struct_2I.unpack(str[start:end])
01264       start = end
01265       end += 4
01266       (length,) = _struct_I.unpack(str[start:end])
01267       self.goal.point_cloud.fields = []
01268       for i in range(0, length):
01269         val1 = sensor_msgs.msg.PointField()
01270         start = end
01271         end += 4
01272         (length,) = _struct_I.unpack(str[start:end])
01273         start = end
01274         end += length
01275         if python3:
01276           val1.name = str[start:end].decode('utf-8')
01277         else:
01278           val1.name = str[start:end]
01279         _x = val1
01280         start = end
01281         end += 9
01282         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01283         self.goal.point_cloud.fields.append(val1)
01284       _x = self
01285       start = end
01286       end += 9
01287       (_x.goal.point_cloud.is_bigendian, _x.goal.point_cloud.point_step, _x.goal.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01288       self.goal.point_cloud.is_bigendian = bool(self.goal.point_cloud.is_bigendian)
01289       start = end
01290       end += 4
01291       (length,) = _struct_I.unpack(str[start:end])
01292       start = end
01293       end += length
01294       self.goal.point_cloud.data = str[start:end]
01295       _x = self
01296       start = end
01297       end += 13
01298       (_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])
01299       self.goal.point_cloud.is_dense = bool(self.goal.point_cloud.is_dense)
01300       start = end
01301       end += 4
01302       (length,) = _struct_I.unpack(str[start:end])
01303       start = end
01304       end += length
01305       if python3:
01306         self.goal.disparity_image.header.frame_id = str[start:end].decode('utf-8')
01307       else:
01308         self.goal.disparity_image.header.frame_id = str[start:end]
01309       _x = self
01310       start = end
01311       end += 12
01312       (_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])
01313       start = end
01314       end += 4
01315       (length,) = _struct_I.unpack(str[start:end])
01316       start = end
01317       end += length
01318       if python3:
01319         self.goal.disparity_image.image.header.frame_id = str[start:end].decode('utf-8')
01320       else:
01321         self.goal.disparity_image.image.header.frame_id = str[start:end]
01322       _x = self
01323       start = end
01324       end += 8
01325       (_x.goal.disparity_image.image.height, _x.goal.disparity_image.image.width,) = _struct_2I.unpack(str[start:end])
01326       start = end
01327       end += 4
01328       (length,) = _struct_I.unpack(str[start:end])
01329       start = end
01330       end += length
01331       if python3:
01332         self.goal.disparity_image.image.encoding = str[start:end].decode('utf-8')
01333       else:
01334         self.goal.disparity_image.image.encoding = str[start:end]
01335       _x = self
01336       start = end
01337       end += 5
01338       (_x.goal.disparity_image.image.is_bigendian, _x.goal.disparity_image.image.step,) = _struct_BI.unpack(str[start:end])
01339       start = end
01340       end += 4
01341       (length,) = _struct_I.unpack(str[start:end])
01342       start = end
01343       end += length
01344       self.goal.disparity_image.image.data = str[start:end]
01345       _x = self
01346       start = end
01347       end += 37
01348       (_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])
01349       self.goal.disparity_image.valid_window.do_rectify = bool(self.goal.disparity_image.valid_window.do_rectify)
01350       return self
01351     except struct.error as e:
01352       raise genpy.DeserializationError(e) #most likely buffer underfill
01353 
01354 _struct_I = genpy.struct_I
01355 _struct_IBI = struct.Struct("<IBI")
01356 _struct_6IB3I = struct.Struct("<6IB3I")
01357 _struct_12d = struct.Struct("<12d")
01358 _struct_2f4IB3f = struct.Struct("<2f4IB3f")
01359 _struct_9d = struct.Struct("<9d")
01360 _struct_BI = struct.Struct("<BI")
01361 _struct_3I = struct.Struct("<3I")
01362 _struct_B3I = struct.Struct("<B3I")
01363 _struct_B2I = struct.Struct("<B2I")
01364 _struct_2I = struct.Struct("<2I")


interactive_perception_msgs
Author(s): jbinney
autogenerated on Mon Oct 6 2014 11:51:20