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