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