$search
00001 """autogenerated by genmsg_py from GetPreGraspRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class GetPreGraspRequest(roslib.message.Message): 00008 _md5sum = "75ce1ecb5a310c421ca60df09c23681a" 00009 _type = "srs_grasping/GetPreGraspRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """int32 object_id 00012 geometry_msgs/Pose object_pose 00013 float32[] pregrasp_offsets 00014 int32 num_configurations 00015 00016 ================================================================================ 00017 MSG: geometry_msgs/Pose 00018 # A representation of pose in free space, composed of postion and orientation. 00019 Point position 00020 Quaternion orientation 00021 00022 ================================================================================ 00023 MSG: geometry_msgs/Point 00024 # This contains the position of a point in free space 00025 float64 x 00026 float64 y 00027 float64 z 00028 00029 ================================================================================ 00030 MSG: geometry_msgs/Quaternion 00031 # This represents an orientation in free space in quaternion form. 00032 00033 float64 x 00034 float64 y 00035 float64 z 00036 float64 w 00037 00038 """ 00039 __slots__ = ['object_id','object_pose','pregrasp_offsets','num_configurations'] 00040 _slot_types = ['int32','geometry_msgs/Pose','float32[]','int32'] 00041 00042 def __init__(self, *args, **kwds): 00043 """ 00044 Constructor. Any message fields that are implicitly/explicitly 00045 set to None will be assigned a default value. The recommend 00046 use is keyword arguments as this is more robust to future message 00047 changes. You cannot mix in-order arguments and keyword arguments. 00048 00049 The available fields are: 00050 object_id,object_pose,pregrasp_offsets,num_configurations 00051 00052 @param args: complete set of field values, in .msg order 00053 @param kwds: use keyword arguments corresponding to message field names 00054 to set specific fields. 00055 """ 00056 if args or kwds: 00057 super(GetPreGraspRequest, self).__init__(*args, **kwds) 00058 #message fields cannot be None, assign default values for those that are 00059 if self.object_id is None: 00060 self.object_id = 0 00061 if self.object_pose is None: 00062 self.object_pose = geometry_msgs.msg.Pose() 00063 if self.pregrasp_offsets is None: 00064 self.pregrasp_offsets = [] 00065 if self.num_configurations is None: 00066 self.num_configurations = 0 00067 else: 00068 self.object_id = 0 00069 self.object_pose = geometry_msgs.msg.Pose() 00070 self.pregrasp_offsets = [] 00071 self.num_configurations = 0 00072 00073 def _get_types(self): 00074 """ 00075 internal API method 00076 """ 00077 return self._slot_types 00078 00079 def serialize(self, buff): 00080 """ 00081 serialize message into buffer 00082 @param buff: buffer 00083 @type buff: StringIO 00084 """ 00085 try: 00086 _x = self 00087 buff.write(_struct_i7d.pack(_x.object_id, _x.object_pose.position.x, _x.object_pose.position.y, _x.object_pose.position.z, _x.object_pose.orientation.x, _x.object_pose.orientation.y, _x.object_pose.orientation.z, _x.object_pose.orientation.w)) 00088 length = len(self.pregrasp_offsets) 00089 buff.write(_struct_I.pack(length)) 00090 pattern = '<%sf'%length 00091 buff.write(struct.pack(pattern, *self.pregrasp_offsets)) 00092 buff.write(_struct_i.pack(self.num_configurations)) 00093 except struct.error as se: self._check_types(se) 00094 except TypeError as te: self._check_types(te) 00095 00096 def deserialize(self, str): 00097 """ 00098 unpack serialized message in str into this message instance 00099 @param str: byte array of serialized message 00100 @type str: str 00101 """ 00102 try: 00103 if self.object_pose is None: 00104 self.object_pose = geometry_msgs.msg.Pose() 00105 end = 0 00106 _x = self 00107 start = end 00108 end += 60 00109 (_x.object_id, _x.object_pose.position.x, _x.object_pose.position.y, _x.object_pose.position.z, _x.object_pose.orientation.x, _x.object_pose.orientation.y, _x.object_pose.orientation.z, _x.object_pose.orientation.w,) = _struct_i7d.unpack(str[start:end]) 00110 start = end 00111 end += 4 00112 (length,) = _struct_I.unpack(str[start:end]) 00113 pattern = '<%sf'%length 00114 start = end 00115 end += struct.calcsize(pattern) 00116 self.pregrasp_offsets = struct.unpack(pattern, str[start:end]) 00117 start = end 00118 end += 4 00119 (self.num_configurations,) = _struct_i.unpack(str[start:end]) 00120 return self 00121 except struct.error as e: 00122 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00123 00124 00125 def serialize_numpy(self, buff, numpy): 00126 """ 00127 serialize message with numpy array types into buffer 00128 @param buff: buffer 00129 @type buff: StringIO 00130 @param numpy: numpy python module 00131 @type numpy module 00132 """ 00133 try: 00134 _x = self 00135 buff.write(_struct_i7d.pack(_x.object_id, _x.object_pose.position.x, _x.object_pose.position.y, _x.object_pose.position.z, _x.object_pose.orientation.x, _x.object_pose.orientation.y, _x.object_pose.orientation.z, _x.object_pose.orientation.w)) 00136 length = len(self.pregrasp_offsets) 00137 buff.write(_struct_I.pack(length)) 00138 pattern = '<%sf'%length 00139 buff.write(self.pregrasp_offsets.tostring()) 00140 buff.write(_struct_i.pack(self.num_configurations)) 00141 except struct.error as se: self._check_types(se) 00142 except TypeError as te: self._check_types(te) 00143 00144 def deserialize_numpy(self, str, numpy): 00145 """ 00146 unpack serialized message in str into this message instance using numpy for array types 00147 @param str: byte array of serialized message 00148 @type str: str 00149 @param numpy: numpy python module 00150 @type numpy: module 00151 """ 00152 try: 00153 if self.object_pose is None: 00154 self.object_pose = geometry_msgs.msg.Pose() 00155 end = 0 00156 _x = self 00157 start = end 00158 end += 60 00159 (_x.object_id, _x.object_pose.position.x, _x.object_pose.position.y, _x.object_pose.position.z, _x.object_pose.orientation.x, _x.object_pose.orientation.y, _x.object_pose.orientation.z, _x.object_pose.orientation.w,) = _struct_i7d.unpack(str[start:end]) 00160 start = end 00161 end += 4 00162 (length,) = _struct_I.unpack(str[start:end]) 00163 pattern = '<%sf'%length 00164 start = end 00165 end += struct.calcsize(pattern) 00166 self.pregrasp_offsets = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00167 start = end 00168 end += 4 00169 (self.num_configurations,) = _struct_i.unpack(str[start:end]) 00170 return self 00171 except struct.error as e: 00172 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00173 00174 _struct_I = roslib.message.struct_I 00175 _struct_i = struct.Struct("<i") 00176 _struct_i7d = struct.Struct("<i7d") 00177 """autogenerated by genmsg_py from GetPreGraspResponse.msg. Do not edit.""" 00178 import roslib.message 00179 import struct 00180 00181 import geometry_msgs.msg 00182 import srs_msgs.msg 00183 import std_msgs.msg 00184 00185 class GetPreGraspResponse(roslib.message.Message): 00186 _md5sum = "538836881add1e5a4677110d671fd2fd" 00187 _type = "srs_grasping/GetPreGraspResponse" 00188 _has_header = False #flag to mark the presence of a Header object 00189 _full_text = """srs_msgs/DBGrasp[] side 00190 srs_msgs/DBGrasp[] mside 00191 srs_msgs/DBGrasp[] front 00192 srs_msgs/DBGrasp[] top 00193 00194 00195 ================================================================================ 00196 MSG: srs_msgs/DBGrasp 00197 int32 object_id 00198 string hand_type 00199 float64[] sdh_joint_values 00200 geometry_msgs/PoseStamped pre_grasp 00201 geometry_msgs/PoseStamped grasp 00202 string category 00203 00204 ================================================================================ 00205 MSG: geometry_msgs/PoseStamped 00206 # A Pose with reference coordinate frame and timestamp 00207 Header header 00208 Pose pose 00209 00210 ================================================================================ 00211 MSG: std_msgs/Header 00212 # Standard metadata for higher-level stamped data types. 00213 # This is generally used to communicate timestamped data 00214 # in a particular coordinate frame. 00215 # 00216 # sequence ID: consecutively increasing ID 00217 uint32 seq 00218 #Two-integer timestamp that is expressed as: 00219 # * stamp.secs: seconds (stamp_secs) since epoch 00220 # * stamp.nsecs: nanoseconds since stamp_secs 00221 # time-handling sugar is provided by the client library 00222 time stamp 00223 #Frame this data is associated with 00224 # 0: no frame 00225 # 1: global frame 00226 string frame_id 00227 00228 ================================================================================ 00229 MSG: geometry_msgs/Pose 00230 # A representation of pose in free space, composed of postion and orientation. 00231 Point position 00232 Quaternion orientation 00233 00234 ================================================================================ 00235 MSG: geometry_msgs/Point 00236 # This contains the position of a point in free space 00237 float64 x 00238 float64 y 00239 float64 z 00240 00241 ================================================================================ 00242 MSG: geometry_msgs/Quaternion 00243 # This represents an orientation in free space in quaternion form. 00244 00245 float64 x 00246 float64 y 00247 float64 z 00248 float64 w 00249 00250 """ 00251 __slots__ = ['side','mside','front','top'] 00252 _slot_types = ['srs_msgs/DBGrasp[]','srs_msgs/DBGrasp[]','srs_msgs/DBGrasp[]','srs_msgs/DBGrasp[]'] 00253 00254 def __init__(self, *args, **kwds): 00255 """ 00256 Constructor. Any message fields that are implicitly/explicitly 00257 set to None will be assigned a default value. The recommend 00258 use is keyword arguments as this is more robust to future message 00259 changes. You cannot mix in-order arguments and keyword arguments. 00260 00261 The available fields are: 00262 side,mside,front,top 00263 00264 @param args: complete set of field values, in .msg order 00265 @param kwds: use keyword arguments corresponding to message field names 00266 to set specific fields. 00267 """ 00268 if args or kwds: 00269 super(GetPreGraspResponse, self).__init__(*args, **kwds) 00270 #message fields cannot be None, assign default values for those that are 00271 if self.side is None: 00272 self.side = [] 00273 if self.mside is None: 00274 self.mside = [] 00275 if self.front is None: 00276 self.front = [] 00277 if self.top is None: 00278 self.top = [] 00279 else: 00280 self.side = [] 00281 self.mside = [] 00282 self.front = [] 00283 self.top = [] 00284 00285 def _get_types(self): 00286 """ 00287 internal API method 00288 """ 00289 return self._slot_types 00290 00291 def serialize(self, buff): 00292 """ 00293 serialize message into buffer 00294 @param buff: buffer 00295 @type buff: StringIO 00296 """ 00297 try: 00298 length = len(self.side) 00299 buff.write(_struct_I.pack(length)) 00300 for val1 in self.side: 00301 buff.write(_struct_i.pack(val1.object_id)) 00302 _x = val1.hand_type 00303 length = len(_x) 00304 buff.write(struct.pack('<I%ss'%length, length, _x)) 00305 length = len(val1.sdh_joint_values) 00306 buff.write(_struct_I.pack(length)) 00307 pattern = '<%sd'%length 00308 buff.write(struct.pack(pattern, *val1.sdh_joint_values)) 00309 _v1 = val1.pre_grasp 00310 _v2 = _v1.header 00311 buff.write(_struct_I.pack(_v2.seq)) 00312 _v3 = _v2.stamp 00313 _x = _v3 00314 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00315 _x = _v2.frame_id 00316 length = len(_x) 00317 buff.write(struct.pack('<I%ss'%length, length, _x)) 00318 _v4 = _v1.pose 00319 _v5 = _v4.position 00320 _x = _v5 00321 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00322 _v6 = _v4.orientation 00323 _x = _v6 00324 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00325 _v7 = val1.grasp 00326 _v8 = _v7.header 00327 buff.write(_struct_I.pack(_v8.seq)) 00328 _v9 = _v8.stamp 00329 _x = _v9 00330 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00331 _x = _v8.frame_id 00332 length = len(_x) 00333 buff.write(struct.pack('<I%ss'%length, length, _x)) 00334 _v10 = _v7.pose 00335 _v11 = _v10.position 00336 _x = _v11 00337 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00338 _v12 = _v10.orientation 00339 _x = _v12 00340 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00341 _x = val1.category 00342 length = len(_x) 00343 buff.write(struct.pack('<I%ss'%length, length, _x)) 00344 length = len(self.mside) 00345 buff.write(_struct_I.pack(length)) 00346 for val1 in self.mside: 00347 buff.write(_struct_i.pack(val1.object_id)) 00348 _x = val1.hand_type 00349 length = len(_x) 00350 buff.write(struct.pack('<I%ss'%length, length, _x)) 00351 length = len(val1.sdh_joint_values) 00352 buff.write(_struct_I.pack(length)) 00353 pattern = '<%sd'%length 00354 buff.write(struct.pack(pattern, *val1.sdh_joint_values)) 00355 _v13 = val1.pre_grasp 00356 _v14 = _v13.header 00357 buff.write(_struct_I.pack(_v14.seq)) 00358 _v15 = _v14.stamp 00359 _x = _v15 00360 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00361 _x = _v14.frame_id 00362 length = len(_x) 00363 buff.write(struct.pack('<I%ss'%length, length, _x)) 00364 _v16 = _v13.pose 00365 _v17 = _v16.position 00366 _x = _v17 00367 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00368 _v18 = _v16.orientation 00369 _x = _v18 00370 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00371 _v19 = val1.grasp 00372 _v20 = _v19.header 00373 buff.write(_struct_I.pack(_v20.seq)) 00374 _v21 = _v20.stamp 00375 _x = _v21 00376 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00377 _x = _v20.frame_id 00378 length = len(_x) 00379 buff.write(struct.pack('<I%ss'%length, length, _x)) 00380 _v22 = _v19.pose 00381 _v23 = _v22.position 00382 _x = _v23 00383 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00384 _v24 = _v22.orientation 00385 _x = _v24 00386 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00387 _x = val1.category 00388 length = len(_x) 00389 buff.write(struct.pack('<I%ss'%length, length, _x)) 00390 length = len(self.front) 00391 buff.write(_struct_I.pack(length)) 00392 for val1 in self.front: 00393 buff.write(_struct_i.pack(val1.object_id)) 00394 _x = val1.hand_type 00395 length = len(_x) 00396 buff.write(struct.pack('<I%ss'%length, length, _x)) 00397 length = len(val1.sdh_joint_values) 00398 buff.write(_struct_I.pack(length)) 00399 pattern = '<%sd'%length 00400 buff.write(struct.pack(pattern, *val1.sdh_joint_values)) 00401 _v25 = val1.pre_grasp 00402 _v26 = _v25.header 00403 buff.write(_struct_I.pack(_v26.seq)) 00404 _v27 = _v26.stamp 00405 _x = _v27 00406 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00407 _x = _v26.frame_id 00408 length = len(_x) 00409 buff.write(struct.pack('<I%ss'%length, length, _x)) 00410 _v28 = _v25.pose 00411 _v29 = _v28.position 00412 _x = _v29 00413 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00414 _v30 = _v28.orientation 00415 _x = _v30 00416 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00417 _v31 = val1.grasp 00418 _v32 = _v31.header 00419 buff.write(_struct_I.pack(_v32.seq)) 00420 _v33 = _v32.stamp 00421 _x = _v33 00422 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00423 _x = _v32.frame_id 00424 length = len(_x) 00425 buff.write(struct.pack('<I%ss'%length, length, _x)) 00426 _v34 = _v31.pose 00427 _v35 = _v34.position 00428 _x = _v35 00429 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00430 _v36 = _v34.orientation 00431 _x = _v36 00432 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00433 _x = val1.category 00434 length = len(_x) 00435 buff.write(struct.pack('<I%ss'%length, length, _x)) 00436 length = len(self.top) 00437 buff.write(_struct_I.pack(length)) 00438 for val1 in self.top: 00439 buff.write(_struct_i.pack(val1.object_id)) 00440 _x = val1.hand_type 00441 length = len(_x) 00442 buff.write(struct.pack('<I%ss'%length, length, _x)) 00443 length = len(val1.sdh_joint_values) 00444 buff.write(_struct_I.pack(length)) 00445 pattern = '<%sd'%length 00446 buff.write(struct.pack(pattern, *val1.sdh_joint_values)) 00447 _v37 = val1.pre_grasp 00448 _v38 = _v37.header 00449 buff.write(_struct_I.pack(_v38.seq)) 00450 _v39 = _v38.stamp 00451 _x = _v39 00452 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00453 _x = _v38.frame_id 00454 length = len(_x) 00455 buff.write(struct.pack('<I%ss'%length, length, _x)) 00456 _v40 = _v37.pose 00457 _v41 = _v40.position 00458 _x = _v41 00459 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00460 _v42 = _v40.orientation 00461 _x = _v42 00462 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00463 _v43 = val1.grasp 00464 _v44 = _v43.header 00465 buff.write(_struct_I.pack(_v44.seq)) 00466 _v45 = _v44.stamp 00467 _x = _v45 00468 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00469 _x = _v44.frame_id 00470 length = len(_x) 00471 buff.write(struct.pack('<I%ss'%length, length, _x)) 00472 _v46 = _v43.pose 00473 _v47 = _v46.position 00474 _x = _v47 00475 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00476 _v48 = _v46.orientation 00477 _x = _v48 00478 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00479 _x = val1.category 00480 length = len(_x) 00481 buff.write(struct.pack('<I%ss'%length, length, _x)) 00482 except struct.error as se: self._check_types(se) 00483 except TypeError as te: self._check_types(te) 00484 00485 def deserialize(self, str): 00486 """ 00487 unpack serialized message in str into this message instance 00488 @param str: byte array of serialized message 00489 @type str: str 00490 """ 00491 try: 00492 end = 0 00493 start = end 00494 end += 4 00495 (length,) = _struct_I.unpack(str[start:end]) 00496 self.side = [] 00497 for i in range(0, length): 00498 val1 = srs_msgs.msg.DBGrasp() 00499 start = end 00500 end += 4 00501 (val1.object_id,) = _struct_i.unpack(str[start:end]) 00502 start = end 00503 end += 4 00504 (length,) = _struct_I.unpack(str[start:end]) 00505 start = end 00506 end += length 00507 val1.hand_type = str[start:end] 00508 start = end 00509 end += 4 00510 (length,) = _struct_I.unpack(str[start:end]) 00511 pattern = '<%sd'%length 00512 start = end 00513 end += struct.calcsize(pattern) 00514 val1.sdh_joint_values = struct.unpack(pattern, str[start:end]) 00515 _v49 = val1.pre_grasp 00516 _v50 = _v49.header 00517 start = end 00518 end += 4 00519 (_v50.seq,) = _struct_I.unpack(str[start:end]) 00520 _v51 = _v50.stamp 00521 _x = _v51 00522 start = end 00523 end += 8 00524 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00525 start = end 00526 end += 4 00527 (length,) = _struct_I.unpack(str[start:end]) 00528 start = end 00529 end += length 00530 _v50.frame_id = str[start:end] 00531 _v52 = _v49.pose 00532 _v53 = _v52.position 00533 _x = _v53 00534 start = end 00535 end += 24 00536 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00537 _v54 = _v52.orientation 00538 _x = _v54 00539 start = end 00540 end += 32 00541 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00542 _v55 = val1.grasp 00543 _v56 = _v55.header 00544 start = end 00545 end += 4 00546 (_v56.seq,) = _struct_I.unpack(str[start:end]) 00547 _v57 = _v56.stamp 00548 _x = _v57 00549 start = end 00550 end += 8 00551 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00552 start = end 00553 end += 4 00554 (length,) = _struct_I.unpack(str[start:end]) 00555 start = end 00556 end += length 00557 _v56.frame_id = str[start:end] 00558 _v58 = _v55.pose 00559 _v59 = _v58.position 00560 _x = _v59 00561 start = end 00562 end += 24 00563 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00564 _v60 = _v58.orientation 00565 _x = _v60 00566 start = end 00567 end += 32 00568 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00569 start = end 00570 end += 4 00571 (length,) = _struct_I.unpack(str[start:end]) 00572 start = end 00573 end += length 00574 val1.category = str[start:end] 00575 self.side.append(val1) 00576 start = end 00577 end += 4 00578 (length,) = _struct_I.unpack(str[start:end]) 00579 self.mside = [] 00580 for i in range(0, length): 00581 val1 = srs_msgs.msg.DBGrasp() 00582 start = end 00583 end += 4 00584 (val1.object_id,) = _struct_i.unpack(str[start:end]) 00585 start = end 00586 end += 4 00587 (length,) = _struct_I.unpack(str[start:end]) 00588 start = end 00589 end += length 00590 val1.hand_type = str[start:end] 00591 start = end 00592 end += 4 00593 (length,) = _struct_I.unpack(str[start:end]) 00594 pattern = '<%sd'%length 00595 start = end 00596 end += struct.calcsize(pattern) 00597 val1.sdh_joint_values = struct.unpack(pattern, str[start:end]) 00598 _v61 = val1.pre_grasp 00599 _v62 = _v61.header 00600 start = end 00601 end += 4 00602 (_v62.seq,) = _struct_I.unpack(str[start:end]) 00603 _v63 = _v62.stamp 00604 _x = _v63 00605 start = end 00606 end += 8 00607 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00608 start = end 00609 end += 4 00610 (length,) = _struct_I.unpack(str[start:end]) 00611 start = end 00612 end += length 00613 _v62.frame_id = str[start:end] 00614 _v64 = _v61.pose 00615 _v65 = _v64.position 00616 _x = _v65 00617 start = end 00618 end += 24 00619 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00620 _v66 = _v64.orientation 00621 _x = _v66 00622 start = end 00623 end += 32 00624 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00625 _v67 = val1.grasp 00626 _v68 = _v67.header 00627 start = end 00628 end += 4 00629 (_v68.seq,) = _struct_I.unpack(str[start:end]) 00630 _v69 = _v68.stamp 00631 _x = _v69 00632 start = end 00633 end += 8 00634 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00635 start = end 00636 end += 4 00637 (length,) = _struct_I.unpack(str[start:end]) 00638 start = end 00639 end += length 00640 _v68.frame_id = str[start:end] 00641 _v70 = _v67.pose 00642 _v71 = _v70.position 00643 _x = _v71 00644 start = end 00645 end += 24 00646 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00647 _v72 = _v70.orientation 00648 _x = _v72 00649 start = end 00650 end += 32 00651 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00652 start = end 00653 end += 4 00654 (length,) = _struct_I.unpack(str[start:end]) 00655 start = end 00656 end += length 00657 val1.category = str[start:end] 00658 self.mside.append(val1) 00659 start = end 00660 end += 4 00661 (length,) = _struct_I.unpack(str[start:end]) 00662 self.front = [] 00663 for i in range(0, length): 00664 val1 = srs_msgs.msg.DBGrasp() 00665 start = end 00666 end += 4 00667 (val1.object_id,) = _struct_i.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 val1.hand_type = str[start:end] 00674 start = end 00675 end += 4 00676 (length,) = _struct_I.unpack(str[start:end]) 00677 pattern = '<%sd'%length 00678 start = end 00679 end += struct.calcsize(pattern) 00680 val1.sdh_joint_values = struct.unpack(pattern, str[start:end]) 00681 _v73 = val1.pre_grasp 00682 _v74 = _v73.header 00683 start = end 00684 end += 4 00685 (_v74.seq,) = _struct_I.unpack(str[start:end]) 00686 _v75 = _v74.stamp 00687 _x = _v75 00688 start = end 00689 end += 8 00690 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00691 start = end 00692 end += 4 00693 (length,) = _struct_I.unpack(str[start:end]) 00694 start = end 00695 end += length 00696 _v74.frame_id = str[start:end] 00697 _v76 = _v73.pose 00698 _v77 = _v76.position 00699 _x = _v77 00700 start = end 00701 end += 24 00702 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00703 _v78 = _v76.orientation 00704 _x = _v78 00705 start = end 00706 end += 32 00707 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00708 _v79 = val1.grasp 00709 _v80 = _v79.header 00710 start = end 00711 end += 4 00712 (_v80.seq,) = _struct_I.unpack(str[start:end]) 00713 _v81 = _v80.stamp 00714 _x = _v81 00715 start = end 00716 end += 8 00717 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00718 start = end 00719 end += 4 00720 (length,) = _struct_I.unpack(str[start:end]) 00721 start = end 00722 end += length 00723 _v80.frame_id = str[start:end] 00724 _v82 = _v79.pose 00725 _v83 = _v82.position 00726 _x = _v83 00727 start = end 00728 end += 24 00729 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00730 _v84 = _v82.orientation 00731 _x = _v84 00732 start = end 00733 end += 32 00734 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00735 start = end 00736 end += 4 00737 (length,) = _struct_I.unpack(str[start:end]) 00738 start = end 00739 end += length 00740 val1.category = str[start:end] 00741 self.front.append(val1) 00742 start = end 00743 end += 4 00744 (length,) = _struct_I.unpack(str[start:end]) 00745 self.top = [] 00746 for i in range(0, length): 00747 val1 = srs_msgs.msg.DBGrasp() 00748 start = end 00749 end += 4 00750 (val1.object_id,) = _struct_i.unpack(str[start:end]) 00751 start = end 00752 end += 4 00753 (length,) = _struct_I.unpack(str[start:end]) 00754 start = end 00755 end += length 00756 val1.hand_type = str[start:end] 00757 start = end 00758 end += 4 00759 (length,) = _struct_I.unpack(str[start:end]) 00760 pattern = '<%sd'%length 00761 start = end 00762 end += struct.calcsize(pattern) 00763 val1.sdh_joint_values = struct.unpack(pattern, str[start:end]) 00764 _v85 = val1.pre_grasp 00765 _v86 = _v85.header 00766 start = end 00767 end += 4 00768 (_v86.seq,) = _struct_I.unpack(str[start:end]) 00769 _v87 = _v86.stamp 00770 _x = _v87 00771 start = end 00772 end += 8 00773 (_x.secs, _x.nsecs,) = _struct_2I.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 _v86.frame_id = str[start:end] 00780 _v88 = _v85.pose 00781 _v89 = _v88.position 00782 _x = _v89 00783 start = end 00784 end += 24 00785 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00786 _v90 = _v88.orientation 00787 _x = _v90 00788 start = end 00789 end += 32 00790 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00791 _v91 = val1.grasp 00792 _v92 = _v91.header 00793 start = end 00794 end += 4 00795 (_v92.seq,) = _struct_I.unpack(str[start:end]) 00796 _v93 = _v92.stamp 00797 _x = _v93 00798 start = end 00799 end += 8 00800 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00801 start = end 00802 end += 4 00803 (length,) = _struct_I.unpack(str[start:end]) 00804 start = end 00805 end += length 00806 _v92.frame_id = str[start:end] 00807 _v94 = _v91.pose 00808 _v95 = _v94.position 00809 _x = _v95 00810 start = end 00811 end += 24 00812 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00813 _v96 = _v94.orientation 00814 _x = _v96 00815 start = end 00816 end += 32 00817 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00818 start = end 00819 end += 4 00820 (length,) = _struct_I.unpack(str[start:end]) 00821 start = end 00822 end += length 00823 val1.category = str[start:end] 00824 self.top.append(val1) 00825 return self 00826 except struct.error as e: 00827 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00828 00829 00830 def serialize_numpy(self, buff, numpy): 00831 """ 00832 serialize message with numpy array types into buffer 00833 @param buff: buffer 00834 @type buff: StringIO 00835 @param numpy: numpy python module 00836 @type numpy module 00837 """ 00838 try: 00839 length = len(self.side) 00840 buff.write(_struct_I.pack(length)) 00841 for val1 in self.side: 00842 buff.write(_struct_i.pack(val1.object_id)) 00843 _x = val1.hand_type 00844 length = len(_x) 00845 buff.write(struct.pack('<I%ss'%length, length, _x)) 00846 length = len(val1.sdh_joint_values) 00847 buff.write(_struct_I.pack(length)) 00848 pattern = '<%sd'%length 00849 buff.write(val1.sdh_joint_values.tostring()) 00850 _v97 = val1.pre_grasp 00851 _v98 = _v97.header 00852 buff.write(_struct_I.pack(_v98.seq)) 00853 _v99 = _v98.stamp 00854 _x = _v99 00855 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00856 _x = _v98.frame_id 00857 length = len(_x) 00858 buff.write(struct.pack('<I%ss'%length, length, _x)) 00859 _v100 = _v97.pose 00860 _v101 = _v100.position 00861 _x = _v101 00862 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00863 _v102 = _v100.orientation 00864 _x = _v102 00865 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00866 _v103 = val1.grasp 00867 _v104 = _v103.header 00868 buff.write(_struct_I.pack(_v104.seq)) 00869 _v105 = _v104.stamp 00870 _x = _v105 00871 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00872 _x = _v104.frame_id 00873 length = len(_x) 00874 buff.write(struct.pack('<I%ss'%length, length, _x)) 00875 _v106 = _v103.pose 00876 _v107 = _v106.position 00877 _x = _v107 00878 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00879 _v108 = _v106.orientation 00880 _x = _v108 00881 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00882 _x = val1.category 00883 length = len(_x) 00884 buff.write(struct.pack('<I%ss'%length, length, _x)) 00885 length = len(self.mside) 00886 buff.write(_struct_I.pack(length)) 00887 for val1 in self.mside: 00888 buff.write(_struct_i.pack(val1.object_id)) 00889 _x = val1.hand_type 00890 length = len(_x) 00891 buff.write(struct.pack('<I%ss'%length, length, _x)) 00892 length = len(val1.sdh_joint_values) 00893 buff.write(_struct_I.pack(length)) 00894 pattern = '<%sd'%length 00895 buff.write(val1.sdh_joint_values.tostring()) 00896 _v109 = val1.pre_grasp 00897 _v110 = _v109.header 00898 buff.write(_struct_I.pack(_v110.seq)) 00899 _v111 = _v110.stamp 00900 _x = _v111 00901 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00902 _x = _v110.frame_id 00903 length = len(_x) 00904 buff.write(struct.pack('<I%ss'%length, length, _x)) 00905 _v112 = _v109.pose 00906 _v113 = _v112.position 00907 _x = _v113 00908 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00909 _v114 = _v112.orientation 00910 _x = _v114 00911 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00912 _v115 = val1.grasp 00913 _v116 = _v115.header 00914 buff.write(_struct_I.pack(_v116.seq)) 00915 _v117 = _v116.stamp 00916 _x = _v117 00917 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00918 _x = _v116.frame_id 00919 length = len(_x) 00920 buff.write(struct.pack('<I%ss'%length, length, _x)) 00921 _v118 = _v115.pose 00922 _v119 = _v118.position 00923 _x = _v119 00924 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00925 _v120 = _v118.orientation 00926 _x = _v120 00927 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00928 _x = val1.category 00929 length = len(_x) 00930 buff.write(struct.pack('<I%ss'%length, length, _x)) 00931 length = len(self.front) 00932 buff.write(_struct_I.pack(length)) 00933 for val1 in self.front: 00934 buff.write(_struct_i.pack(val1.object_id)) 00935 _x = val1.hand_type 00936 length = len(_x) 00937 buff.write(struct.pack('<I%ss'%length, length, _x)) 00938 length = len(val1.sdh_joint_values) 00939 buff.write(_struct_I.pack(length)) 00940 pattern = '<%sd'%length 00941 buff.write(val1.sdh_joint_values.tostring()) 00942 _v121 = val1.pre_grasp 00943 _v122 = _v121.header 00944 buff.write(_struct_I.pack(_v122.seq)) 00945 _v123 = _v122.stamp 00946 _x = _v123 00947 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00948 _x = _v122.frame_id 00949 length = len(_x) 00950 buff.write(struct.pack('<I%ss'%length, length, _x)) 00951 _v124 = _v121.pose 00952 _v125 = _v124.position 00953 _x = _v125 00954 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00955 _v126 = _v124.orientation 00956 _x = _v126 00957 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00958 _v127 = val1.grasp 00959 _v128 = _v127.header 00960 buff.write(_struct_I.pack(_v128.seq)) 00961 _v129 = _v128.stamp 00962 _x = _v129 00963 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00964 _x = _v128.frame_id 00965 length = len(_x) 00966 buff.write(struct.pack('<I%ss'%length, length, _x)) 00967 _v130 = _v127.pose 00968 _v131 = _v130.position 00969 _x = _v131 00970 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00971 _v132 = _v130.orientation 00972 _x = _v132 00973 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00974 _x = val1.category 00975 length = len(_x) 00976 buff.write(struct.pack('<I%ss'%length, length, _x)) 00977 length = len(self.top) 00978 buff.write(_struct_I.pack(length)) 00979 for val1 in self.top: 00980 buff.write(_struct_i.pack(val1.object_id)) 00981 _x = val1.hand_type 00982 length = len(_x) 00983 buff.write(struct.pack('<I%ss'%length, length, _x)) 00984 length = len(val1.sdh_joint_values) 00985 buff.write(_struct_I.pack(length)) 00986 pattern = '<%sd'%length 00987 buff.write(val1.sdh_joint_values.tostring()) 00988 _v133 = val1.pre_grasp 00989 _v134 = _v133.header 00990 buff.write(_struct_I.pack(_v134.seq)) 00991 _v135 = _v134.stamp 00992 _x = _v135 00993 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00994 _x = _v134.frame_id 00995 length = len(_x) 00996 buff.write(struct.pack('<I%ss'%length, length, _x)) 00997 _v136 = _v133.pose 00998 _v137 = _v136.position 00999 _x = _v137 01000 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01001 _v138 = _v136.orientation 01002 _x = _v138 01003 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01004 _v139 = val1.grasp 01005 _v140 = _v139.header 01006 buff.write(_struct_I.pack(_v140.seq)) 01007 _v141 = _v140.stamp 01008 _x = _v141 01009 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01010 _x = _v140.frame_id 01011 length = len(_x) 01012 buff.write(struct.pack('<I%ss'%length, length, _x)) 01013 _v142 = _v139.pose 01014 _v143 = _v142.position 01015 _x = _v143 01016 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01017 _v144 = _v142.orientation 01018 _x = _v144 01019 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01020 _x = val1.category 01021 length = len(_x) 01022 buff.write(struct.pack('<I%ss'%length, length, _x)) 01023 except struct.error as se: self._check_types(se) 01024 except TypeError as te: self._check_types(te) 01025 01026 def deserialize_numpy(self, str, numpy): 01027 """ 01028 unpack serialized message in str into this message instance using numpy for array types 01029 @param str: byte array of serialized message 01030 @type str: str 01031 @param numpy: numpy python module 01032 @type numpy: module 01033 """ 01034 try: 01035 end = 0 01036 start = end 01037 end += 4 01038 (length,) = _struct_I.unpack(str[start:end]) 01039 self.side = [] 01040 for i in range(0, length): 01041 val1 = srs_msgs.msg.DBGrasp() 01042 start = end 01043 end += 4 01044 (val1.object_id,) = _struct_i.unpack(str[start:end]) 01045 start = end 01046 end += 4 01047 (length,) = _struct_I.unpack(str[start:end]) 01048 start = end 01049 end += length 01050 val1.hand_type = str[start:end] 01051 start = end 01052 end += 4 01053 (length,) = _struct_I.unpack(str[start:end]) 01054 pattern = '<%sd'%length 01055 start = end 01056 end += struct.calcsize(pattern) 01057 val1.sdh_joint_values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01058 _v145 = val1.pre_grasp 01059 _v146 = _v145.header 01060 start = end 01061 end += 4 01062 (_v146.seq,) = _struct_I.unpack(str[start:end]) 01063 _v147 = _v146.stamp 01064 _x = _v147 01065 start = end 01066 end += 8 01067 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01068 start = end 01069 end += 4 01070 (length,) = _struct_I.unpack(str[start:end]) 01071 start = end 01072 end += length 01073 _v146.frame_id = str[start:end] 01074 _v148 = _v145.pose 01075 _v149 = _v148.position 01076 _x = _v149 01077 start = end 01078 end += 24 01079 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01080 _v150 = _v148.orientation 01081 _x = _v150 01082 start = end 01083 end += 32 01084 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01085 _v151 = val1.grasp 01086 _v152 = _v151.header 01087 start = end 01088 end += 4 01089 (_v152.seq,) = _struct_I.unpack(str[start:end]) 01090 _v153 = _v152.stamp 01091 _x = _v153 01092 start = end 01093 end += 8 01094 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01095 start = end 01096 end += 4 01097 (length,) = _struct_I.unpack(str[start:end]) 01098 start = end 01099 end += length 01100 _v152.frame_id = str[start:end] 01101 _v154 = _v151.pose 01102 _v155 = _v154.position 01103 _x = _v155 01104 start = end 01105 end += 24 01106 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01107 _v156 = _v154.orientation 01108 _x = _v156 01109 start = end 01110 end += 32 01111 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01112 start = end 01113 end += 4 01114 (length,) = _struct_I.unpack(str[start:end]) 01115 start = end 01116 end += length 01117 val1.category = str[start:end] 01118 self.side.append(val1) 01119 start = end 01120 end += 4 01121 (length,) = _struct_I.unpack(str[start:end]) 01122 self.mside = [] 01123 for i in range(0, length): 01124 val1 = srs_msgs.msg.DBGrasp() 01125 start = end 01126 end += 4 01127 (val1.object_id,) = _struct_i.unpack(str[start:end]) 01128 start = end 01129 end += 4 01130 (length,) = _struct_I.unpack(str[start:end]) 01131 start = end 01132 end += length 01133 val1.hand_type = str[start:end] 01134 start = end 01135 end += 4 01136 (length,) = _struct_I.unpack(str[start:end]) 01137 pattern = '<%sd'%length 01138 start = end 01139 end += struct.calcsize(pattern) 01140 val1.sdh_joint_values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01141 _v157 = val1.pre_grasp 01142 _v158 = _v157.header 01143 start = end 01144 end += 4 01145 (_v158.seq,) = _struct_I.unpack(str[start:end]) 01146 _v159 = _v158.stamp 01147 _x = _v159 01148 start = end 01149 end += 8 01150 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01151 start = end 01152 end += 4 01153 (length,) = _struct_I.unpack(str[start:end]) 01154 start = end 01155 end += length 01156 _v158.frame_id = str[start:end] 01157 _v160 = _v157.pose 01158 _v161 = _v160.position 01159 _x = _v161 01160 start = end 01161 end += 24 01162 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01163 _v162 = _v160.orientation 01164 _x = _v162 01165 start = end 01166 end += 32 01167 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01168 _v163 = val1.grasp 01169 _v164 = _v163.header 01170 start = end 01171 end += 4 01172 (_v164.seq,) = _struct_I.unpack(str[start:end]) 01173 _v165 = _v164.stamp 01174 _x = _v165 01175 start = end 01176 end += 8 01177 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01178 start = end 01179 end += 4 01180 (length,) = _struct_I.unpack(str[start:end]) 01181 start = end 01182 end += length 01183 _v164.frame_id = str[start:end] 01184 _v166 = _v163.pose 01185 _v167 = _v166.position 01186 _x = _v167 01187 start = end 01188 end += 24 01189 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01190 _v168 = _v166.orientation 01191 _x = _v168 01192 start = end 01193 end += 32 01194 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01195 start = end 01196 end += 4 01197 (length,) = _struct_I.unpack(str[start:end]) 01198 start = end 01199 end += length 01200 val1.category = str[start:end] 01201 self.mside.append(val1) 01202 start = end 01203 end += 4 01204 (length,) = _struct_I.unpack(str[start:end]) 01205 self.front = [] 01206 for i in range(0, length): 01207 val1 = srs_msgs.msg.DBGrasp() 01208 start = end 01209 end += 4 01210 (val1.object_id,) = _struct_i.unpack(str[start:end]) 01211 start = end 01212 end += 4 01213 (length,) = _struct_I.unpack(str[start:end]) 01214 start = end 01215 end += length 01216 val1.hand_type = str[start:end] 01217 start = end 01218 end += 4 01219 (length,) = _struct_I.unpack(str[start:end]) 01220 pattern = '<%sd'%length 01221 start = end 01222 end += struct.calcsize(pattern) 01223 val1.sdh_joint_values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01224 _v169 = val1.pre_grasp 01225 _v170 = _v169.header 01226 start = end 01227 end += 4 01228 (_v170.seq,) = _struct_I.unpack(str[start:end]) 01229 _v171 = _v170.stamp 01230 _x = _v171 01231 start = end 01232 end += 8 01233 (_x.secs, _x.nsecs,) = _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 _v170.frame_id = str[start:end] 01240 _v172 = _v169.pose 01241 _v173 = _v172.position 01242 _x = _v173 01243 start = end 01244 end += 24 01245 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01246 _v174 = _v172.orientation 01247 _x = _v174 01248 start = end 01249 end += 32 01250 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01251 _v175 = val1.grasp 01252 _v176 = _v175.header 01253 start = end 01254 end += 4 01255 (_v176.seq,) = _struct_I.unpack(str[start:end]) 01256 _v177 = _v176.stamp 01257 _x = _v177 01258 start = end 01259 end += 8 01260 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01261 start = end 01262 end += 4 01263 (length,) = _struct_I.unpack(str[start:end]) 01264 start = end 01265 end += length 01266 _v176.frame_id = str[start:end] 01267 _v178 = _v175.pose 01268 _v179 = _v178.position 01269 _x = _v179 01270 start = end 01271 end += 24 01272 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01273 _v180 = _v178.orientation 01274 _x = _v180 01275 start = end 01276 end += 32 01277 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01278 start = end 01279 end += 4 01280 (length,) = _struct_I.unpack(str[start:end]) 01281 start = end 01282 end += length 01283 val1.category = str[start:end] 01284 self.front.append(val1) 01285 start = end 01286 end += 4 01287 (length,) = _struct_I.unpack(str[start:end]) 01288 self.top = [] 01289 for i in range(0, length): 01290 val1 = srs_msgs.msg.DBGrasp() 01291 start = end 01292 end += 4 01293 (val1.object_id,) = _struct_i.unpack(str[start:end]) 01294 start = end 01295 end += 4 01296 (length,) = _struct_I.unpack(str[start:end]) 01297 start = end 01298 end += length 01299 val1.hand_type = str[start:end] 01300 start = end 01301 end += 4 01302 (length,) = _struct_I.unpack(str[start:end]) 01303 pattern = '<%sd'%length 01304 start = end 01305 end += struct.calcsize(pattern) 01306 val1.sdh_joint_values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01307 _v181 = val1.pre_grasp 01308 _v182 = _v181.header 01309 start = end 01310 end += 4 01311 (_v182.seq,) = _struct_I.unpack(str[start:end]) 01312 _v183 = _v182.stamp 01313 _x = _v183 01314 start = end 01315 end += 8 01316 (_x.secs, _x.nsecs,) = _struct_2I.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 _v182.frame_id = str[start:end] 01323 _v184 = _v181.pose 01324 _v185 = _v184.position 01325 _x = _v185 01326 start = end 01327 end += 24 01328 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01329 _v186 = _v184.orientation 01330 _x = _v186 01331 start = end 01332 end += 32 01333 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01334 _v187 = val1.grasp 01335 _v188 = _v187.header 01336 start = end 01337 end += 4 01338 (_v188.seq,) = _struct_I.unpack(str[start:end]) 01339 _v189 = _v188.stamp 01340 _x = _v189 01341 start = end 01342 end += 8 01343 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01344 start = end 01345 end += 4 01346 (length,) = _struct_I.unpack(str[start:end]) 01347 start = end 01348 end += length 01349 _v188.frame_id = str[start:end] 01350 _v190 = _v187.pose 01351 _v191 = _v190.position 01352 _x = _v191 01353 start = end 01354 end += 24 01355 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01356 _v192 = _v190.orientation 01357 _x = _v192 01358 start = end 01359 end += 32 01360 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01361 start = end 01362 end += 4 01363 (length,) = _struct_I.unpack(str[start:end]) 01364 start = end 01365 end += length 01366 val1.category = str[start:end] 01367 self.top.append(val1) 01368 return self 01369 except struct.error as e: 01370 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01371 01372 _struct_I = roslib.message.struct_I 01373 _struct_i = struct.Struct("<i") 01374 _struct_4d = struct.Struct("<4d") 01375 _struct_2I = struct.Struct("<2I") 01376 _struct_3d = struct.Struct("<3d") 01377 class GetPreGrasp(roslib.message.ServiceDefinition): 01378 _type = 'srs_grasping/GetPreGrasp' 01379 _md5sum = 'e606f4d802b5d457bfadfd961329be5b' 01380 _request_class = GetPreGraspRequest 01381 _response_class = GetPreGraspResponse