00001 """autogenerated by genmsg_py from DetectObjectsRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class DetectObjectsRequest(roslib.message.Message):
00007 _md5sum = "cba5e21e920a3a2b7b375cb65b64cdea"
00008 _type = "pr2_pick_and_place_service/DetectObjectsRequest"
00009 _has_header = False
00010 _full_text = """string command
00011
00012 """
00013 __slots__ = ['command']
00014 _slot_types = ['string']
00015
00016 def __init__(self, *args, **kwds):
00017 """
00018 Constructor. Any message fields that are implicitly/explicitly
00019 set to None will be assigned a default value. The recommend
00020 use is keyword arguments as this is more robust to future message
00021 changes. You cannot mix in-order arguments and keyword arguments.
00022
00023 The available fields are:
00024 command
00025
00026 @param args: complete set of field values, in .msg order
00027 @param kwds: use keyword arguments corresponding to message field names
00028 to set specific fields.
00029 """
00030 if args or kwds:
00031 super(DetectObjectsRequest, self).__init__(*args, **kwds)
00032
00033 if self.command is None:
00034 self.command = ''
00035 else:
00036 self.command = ''
00037
00038 def _get_types(self):
00039 """
00040 internal API method
00041 """
00042 return self._slot_types
00043
00044 def serialize(self, buff):
00045 """
00046 serialize message into buffer
00047 @param buff: buffer
00048 @type buff: StringIO
00049 """
00050 try:
00051 _x = self.command
00052 length = len(_x)
00053 buff.write(struct.pack('<I%ss'%length, length, _x))
00054 except struct.error, se: self._check_types(se)
00055 except TypeError, te: self._check_types(te)
00056
00057 def deserialize(self, str):
00058 """
00059 unpack serialized message in str into this message instance
00060 @param str: byte array of serialized message
00061 @type str: str
00062 """
00063 try:
00064 end = 0
00065 start = end
00066 end += 4
00067 (length,) = _struct_I.unpack(str[start:end])
00068 start = end
00069 end += length
00070 self.command = str[start:end]
00071 return self
00072 except struct.error, e:
00073 raise roslib.message.DeserializationError(e)
00074
00075
00076 def serialize_numpy(self, buff, numpy):
00077 """
00078 serialize message with numpy array types into buffer
00079 @param buff: buffer
00080 @type buff: StringIO
00081 @param numpy: numpy python module
00082 @type numpy module
00083 """
00084 try:
00085 _x = self.command
00086 length = len(_x)
00087 buff.write(struct.pack('<I%ss'%length, length, _x))
00088 except struct.error, se: self._check_types(se)
00089 except TypeError, te: self._check_types(te)
00090
00091 def deserialize_numpy(self, str, numpy):
00092 """
00093 unpack serialized message in str into this message instance using numpy for array types
00094 @param str: byte array of serialized message
00095 @type str: str
00096 @param numpy: numpy python module
00097 @type numpy: module
00098 """
00099 try:
00100 end = 0
00101 start = end
00102 end += 4
00103 (length,) = _struct_I.unpack(str[start:end])
00104 start = end
00105 end += length
00106 self.command = str[start:end]
00107 return self
00108 except struct.error, e:
00109 raise roslib.message.DeserializationError(e)
00110
00111 _struct_I = roslib.message.struct_I
00112 """autogenerated by genmsg_py from DetectObjectsResponse.msg. Do not edit."""
00113 import roslib.message
00114 import struct
00115
00116 import object_manipulation_msgs.msg
00117 import geometry_msgs.msg
00118 import pr2_pick_and_place_service.msg
00119 import sensor_msgs.msg
00120 import household_objects_database_msgs.msg
00121 import std_msgs.msg
00122
00123 class DetectObjectsResponse(roslib.message.Message):
00124 _md5sum = "b4139d6c1f0ca110d24436e7ae88ea9c"
00125 _type = "pr2_pick_and_place_service/DetectObjectsResponse"
00126 _has_header = False
00127 _full_text = """PickPlaceObject[] objects
00128
00129
00130 ================================================================================
00131 MSG: pr2_pick_and_place_service/PickPlaceObject
00132 int32 objectid
00133 object_manipulation_msgs/GraspableObject object
00134 geometry_msgs/PoseStamped pose
00135 float64[] boundingbox
00136
00137 ================================================================================
00138 MSG: object_manipulation_msgs/GraspableObject
00139 # an object that the object_manipulator can work on
00140
00141 # a graspable object can be represented in multiple ways. This message
00142 # can contain all of them. Which one is actually used is up to the receiver
00143 # of this message. When adding new representations, one must be careful that
00144 # they have reasonable lightweight defaults indicating that that particular
00145 # representation is not available.
00146
00147 # the tf frame to be used as a reference frame when combining information from
00148 # the different representations below
00149 string reference_frame_id
00150
00151 # potential recognition results from a database of models
00152 # all poses are relative to the object reference pose
00153 household_objects_database_msgs/DatabaseModelPose[] potential_models
00154
00155 # the point cloud itself
00156 sensor_msgs/PointCloud cluster
00157
00158 # a region of a PointCloud2 of interest
00159 object_manipulation_msgs/SceneRegion region
00160
00161
00162 ================================================================================
00163 MSG: household_objects_database_msgs/DatabaseModelPose
00164 # Informs that a specific model from the Model Database has been
00165 # identified at a certain location
00166
00167 # the database id of the model
00168 int32 model_id
00169
00170 # the pose that it can be found in
00171 geometry_msgs/PoseStamped pose
00172
00173 # a measure of the confidence level in this detection result
00174 float32 confidence
00175 ================================================================================
00176 MSG: geometry_msgs/PoseStamped
00177 # A Pose with reference coordinate frame and timestamp
00178 Header header
00179 Pose pose
00180
00181 ================================================================================
00182 MSG: std_msgs/Header
00183 # Standard metadata for higher-level stamped data types.
00184 # This is generally used to communicate timestamped data
00185 # in a particular coordinate frame.
00186 #
00187 # sequence ID: consecutively increasing ID
00188 uint32 seq
00189 #Two-integer timestamp that is expressed as:
00190 # * stamp.secs: seconds (stamp_secs) since epoch
00191 # * stamp.nsecs: nanoseconds since stamp_secs
00192 # time-handling sugar is provided by the client library
00193 time stamp
00194 #Frame this data is associated with
00195 # 0: no frame
00196 # 1: global frame
00197 string frame_id
00198
00199 ================================================================================
00200 MSG: geometry_msgs/Pose
00201 # A representation of pose in free space, composed of postion and orientation.
00202 Point position
00203 Quaternion orientation
00204
00205 ================================================================================
00206 MSG: geometry_msgs/Point
00207 # This contains the position of a point in free space
00208 float64 x
00209 float64 y
00210 float64 z
00211
00212 ================================================================================
00213 MSG: geometry_msgs/Quaternion
00214 # This represents an orientation in free space in quaternion form.
00215
00216 float64 x
00217 float64 y
00218 float64 z
00219 float64 w
00220
00221 ================================================================================
00222 MSG: sensor_msgs/PointCloud
00223 # This message holds a collection of 3d points, plus optional additional
00224 # information about each point.
00225
00226 # Time of sensor data acquisition, coordinate frame ID.
00227 Header header
00228
00229 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00230 # in the frame given in the header.
00231 geometry_msgs/Point32[] points
00232
00233 # Each channel should have the same number of elements as points array,
00234 # and the data in each channel should correspond 1:1 with each point.
00235 # Channel names in common practice are listed in ChannelFloat32.msg.
00236 ChannelFloat32[] channels
00237
00238 ================================================================================
00239 MSG: geometry_msgs/Point32
00240 # This contains the position of a point in free space(with 32 bits of precision).
00241 # It is recommeded to use Point wherever possible instead of Point32.
00242 #
00243 # This recommendation is to promote interoperability.
00244 #
00245 # This message is designed to take up less space when sending
00246 # lots of points at once, as in the case of a PointCloud.
00247
00248 float32 x
00249 float32 y
00250 float32 z
00251 ================================================================================
00252 MSG: sensor_msgs/ChannelFloat32
00253 # This message is used by the PointCloud message to hold optional data
00254 # associated with each point in the cloud. The length of the values
00255 # array should be the same as the length of the points array in the
00256 # PointCloud, and each value should be associated with the corresponding
00257 # point.
00258
00259 # Channel names in existing practice include:
00260 # "u", "v" - row and column (respectively) in the left stereo image.
00261 # This is opposite to usual conventions but remains for
00262 # historical reasons. The newer PointCloud2 message has no
00263 # such problem.
00264 # "rgb" - For point clouds produced by color stereo cameras. uint8
00265 # (R,G,B) values packed into the least significant 24 bits,
00266 # in order.
00267 # "intensity" - laser or pixel intensity.
00268 # "distance"
00269
00270 # The channel name should give semantics of the channel (e.g.
00271 # "intensity" instead of "value").
00272 string name
00273
00274 # The values array should be 1-1 with the elements of the associated
00275 # PointCloud.
00276 float32[] values
00277
00278 ================================================================================
00279 MSG: object_manipulation_msgs/SceneRegion
00280 # Point cloud
00281 sensor_msgs/PointCloud2 cloud
00282
00283 # Indices for the region of interest
00284 int32[] mask
00285
00286 # One of the corresponding 2D images, if applicable
00287 sensor_msgs/Image image
00288
00289 # The disparity image, if applicable
00290 sensor_msgs/Image disparity_image
00291
00292 # Camera info for the camera that took the image
00293 sensor_msgs/CameraInfo cam_info
00294
00295 ================================================================================
00296 MSG: sensor_msgs/PointCloud2
00297 # This message holds a collection of N-dimensional points, which may
00298 # contain additional information such as normals, intensity, etc. The
00299 # point data is stored as a binary blob, its layout described by the
00300 # contents of the "fields" array.
00301
00302 # The point cloud data may be organized 2d (image-like) or 1d
00303 # (unordered). Point clouds organized as 2d images may be produced by
00304 # camera depth sensors such as stereo or time-of-flight.
00305
00306 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00307 # points).
00308 Header header
00309
00310 # 2D structure of the point cloud. If the cloud is unordered, height is
00311 # 1 and width is the length of the point cloud.
00312 uint32 height
00313 uint32 width
00314
00315 # Describes the channels and their layout in the binary data blob.
00316 PointField[] fields
00317
00318 bool is_bigendian # Is this data bigendian?
00319 uint32 point_step # Length of a point in bytes
00320 uint32 row_step # Length of a row in bytes
00321 uint8[] data # Actual point data, size is (row_step*height)
00322
00323 bool is_dense # True if there are no invalid points
00324
00325 ================================================================================
00326 MSG: sensor_msgs/PointField
00327 # This message holds the description of one point entry in the
00328 # PointCloud2 message format.
00329 uint8 INT8 = 1
00330 uint8 UINT8 = 2
00331 uint8 INT16 = 3
00332 uint8 UINT16 = 4
00333 uint8 INT32 = 5
00334 uint8 UINT32 = 6
00335 uint8 FLOAT32 = 7
00336 uint8 FLOAT64 = 8
00337
00338 string name # Name of field
00339 uint32 offset # Offset from start of point struct
00340 uint8 datatype # Datatype enumeration, see above
00341 uint32 count # How many elements in the field
00342
00343 ================================================================================
00344 MSG: sensor_msgs/Image
00345 # This message contains an uncompressed image
00346 # (0, 0) is at top-left corner of image
00347 #
00348
00349 Header header # Header timestamp should be acquisition time of image
00350 # Header frame_id should be optical frame of camera
00351 # origin of frame should be optical center of cameara
00352 # +x should point to the right in the image
00353 # +y should point down in the image
00354 # +z should point into to plane of the image
00355 # If the frame_id here and the frame_id of the CameraInfo
00356 # message associated with the image conflict
00357 # the behavior is undefined
00358
00359 uint32 height # image height, that is, number of rows
00360 uint32 width # image width, that is, number of columns
00361
00362 # The legal values for encoding are in file src/image_encodings.cpp
00363 # If you want to standardize a new string format, join
00364 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00365
00366 string encoding # Encoding of pixels -- channel meaning, ordering, size
00367 # taken from the list of strings in src/image_encodings.cpp
00368
00369 uint8 is_bigendian # is this data bigendian?
00370 uint32 step # Full row length in bytes
00371 uint8[] data # actual matrix data, size is (step * rows)
00372
00373 ================================================================================
00374 MSG: sensor_msgs/CameraInfo
00375 # This message defines meta information for a camera. It should be in a
00376 # camera namespace on topic "camera_info" and accompanied by up to five
00377 # image topics named:
00378 #
00379 # image_raw - raw data from the camera driver, possibly Bayer encoded
00380 # image - monochrome, distorted
00381 # image_color - color, distorted
00382 # image_rect - monochrome, rectified
00383 # image_rect_color - color, rectified
00384 #
00385 # The image_pipeline contains packages (image_proc, stereo_image_proc)
00386 # for producing the four processed image topics from image_raw and
00387 # camera_info. The meaning of the camera parameters are described in
00388 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.
00389 #
00390 # The image_geometry package provides a user-friendly interface to
00391 # common operations using this meta information. If you want to, e.g.,
00392 # project a 3d point into image coordinates, we strongly recommend
00393 # using image_geometry.
00394 #
00395 # If the camera is uncalibrated, the matrices D, K, R, P should be left
00396 # zeroed out. In particular, clients may assume that K[0] == 0.0
00397 # indicates an uncalibrated camera.
00398
00399 #######################################################################
00400 # Image acquisition info #
00401 #######################################################################
00402
00403 # Time of image acquisition, camera coordinate frame ID
00404 Header header # Header timestamp should be acquisition time of image
00405 # Header frame_id should be optical frame of camera
00406 # origin of frame should be optical center of camera
00407 # +x should point to the right in the image
00408 # +y should point down in the image
00409 # +z should point into the plane of the image
00410
00411
00412 #######################################################################
00413 # Calibration Parameters #
00414 #######################################################################
00415 # These are fixed during camera calibration. Their values will be the #
00416 # same in all messages until the camera is recalibrated. Note that #
00417 # self-calibrating systems may "recalibrate" frequently. #
00418 # #
00419 # The internal parameters can be used to warp a raw (distorted) image #
00420 # to: #
00421 # 1. An undistorted image (requires D and K) #
00422 # 2. A rectified image (requires D, K, R) #
00423 # The projection matrix P projects 3D points into the rectified image.#
00424 #######################################################################
00425
00426 # The image dimensions with which the camera was calibrated. Normally
00427 # this will be the full camera resolution in pixels.
00428 uint32 height
00429 uint32 width
00430
00431 # The distortion model used. Supported models are listed in
00432 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a
00433 # simple model of radial and tangential distortion - is sufficent.
00434 string distortion_model
00435
00436 # The distortion parameters, size depending on the distortion model.
00437 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
00438 float64[] D
00439
00440 # Intrinsic camera matrix for the raw (distorted) images.
00441 # [fx 0 cx]
00442 # K = [ 0 fy cy]
00443 # [ 0 0 1]
00444 # Projects 3D points in the camera coordinate frame to 2D pixel
00445 # coordinates using the focal lengths (fx, fy) and principal point
00446 # (cx, cy).
00447 float64[9] K # 3x3 row-major matrix
00448
00449 # Rectification matrix (stereo cameras only)
00450 # A rotation matrix aligning the camera coordinate system to the ideal
00451 # stereo image plane so that epipolar lines in both stereo images are
00452 # parallel.
00453 float64[9] R # 3x3 row-major matrix
00454
00455 # Projection/camera matrix
00456 # [fx' 0 cx' Tx]
00457 # P = [ 0 fy' cy' Ty]
00458 # [ 0 0 1 0]
00459 # By convention, this matrix specifies the intrinsic (camera) matrix
00460 # of the processed (rectified) image. That is, the left 3x3 portion
00461 # is the normal camera intrinsic matrix for the rectified image.
00462 # It projects 3D points in the camera coordinate frame to 2D pixel
00463 # coordinates using the focal lengths (fx', fy') and principal point
00464 # (cx', cy') - these may differ from the values in K.
00465 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will
00466 # also have R = the identity and P[1:3,1:3] = K.
00467 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the
00468 # position of the optical center of the second camera in the first
00469 # camera's frame. We assume Tz = 0 so both cameras are in the same
00470 # stereo image plane. The first camera always has Tx = Ty = 0. For
00471 # the right (second) camera of a horizontal stereo pair, Ty = 0 and
00472 # Tx = -fx' * B, where B is the baseline between the cameras.
00473 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto
00474 # the rectified image is given by:
00475 # [u v w]' = P * [X Y Z 1]'
00476 # x = u / w
00477 # y = v / w
00478 # This holds for both images of a stereo pair.
00479 float64[12] P # 3x4 row-major matrix
00480
00481
00482 #######################################################################
00483 # Operational Parameters #
00484 #######################################################################
00485 # These define the image region actually captured by the camera #
00486 # driver. Although they affect the geometry of the output image, they #
00487 # may be changed freely without recalibrating the camera. #
00488 #######################################################################
00489
00490 # Binning refers here to any camera setting which combines rectangular
00491 # neighborhoods of pixels into larger "super-pixels." It reduces the
00492 # resolution of the output image to
00493 # (width / binning_x) x (height / binning_y).
00494 # The default values binning_x = binning_y = 0 is considered the same
00495 # as binning_x = binning_y = 1 (no subsampling).
00496 uint32 binning_x
00497 uint32 binning_y
00498
00499 # Region of interest (subwindow of full camera resolution), given in
00500 # full resolution (unbinned) image coordinates. A particular ROI
00501 # always denotes the same window of pixels on the camera sensor,
00502 # regardless of binning settings.
00503 # The default setting of roi (all values 0) is considered the same as
00504 # full resolution (roi.width = width, roi.height = height).
00505 RegionOfInterest roi
00506
00507 ================================================================================
00508 MSG: sensor_msgs/RegionOfInterest
00509 # This message is used to specify a region of interest within an image.
00510 #
00511 # When used to specify the ROI setting of the camera when the image was
00512 # taken, the height and width fields should either match the height and
00513 # width fields for the associated image; or height = width = 0
00514 # indicates that the full resolution image was captured.
00515
00516 uint32 x_offset # Leftmost pixel of the ROI
00517 # (0 if the ROI includes the left edge of the image)
00518 uint32 y_offset # Topmost pixel of the ROI
00519 # (0 if the ROI includes the top edge of the image)
00520 uint32 height # Height of ROI
00521 uint32 width # Width of ROI
00522
00523 # True if a distinct rectified ROI should be calculated from the "raw"
00524 # ROI in this message. Typically this should be False if the full image
00525 # is captured (ROI not used), and True if a subwindow is captured (ROI
00526 # used).
00527 bool do_rectify
00528
00529 """
00530 __slots__ = ['objects']
00531 _slot_types = ['pr2_pick_and_place_service/PickPlaceObject[]']
00532
00533 def __init__(self, *args, **kwds):
00534 """
00535 Constructor. Any message fields that are implicitly/explicitly
00536 set to None will be assigned a default value. The recommend
00537 use is keyword arguments as this is more robust to future message
00538 changes. You cannot mix in-order arguments and keyword arguments.
00539
00540 The available fields are:
00541 objects
00542
00543 @param args: complete set of field values, in .msg order
00544 @param kwds: use keyword arguments corresponding to message field names
00545 to set specific fields.
00546 """
00547 if args or kwds:
00548 super(DetectObjectsResponse, self).__init__(*args, **kwds)
00549 #message fields cannot be None, assign default values for those that are
00550 if self.objects is None:
00551 self.objects = []
00552 else:
00553 self.objects = []
00554
00555 def _get_types(self):
00556 """
00557 internal API method
00558 """
00559 return self._slot_types
00560
00561 def serialize(self, buff):
00562 """
00563 serialize message into buffer
00564 @param buff: buffer
00565 @type buff: StringIO
00566 """
00567 try:
00568 length = len(self.objects)
00569 buff.write(_struct_I.pack(length))
00570 for val1 in self.objects:
00571 buff.write(_struct_i.pack(val1.objectid))
00572 _v1 = val1.object
00573 _x = _v1.reference_frame_id
00574 length = len(_x)
00575 buff.write(struct.pack('<I%ss'%length, length, _x))
00576 length = len(_v1.potential_models)
00577 buff.write(_struct_I.pack(length))
00578 for val3 in _v1.potential_models:
00579 buff.write(_struct_i.pack(val3.model_id))
00580 _v2 = val3.pose
00581 _v3 = _v2.header
00582 buff.write(_struct_I.pack(_v3.seq))
00583 _v4 = _v3.stamp
00584 _x = _v4
00585 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00586 _x = _v3.frame_id
00587 length = len(_x)
00588 buff.write(struct.pack('<I%ss'%length, length, _x))
00589 _v5 = _v2.pose
00590 _v6 = _v5.position
00591 _x = _v6
00592 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00593 _v7 = _v5.orientation
00594 _x = _v7
00595 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00596 buff.write(_struct_f.pack(val3.confidence))
00597 _v8 = _v1.cluster
00598 _v9 = _v8.header
00599 buff.write(_struct_I.pack(_v9.seq))
00600 _v10 = _v9.stamp
00601 _x = _v10
00602 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00603 _x = _v9.frame_id
00604 length = len(_x)
00605 buff.write(struct.pack('<I%ss'%length, length, _x))
00606 length = len(_v8.points)
00607 buff.write(_struct_I.pack(length))
00608 for val4 in _v8.points:
00609 _x = val4
00610 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00611 length = len(_v8.channels)
00612 buff.write(_struct_I.pack(length))
00613 for val4 in _v8.channels:
00614 _x = val4.name
00615 length = len(_x)
00616 buff.write(struct.pack('<I%ss'%length, length, _x))
00617 length = len(val4.values)
00618 buff.write(_struct_I.pack(length))
00619 pattern = '<%sf'%length
00620 buff.write(struct.pack(pattern, *val4.values))
00621 _v11 = _v1.region
00622 _v12 = _v11.cloud
00623 _v13 = _v12.header
00624 buff.write(_struct_I.pack(_v13.seq))
00625 _v14 = _v13.stamp
00626 _x = _v14
00627 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00628 _x = _v13.frame_id
00629 length = len(_x)
00630 buff.write(struct.pack('<I%ss'%length, length, _x))
00631 _x = _v12
00632 buff.write(_struct_2I.pack(_x.height, _x.width))
00633 length = len(_v12.fields)
00634 buff.write(_struct_I.pack(length))
00635 for val5 in _v12.fields:
00636 _x = val5.name
00637 length = len(_x)
00638 buff.write(struct.pack('<I%ss'%length, length, _x))
00639 _x = val5
00640 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00641 _x = _v12
00642 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00643 _x = _v12.data
00644 length = len(_x)
00645 # - if encoded as a list instead, serialize as bytes instead of string
00646 if type(_x) in [list, tuple]:
00647 buff.write(struct.pack('<I%sB'%length, length, *_x))
00648 else:
00649 buff.write(struct.pack('<I%ss'%length, length, _x))
00650 buff.write(_struct_B.pack(_v12.is_dense))
00651 length = len(_v11.mask)
00652 buff.write(_struct_I.pack(length))
00653 pattern = '<%si'%length
00654 buff.write(struct.pack(pattern, *_v11.mask))
00655 _v15 = _v11.image
00656 _v16 = _v15.header
00657 buff.write(_struct_I.pack(_v16.seq))
00658 _v17 = _v16.stamp
00659 _x = _v17
00660 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00661 _x = _v16.frame_id
00662 length = len(_x)
00663 buff.write(struct.pack('<I%ss'%length, length, _x))
00664 _x = _v15
00665 buff.write(_struct_2I.pack(_x.height, _x.width))
00666 _x = _v15.encoding
00667 length = len(_x)
00668 buff.write(struct.pack('<I%ss'%length, length, _x))
00669 _x = _v15
00670 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
00671 _x = _v15.data
00672 length = len(_x)
00673 # - if encoded as a list instead, serialize as bytes instead of string
00674 if type(_x) in [list, tuple]:
00675 buff.write(struct.pack('<I%sB'%length, length, *_x))
00676 else:
00677 buff.write(struct.pack('<I%ss'%length, length, _x))
00678 _v18 = _v11.disparity_image
00679 _v19 = _v18.header
00680 buff.write(_struct_I.pack(_v19.seq))
00681 _v20 = _v19.stamp
00682 _x = _v20
00683 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00684 _x = _v19.frame_id
00685 length = len(_x)
00686 buff.write(struct.pack('<I%ss'%length, length, _x))
00687 _x = _v18
00688 buff.write(_struct_2I.pack(_x.height, _x.width))
00689 _x = _v18.encoding
00690 length = len(_x)
00691 buff.write(struct.pack('<I%ss'%length, length, _x))
00692 _x = _v18
00693 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
00694 _x = _v18.data
00695 length = len(_x)
00696 # - if encoded as a list instead, serialize as bytes instead of string
00697 if type(_x) in [list, tuple]:
00698 buff.write(struct.pack('<I%sB'%length, length, *_x))
00699 else:
00700 buff.write(struct.pack('<I%ss'%length, length, _x))
00701 _v21 = _v11.cam_info
00702 _v22 = _v21.header
00703 buff.write(_struct_I.pack(_v22.seq))
00704 _v23 = _v22.stamp
00705 _x = _v23
00706 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00707 _x = _v22.frame_id
00708 length = len(_x)
00709 buff.write(struct.pack('<I%ss'%length, length, _x))
00710 _x = _v21
00711 buff.write(_struct_2I.pack(_x.height, _x.width))
00712 _x = _v21.distortion_model
00713 length = len(_x)
00714 buff.write(struct.pack('<I%ss'%length, length, _x))
00715 length = len(_v21.D)
00716 buff.write(_struct_I.pack(length))
00717 pattern = '<%sd'%length
00718 buff.write(struct.pack(pattern, *_v21.D))
00719 buff.write(_struct_9d.pack(*_v21.K))
00720 buff.write(_struct_9d.pack(*_v21.R))
00721 buff.write(_struct_12d.pack(*_v21.P))
00722 _x = _v21
00723 buff.write(_struct_2I.pack(_x.binning_x, _x.binning_y))
00724 _v24 = _v21.roi
00725 _x = _v24
00726 buff.write(_struct_4IB.pack(_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify))
00727 _v25 = val1.pose
00728 _v26 = _v25.header
00729 buff.write(_struct_I.pack(_v26.seq))
00730 _v27 = _v26.stamp
00731 _x = _v27
00732 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00733 _x = _v26.frame_id
00734 length = len(_x)
00735 buff.write(struct.pack('<I%ss'%length, length, _x))
00736 _v28 = _v25.pose
00737 _v29 = _v28.position
00738 _x = _v29
00739 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00740 _v30 = _v28.orientation
00741 _x = _v30
00742 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00743 length = len(val1.boundingbox)
00744 buff.write(_struct_I.pack(length))
00745 pattern = '<%sd'%length
00746 buff.write(struct.pack(pattern, *val1.boundingbox))
00747 except struct.error, se: self._check_types(se)
00748 except TypeError, te: self._check_types(te)
00749
00750 def deserialize(self, str):
00751 """
00752 unpack serialized message in str into this message instance
00753 @param str: byte array of serialized message
00754 @type str: str
00755 """
00756 try:
00757 end = 0
00758 start = end
00759 end += 4
00760 (length,) = _struct_I.unpack(str[start:end])
00761 self.objects = []
00762 for i in xrange(0, length):
00763 val1 = pr2_pick_and_place_service.msg.PickPlaceObject()
00764 start = end
00765 end += 4
00766 (val1.objectid,) = _struct_i.unpack(str[start:end])
00767 _v31 = val1.object
00768 start = end
00769 end += 4
00770 (length,) = _struct_I.unpack(str[start:end])
00771 start = end
00772 end += length
00773 _v31.reference_frame_id = str[start:end]
00774 start = end
00775 end += 4
00776 (length,) = _struct_I.unpack(str[start:end])
00777 _v31.potential_models = []
00778 for i in xrange(0, length):
00779 val3 = household_objects_database_msgs.msg.DatabaseModelPose()
00780 start = end
00781 end += 4
00782 (val3.model_id,) = _struct_i.unpack(str[start:end])
00783 _v32 = val3.pose
00784 _v33 = _v32.header
00785 start = end
00786 end += 4
00787 (_v33.seq,) = _struct_I.unpack(str[start:end])
00788 _v34 = _v33.stamp
00789 _x = _v34
00790 start = end
00791 end += 8
00792 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00793 start = end
00794 end += 4
00795 (length,) = _struct_I.unpack(str[start:end])
00796 start = end
00797 end += length
00798 _v33.frame_id = str[start:end]
00799 _v35 = _v32.pose
00800 _v36 = _v35.position
00801 _x = _v36
00802 start = end
00803 end += 24
00804 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00805 _v37 = _v35.orientation
00806 _x = _v37
00807 start = end
00808 end += 32
00809 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00810 start = end
00811 end += 4
00812 (val3.confidence,) = _struct_f.unpack(str[start:end])
00813 _v31.potential_models.append(val3)
00814 _v38 = _v31.cluster
00815 _v39 = _v38.header
00816 start = end
00817 end += 4
00818 (_v39.seq,) = _struct_I.unpack(str[start:end])
00819 _v40 = _v39.stamp
00820 _x = _v40
00821 start = end
00822 end += 8
00823 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00824 start = end
00825 end += 4
00826 (length,) = _struct_I.unpack(str[start:end])
00827 start = end
00828 end += length
00829 _v39.frame_id = str[start:end]
00830 start = end
00831 end += 4
00832 (length,) = _struct_I.unpack(str[start:end])
00833 _v38.points = []
00834 for i in xrange(0, length):
00835 val4 = geometry_msgs.msg.Point32()
00836 _x = val4
00837 start = end
00838 end += 12
00839 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00840 _v38.points.append(val4)
00841 start = end
00842 end += 4
00843 (length,) = _struct_I.unpack(str[start:end])
00844 _v38.channels = []
00845 for i in xrange(0, length):
00846 val4 = sensor_msgs.msg.ChannelFloat32()
00847 start = end
00848 end += 4
00849 (length,) = _struct_I.unpack(str[start:end])
00850 start = end
00851 end += length
00852 val4.name = str[start:end]
00853 start = end
00854 end += 4
00855 (length,) = _struct_I.unpack(str[start:end])
00856 pattern = '<%sf'%length
00857 start = end
00858 end += struct.calcsize(pattern)
00859 val4.values = struct.unpack(pattern, str[start:end])
00860 _v38.channels.append(val4)
00861 _v41 = _v31.region
00862 _v42 = _v41.cloud
00863 _v43 = _v42.header
00864 start = end
00865 end += 4
00866 (_v43.seq,) = _struct_I.unpack(str[start:end])
00867 _v44 = _v43.stamp
00868 _x = _v44
00869 start = end
00870 end += 8
00871 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00872 start = end
00873 end += 4
00874 (length,) = _struct_I.unpack(str[start:end])
00875 start = end
00876 end += length
00877 _v43.frame_id = str[start:end]
00878 _x = _v42
00879 start = end
00880 end += 8
00881 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00882 start = end
00883 end += 4
00884 (length,) = _struct_I.unpack(str[start:end])
00885 _v42.fields = []
00886 for i in xrange(0, length):
00887 val5 = sensor_msgs.msg.PointField()
00888 start = end
00889 end += 4
00890 (length,) = _struct_I.unpack(str[start:end])
00891 start = end
00892 end += length
00893 val5.name = str[start:end]
00894 _x = val5
00895 start = end
00896 end += 9
00897 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00898 _v42.fields.append(val5)
00899 _x = _v42
00900 start = end
00901 end += 9
00902 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00903 _v42.is_bigendian = bool(_v42.is_bigendian)
00904 start = end
00905 end += 4
00906 (length,) = _struct_I.unpack(str[start:end])
00907 start = end
00908 end += length
00909 _v42.data = str[start:end]
00910 start = end
00911 end += 1
00912 (_v42.is_dense,) = _struct_B.unpack(str[start:end])
00913 _v42.is_dense = bool(_v42.is_dense)
00914 start = end
00915 end += 4
00916 (length,) = _struct_I.unpack(str[start:end])
00917 pattern = '<%si'%length
00918 start = end
00919 end += struct.calcsize(pattern)
00920 _v41.mask = struct.unpack(pattern, str[start:end])
00921 _v45 = _v41.image
00922 _v46 = _v45.header
00923 start = end
00924 end += 4
00925 (_v46.seq,) = _struct_I.unpack(str[start:end])
00926 _v47 = _v46.stamp
00927 _x = _v47
00928 start = end
00929 end += 8
00930 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00931 start = end
00932 end += 4
00933 (length,) = _struct_I.unpack(str[start:end])
00934 start = end
00935 end += length
00936 _v46.frame_id = str[start:end]
00937 _x = _v45
00938 start = end
00939 end += 8
00940 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00941 start = end
00942 end += 4
00943 (length,) = _struct_I.unpack(str[start:end])
00944 start = end
00945 end += length
00946 _v45.encoding = str[start:end]
00947 _x = _v45
00948 start = end
00949 end += 5
00950 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
00951 start = end
00952 end += 4
00953 (length,) = _struct_I.unpack(str[start:end])
00954 start = end
00955 end += length
00956 _v45.data = str[start:end]
00957 _v48 = _v41.disparity_image
00958 _v49 = _v48.header
00959 start = end
00960 end += 4
00961 (_v49.seq,) = _struct_I.unpack(str[start:end])
00962 _v50 = _v49.stamp
00963 _x = _v50
00964 start = end
00965 end += 8
00966 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00967 start = end
00968 end += 4
00969 (length,) = _struct_I.unpack(str[start:end])
00970 start = end
00971 end += length
00972 _v49.frame_id = str[start:end]
00973 _x = _v48
00974 start = end
00975 end += 8
00976 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00977 start = end
00978 end += 4
00979 (length,) = _struct_I.unpack(str[start:end])
00980 start = end
00981 end += length
00982 _v48.encoding = str[start:end]
00983 _x = _v48
00984 start = end
00985 end += 5
00986 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
00987 start = end
00988 end += 4
00989 (length,) = _struct_I.unpack(str[start:end])
00990 start = end
00991 end += length
00992 _v48.data = str[start:end]
00993 _v51 = _v41.cam_info
00994 _v52 = _v51.header
00995 start = end
00996 end += 4
00997 (_v52.seq,) = _struct_I.unpack(str[start:end])
00998 _v53 = _v52.stamp
00999 _x = _v53
01000 start = end
01001 end += 8
01002 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01003 start = end
01004 end += 4
01005 (length,) = _struct_I.unpack(str[start:end])
01006 start = end
01007 end += length
01008 _v52.frame_id = str[start:end]
01009 _x = _v51
01010 start = end
01011 end += 8
01012 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01013 start = end
01014 end += 4
01015 (length,) = _struct_I.unpack(str[start:end])
01016 start = end
01017 end += length
01018 _v51.distortion_model = str[start:end]
01019 start = end
01020 end += 4
01021 (length,) = _struct_I.unpack(str[start:end])
01022 pattern = '<%sd'%length
01023 start = end
01024 end += struct.calcsize(pattern)
01025 _v51.D = struct.unpack(pattern, str[start:end])
01026 start = end
01027 end += 72
01028 _v51.K = _struct_9d.unpack(str[start:end])
01029 start = end
01030 end += 72
01031 _v51.R = _struct_9d.unpack(str[start:end])
01032 start = end
01033 end += 96
01034 _v51.P = _struct_12d.unpack(str[start:end])
01035 _x = _v51
01036 start = end
01037 end += 8
01038 (_x.binning_x, _x.binning_y,) = _struct_2I.unpack(str[start:end])
01039 _v54 = _v51.roi
01040 _x = _v54
01041 start = end
01042 end += 17
01043 (_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify,) = _struct_4IB.unpack(str[start:end])
01044 _v54.do_rectify = bool(_v54.do_rectify)
01045 _v55 = val1.pose
01046 _v56 = _v55.header
01047 start = end
01048 end += 4
01049 (_v56.seq,) = _struct_I.unpack(str[start:end])
01050 _v57 = _v56.stamp
01051 _x = _v57
01052 start = end
01053 end += 8
01054 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01055 start = end
01056 end += 4
01057 (length,) = _struct_I.unpack(str[start:end])
01058 start = end
01059 end += length
01060 _v56.frame_id = str[start:end]
01061 _v58 = _v55.pose
01062 _v59 = _v58.position
01063 _x = _v59
01064 start = end
01065 end += 24
01066 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01067 _v60 = _v58.orientation
01068 _x = _v60
01069 start = end
01070 end += 32
01071 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01072 start = end
01073 end += 4
01074 (length,) = _struct_I.unpack(str[start:end])
01075 pattern = '<%sd'%length
01076 start = end
01077 end += struct.calcsize(pattern)
01078 val1.boundingbox = struct.unpack(pattern, str[start:end])
01079 self.objects.append(val1)
01080 return self
01081 except struct.error, e:
01082 raise roslib.message.DeserializationError(e) #most likely buffer underfill
01083
01084
01085 def serialize_numpy(self, buff, numpy):
01086 """
01087 serialize message with numpy array types into buffer
01088 @param buff: buffer
01089 @type buff: StringIO
01090 @param numpy: numpy python module
01091 @type numpy module
01092 """
01093 try:
01094 length = len(self.objects)
01095 buff.write(_struct_I.pack(length))
01096 for val1 in self.objects:
01097 buff.write(_struct_i.pack(val1.objectid))
01098 _v61 = val1.object
01099 _x = _v61.reference_frame_id
01100 length = len(_x)
01101 buff.write(struct.pack('<I%ss'%length, length, _x))
01102 length = len(_v61.potential_models)
01103 buff.write(_struct_I.pack(length))
01104 for val3 in _v61.potential_models:
01105 buff.write(_struct_i.pack(val3.model_id))
01106 _v62 = val3.pose
01107 _v63 = _v62.header
01108 buff.write(_struct_I.pack(_v63.seq))
01109 _v64 = _v63.stamp
01110 _x = _v64
01111 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01112 _x = _v63.frame_id
01113 length = len(_x)
01114 buff.write(struct.pack('<I%ss'%length, length, _x))
01115 _v65 = _v62.pose
01116 _v66 = _v65.position
01117 _x = _v66
01118 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01119 _v67 = _v65.orientation
01120 _x = _v67
01121 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01122 buff.write(_struct_f.pack(val3.confidence))
01123 _v68 = _v61.cluster
01124 _v69 = _v68.header
01125 buff.write(_struct_I.pack(_v69.seq))
01126 _v70 = _v69.stamp
01127 _x = _v70
01128 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01129 _x = _v69.frame_id
01130 length = len(_x)
01131 buff.write(struct.pack('<I%ss'%length, length, _x))
01132 length = len(_v68.points)
01133 buff.write(_struct_I.pack(length))
01134 for val4 in _v68.points:
01135 _x = val4
01136 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
01137 length = len(_v68.channels)
01138 buff.write(_struct_I.pack(length))
01139 for val4 in _v68.channels:
01140 _x = val4.name
01141 length = len(_x)
01142 buff.write(struct.pack('<I%ss'%length, length, _x))
01143 length = len(val4.values)
01144 buff.write(_struct_I.pack(length))
01145 pattern = '<%sf'%length
01146 buff.write(val4.values.tostring())
01147 _v71 = _v61.region
01148 _v72 = _v71.cloud
01149 _v73 = _v72.header
01150 buff.write(_struct_I.pack(_v73.seq))
01151 _v74 = _v73.stamp
01152 _x = _v74
01153 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01154 _x = _v73.frame_id
01155 length = len(_x)
01156 buff.write(struct.pack('<I%ss'%length, length, _x))
01157 _x = _v72
01158 buff.write(_struct_2I.pack(_x.height, _x.width))
01159 length = len(_v72.fields)
01160 buff.write(_struct_I.pack(length))
01161 for val5 in _v72.fields:
01162 _x = val5.name
01163 length = len(_x)
01164 buff.write(struct.pack('<I%ss'%length, length, _x))
01165 _x = val5
01166 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01167 _x = _v72
01168 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
01169 _x = _v72.data
01170 length = len(_x)
01171 # - if encoded as a list instead, serialize as bytes instead of string
01172 if type(_x) in [list, tuple]:
01173 buff.write(struct.pack('<I%sB'%length, length, *_x))
01174 else:
01175 buff.write(struct.pack('<I%ss'%length, length, _x))
01176 buff.write(_struct_B.pack(_v72.is_dense))
01177 length = len(_v71.mask)
01178 buff.write(_struct_I.pack(length))
01179 pattern = '<%si'%length
01180 buff.write(_v71.mask.tostring())
01181 _v75 = _v71.image
01182 _v76 = _v75.header
01183 buff.write(_struct_I.pack(_v76.seq))
01184 _v77 = _v76.stamp
01185 _x = _v77
01186 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01187 _x = _v76.frame_id
01188 length = len(_x)
01189 buff.write(struct.pack('<I%ss'%length, length, _x))
01190 _x = _v75
01191 buff.write(_struct_2I.pack(_x.height, _x.width))
01192 _x = _v75.encoding
01193 length = len(_x)
01194 buff.write(struct.pack('<I%ss'%length, length, _x))
01195 _x = _v75
01196 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
01197 _x = _v75.data
01198 length = len(_x)
01199 # - if encoded as a list instead, serialize as bytes instead of string
01200 if type(_x) in [list, tuple]:
01201 buff.write(struct.pack('<I%sB'%length, length, *_x))
01202 else:
01203 buff.write(struct.pack('<I%ss'%length, length, _x))
01204 _v78 = _v71.disparity_image
01205 _v79 = _v78.header
01206 buff.write(_struct_I.pack(_v79.seq))
01207 _v80 = _v79.stamp
01208 _x = _v80
01209 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01210 _x = _v79.frame_id
01211 length = len(_x)
01212 buff.write(struct.pack('<I%ss'%length, length, _x))
01213 _x = _v78
01214 buff.write(_struct_2I.pack(_x.height, _x.width))
01215 _x = _v78.encoding
01216 length = len(_x)
01217 buff.write(struct.pack('<I%ss'%length, length, _x))
01218 _x = _v78
01219 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
01220 _x = _v78.data
01221 length = len(_x)
01222 # - if encoded as a list instead, serialize as bytes instead of string
01223 if type(_x) in [list, tuple]:
01224 buff.write(struct.pack('<I%sB'%length, length, *_x))
01225 else:
01226 buff.write(struct.pack('<I%ss'%length, length, _x))
01227 _v81 = _v71.cam_info
01228 _v82 = _v81.header
01229 buff.write(_struct_I.pack(_v82.seq))
01230 _v83 = _v82.stamp
01231 _x = _v83
01232 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01233 _x = _v82.frame_id
01234 length = len(_x)
01235 buff.write(struct.pack('<I%ss'%length, length, _x))
01236 _x = _v81
01237 buff.write(_struct_2I.pack(_x.height, _x.width))
01238 _x = _v81.distortion_model
01239 length = len(_x)
01240 buff.write(struct.pack('<I%ss'%length, length, _x))
01241 length = len(_v81.D)
01242 buff.write(_struct_I.pack(length))
01243 pattern = '<%sd'%length
01244 buff.write(_v81.D.tostring())
01245 buff.write(_v81.K.tostring())
01246 buff.write(_v81.R.tostring())
01247 buff.write(_v81.P.tostring())
01248 _x = _v81
01249 buff.write(_struct_2I.pack(_x.binning_x, _x.binning_y))
01250 _v84 = _v81.roi
01251 _x = _v84
01252 buff.write(_struct_4IB.pack(_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify))
01253 _v85 = val1.pose
01254 _v86 = _v85.header
01255 buff.write(_struct_I.pack(_v86.seq))
01256 _v87 = _v86.stamp
01257 _x = _v87
01258 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01259 _x = _v86.frame_id
01260 length = len(_x)
01261 buff.write(struct.pack('<I%ss'%length, length, _x))
01262 _v88 = _v85.pose
01263 _v89 = _v88.position
01264 _x = _v89
01265 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01266 _v90 = _v88.orientation
01267 _x = _v90
01268 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01269 length = len(val1.boundingbox)
01270 buff.write(_struct_I.pack(length))
01271 pattern = '<%sd'%length
01272 buff.write(val1.boundingbox.tostring())
01273 except struct.error, se: self._check_types(se)
01274 except TypeError, te: self._check_types(te)
01275
01276 def deserialize_numpy(self, str, numpy):
01277 """
01278 unpack serialized message in str into this message instance using numpy for array types
01279 @param str: byte array of serialized message
01280 @type str: str
01281 @param numpy: numpy python module
01282 @type numpy: module
01283 """
01284 try:
01285 end = 0
01286 start = end
01287 end += 4
01288 (length,) = _struct_I.unpack(str[start:end])
01289 self.objects = []
01290 for i in xrange(0, length):
01291 val1 = pr2_pick_and_place_service.msg.PickPlaceObject()
01292 start = end
01293 end += 4
01294 (val1.objectid,) = _struct_i.unpack(str[start:end])
01295 _v91 = val1.object
01296 start = end
01297 end += 4
01298 (length,) = _struct_I.unpack(str[start:end])
01299 start = end
01300 end += length
01301 _v91.reference_frame_id = str[start:end]
01302 start = end
01303 end += 4
01304 (length,) = _struct_I.unpack(str[start:end])
01305 _v91.potential_models = []
01306 for i in xrange(0, length):
01307 val3 = household_objects_database_msgs.msg.DatabaseModelPose()
01308 start = end
01309 end += 4
01310 (val3.model_id,) = _struct_i.unpack(str[start:end])
01311 _v92 = val3.pose
01312 _v93 = _v92.header
01313 start = end
01314 end += 4
01315 (_v93.seq,) = _struct_I.unpack(str[start:end])
01316 _v94 = _v93.stamp
01317 _x = _v94
01318 start = end
01319 end += 8
01320 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01321 start = end
01322 end += 4
01323 (length,) = _struct_I.unpack(str[start:end])
01324 start = end
01325 end += length
01326 _v93.frame_id = str[start:end]
01327 _v95 = _v92.pose
01328 _v96 = _v95.position
01329 _x = _v96
01330 start = end
01331 end += 24
01332 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01333 _v97 = _v95.orientation
01334 _x = _v97
01335 start = end
01336 end += 32
01337 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01338 start = end
01339 end += 4
01340 (val3.confidence,) = _struct_f.unpack(str[start:end])
01341 _v91.potential_models.append(val3)
01342 _v98 = _v91.cluster
01343 _v99 = _v98.header
01344 start = end
01345 end += 4
01346 (_v99.seq,) = _struct_I.unpack(str[start:end])
01347 _v100 = _v99.stamp
01348 _x = _v100
01349 start = end
01350 end += 8
01351 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01352 start = end
01353 end += 4
01354 (length,) = _struct_I.unpack(str[start:end])
01355 start = end
01356 end += length
01357 _v99.frame_id = str[start:end]
01358 start = end
01359 end += 4
01360 (length,) = _struct_I.unpack(str[start:end])
01361 _v98.points = []
01362 for i in xrange(0, length):
01363 val4 = geometry_msgs.msg.Point32()
01364 _x = val4
01365 start = end
01366 end += 12
01367 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
01368 _v98.points.append(val4)
01369 start = end
01370 end += 4
01371 (length,) = _struct_I.unpack(str[start:end])
01372 _v98.channels = []
01373 for i in xrange(0, length):
01374 val4 = sensor_msgs.msg.ChannelFloat32()
01375 start = end
01376 end += 4
01377 (length,) = _struct_I.unpack(str[start:end])
01378 start = end
01379 end += length
01380 val4.name = str[start:end]
01381 start = end
01382 end += 4
01383 (length,) = _struct_I.unpack(str[start:end])
01384 pattern = '<%sf'%length
01385 start = end
01386 end += struct.calcsize(pattern)
01387 val4.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
01388 _v98.channels.append(val4)
01389 _v101 = _v91.region
01390 _v102 = _v101.cloud
01391 _v103 = _v102.header
01392 start = end
01393 end += 4
01394 (_v103.seq,) = _struct_I.unpack(str[start:end])
01395 _v104 = _v103.stamp
01396 _x = _v104
01397 start = end
01398 end += 8
01399 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01400 start = end
01401 end += 4
01402 (length,) = _struct_I.unpack(str[start:end])
01403 start = end
01404 end += length
01405 _v103.frame_id = str[start:end]
01406 _x = _v102
01407 start = end
01408 end += 8
01409 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01410 start = end
01411 end += 4
01412 (length,) = _struct_I.unpack(str[start:end])
01413 _v102.fields = []
01414 for i in xrange(0, length):
01415 val5 = sensor_msgs.msg.PointField()
01416 start = end
01417 end += 4
01418 (length,) = _struct_I.unpack(str[start:end])
01419 start = end
01420 end += length
01421 val5.name = str[start:end]
01422 _x = val5
01423 start = end
01424 end += 9
01425 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01426 _v102.fields.append(val5)
01427 _x = _v102
01428 start = end
01429 end += 9
01430 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01431 _v102.is_bigendian = bool(_v102.is_bigendian)
01432 start = end
01433 end += 4
01434 (length,) = _struct_I.unpack(str[start:end])
01435 start = end
01436 end += length
01437 _v102.data = str[start:end]
01438 start = end
01439 end += 1
01440 (_v102.is_dense,) = _struct_B.unpack(str[start:end])
01441 _v102.is_dense = bool(_v102.is_dense)
01442 start = end
01443 end += 4
01444 (length,) = _struct_I.unpack(str[start:end])
01445 pattern = '<%si'%length
01446 start = end
01447 end += struct.calcsize(pattern)
01448 _v101.mask = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01449 _v105 = _v101.image
01450 _v106 = _v105.header
01451 start = end
01452 end += 4
01453 (_v106.seq,) = _struct_I.unpack(str[start:end])
01454 _v107 = _v106.stamp
01455 _x = _v107
01456 start = end
01457 end += 8
01458 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01459 start = end
01460 end += 4
01461 (length,) = _struct_I.unpack(str[start:end])
01462 start = end
01463 end += length
01464 _v106.frame_id = str[start:end]
01465 _x = _v105
01466 start = end
01467 end += 8
01468 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01469 start = end
01470 end += 4
01471 (length,) = _struct_I.unpack(str[start:end])
01472 start = end
01473 end += length
01474 _v105.encoding = str[start:end]
01475 _x = _v105
01476 start = end
01477 end += 5
01478 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
01479 start = end
01480 end += 4
01481 (length,) = _struct_I.unpack(str[start:end])
01482 start = end
01483 end += length
01484 _v105.data = str[start:end]
01485 _v108 = _v101.disparity_image
01486 _v109 = _v108.header
01487 start = end
01488 end += 4
01489 (_v109.seq,) = _struct_I.unpack(str[start:end])
01490 _v110 = _v109.stamp
01491 _x = _v110
01492 start = end
01493 end += 8
01494 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01495 start = end
01496 end += 4
01497 (length,) = _struct_I.unpack(str[start:end])
01498 start = end
01499 end += length
01500 _v109.frame_id = str[start:end]
01501 _x = _v108
01502 start = end
01503 end += 8
01504 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01505 start = end
01506 end += 4
01507 (length,) = _struct_I.unpack(str[start:end])
01508 start = end
01509 end += length
01510 _v108.encoding = str[start:end]
01511 _x = _v108
01512 start = end
01513 end += 5
01514 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
01515 start = end
01516 end += 4
01517 (length,) = _struct_I.unpack(str[start:end])
01518 start = end
01519 end += length
01520 _v108.data = str[start:end]
01521 _v111 = _v101.cam_info
01522 _v112 = _v111.header
01523 start = end
01524 end += 4
01525 (_v112.seq,) = _struct_I.unpack(str[start:end])
01526 _v113 = _v112.stamp
01527 _x = _v113
01528 start = end
01529 end += 8
01530 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01531 start = end
01532 end += 4
01533 (length,) = _struct_I.unpack(str[start:end])
01534 start = end
01535 end += length
01536 _v112.frame_id = str[start:end]
01537 _x = _v111
01538 start = end
01539 end += 8
01540 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01541 start = end
01542 end += 4
01543 (length,) = _struct_I.unpack(str[start:end])
01544 start = end
01545 end += length
01546 _v111.distortion_model = str[start:end]
01547 start = end
01548 end += 4
01549 (length,) = _struct_I.unpack(str[start:end])
01550 pattern = '<%sd'%length
01551 start = end
01552 end += struct.calcsize(pattern)
01553 _v111.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01554 start = end
01555 end += 72
01556 _v111.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01557 start = end
01558 end += 72
01559 _v111.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
01560 start = end
01561 end += 96
01562 _v111.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12)
01563 _x = _v111
01564 start = end
01565 end += 8
01566 (_x.binning_x, _x.binning_y,) = _struct_2I.unpack(str[start:end])
01567 _v114 = _v111.roi
01568 _x = _v114
01569 start = end
01570 end += 17
01571 (_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify,) = _struct_4IB.unpack(str[start:end])
01572 _v114.do_rectify = bool(_v114.do_rectify)
01573 _v115 = val1.pose
01574 _v116 = _v115.header
01575 start = end
01576 end += 4
01577 (_v116.seq,) = _struct_I.unpack(str[start:end])
01578 _v117 = _v116.stamp
01579 _x = _v117
01580 start = end
01581 end += 8
01582 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01583 start = end
01584 end += 4
01585 (length,) = _struct_I.unpack(str[start:end])
01586 start = end
01587 end += length
01588 _v116.frame_id = str[start:end]
01589 _v118 = _v115.pose
01590 _v119 = _v118.position
01591 _x = _v119
01592 start = end
01593 end += 24
01594 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01595 _v120 = _v118.orientation
01596 _x = _v120
01597 start = end
01598 end += 32
01599 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01600 start = end
01601 end += 4
01602 (length,) = _struct_I.unpack(str[start:end])
01603 pattern = '<%sd'%length
01604 start = end
01605 end += struct.calcsize(pattern)
01606 val1.boundingbox = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01607 self.objects.append(val1)
01608 return self
01609 except struct.error, e:
01610 raise roslib.message.DeserializationError(e) #most likely buffer underfill
01611
01612 _struct_I = roslib.message.struct_I
01613 _struct_IBI = struct.Struct("<IBI")
01614 _struct_B = struct.Struct("<B")
01615 _struct_12d = struct.Struct("<12d")
01616 _struct_f = struct.Struct("<f")
01617 _struct_i = struct.Struct("<i")
01618 _struct_BI = struct.Struct("<BI")
01619 _struct_3f = struct.Struct("<3f")
01620 _struct_9d = struct.Struct("<9d")
01621 _struct_B2I = struct.Struct("<B2I")
01622 _struct_4d = struct.Struct("<4d")
01623 _struct_2I = struct.Struct("<2I")
01624 _struct_4IB = struct.Struct("<4IB")
01625 _struct_3d = struct.Struct("<3d")
01626 class DetectObjects(roslib.message.ServiceDefinition):
01627 _type = 'pr2_pick_and_place_service/DetectObjects'
01628 _md5sum = 'b3897163b7dda37e304d68b162036545'
01629 _request_class = DetectObjectsRequest
01630 _response_class = DetectObjectsResponse