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