$search
00001 """autogenerated by genmsg_py from GetCollisionObjectsRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetCollisionObjectsRequest(roslib.message.Message): 00007 _md5sum = "3ae7288b23c84452d229e442c1673708" 00008 _type = "arm_navigation_msgs/GetCollisionObjectsRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 00013 bool include_points 00014 00015 """ 00016 __slots__ = ['include_points'] 00017 _slot_types = ['bool'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 include_points 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(GetCollisionObjectsRequest, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.include_points is None: 00037 self.include_points = False 00038 else: 00039 self.include_points = False 00040 00041 def _get_types(self): 00042 """ 00043 internal API method 00044 """ 00045 return self._slot_types 00046 00047 def serialize(self, buff): 00048 """ 00049 serialize message into buffer 00050 @param buff: buffer 00051 @type buff: StringIO 00052 """ 00053 try: 00054 buff.write(_struct_B.pack(self.include_points)) 00055 except struct.error as se: self._check_types(se) 00056 except TypeError as te: self._check_types(te) 00057 00058 def deserialize(self, str): 00059 """ 00060 unpack serialized message in str into this message instance 00061 @param str: byte array of serialized message 00062 @type str: str 00063 """ 00064 try: 00065 end = 0 00066 start = end 00067 end += 1 00068 (self.include_points,) = _struct_B.unpack(str[start:end]) 00069 self.include_points = bool(self.include_points) 00070 return self 00071 except struct.error as e: 00072 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00073 00074 00075 def serialize_numpy(self, buff, numpy): 00076 """ 00077 serialize message with numpy array types into buffer 00078 @param buff: buffer 00079 @type buff: StringIO 00080 @param numpy: numpy python module 00081 @type numpy module 00082 """ 00083 try: 00084 buff.write(_struct_B.pack(self.include_points)) 00085 except struct.error as se: self._check_types(se) 00086 except TypeError as te: self._check_types(te) 00087 00088 def deserialize_numpy(self, str, numpy): 00089 """ 00090 unpack serialized message in str into this message instance using numpy for array types 00091 @param str: byte array of serialized message 00092 @type str: str 00093 @param numpy: numpy python module 00094 @type numpy: module 00095 """ 00096 try: 00097 end = 0 00098 start = end 00099 end += 1 00100 (self.include_points,) = _struct_B.unpack(str[start:end]) 00101 self.include_points = bool(self.include_points) 00102 return self 00103 except struct.error as e: 00104 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00105 00106 _struct_I = roslib.message.struct_I 00107 _struct_B = struct.Struct("<B") 00108 """autogenerated by genmsg_py from GetCollisionObjectsResponse.msg. Do not edit.""" 00109 import roslib.message 00110 import struct 00111 00112 import arm_navigation_msgs.msg 00113 import geometry_msgs.msg 00114 import std_msgs.msg 00115 00116 class GetCollisionObjectsResponse(roslib.message.Message): 00117 _md5sum = "c361b849f4eb74ea667a930b0b9dc801" 00118 _type = "arm_navigation_msgs/GetCollisionObjectsResponse" 00119 _has_header = False #flag to mark the presence of a Header object 00120 _full_text = """ 00121 arm_navigation_msgs/CollisionMap points 00122 00123 arm_navigation_msgs/CollisionObject[] collision_objects 00124 00125 arm_navigation_msgs/AttachedCollisionObject[] attached_collision_objects 00126 00127 00128 ================================================================================ 00129 MSG: arm_navigation_msgs/CollisionMap 00130 #header for interpreting box positions 00131 Header header 00132 00133 #boxes for use in collision testing 00134 OrientedBoundingBox[] boxes 00135 00136 ================================================================================ 00137 MSG: std_msgs/Header 00138 # Standard metadata for higher-level stamped data types. 00139 # This is generally used to communicate timestamped data 00140 # in a particular coordinate frame. 00141 # 00142 # sequence ID: consecutively increasing ID 00143 uint32 seq 00144 #Two-integer timestamp that is expressed as: 00145 # * stamp.secs: seconds (stamp_secs) since epoch 00146 # * stamp.nsecs: nanoseconds since stamp_secs 00147 # time-handling sugar is provided by the client library 00148 time stamp 00149 #Frame this data is associated with 00150 # 0: no frame 00151 # 1: global frame 00152 string frame_id 00153 00154 ================================================================================ 00155 MSG: arm_navigation_msgs/OrientedBoundingBox 00156 #the center of the box 00157 geometry_msgs/Point32 center 00158 00159 #the extents of the box, assuming the center is at the point 00160 geometry_msgs/Point32 extents 00161 00162 #the axis of the box 00163 geometry_msgs/Point32 axis 00164 00165 #the angle of rotation around the axis 00166 float32 angle 00167 00168 ================================================================================ 00169 MSG: geometry_msgs/Point32 00170 # This contains the position of a point in free space(with 32 bits of precision). 00171 # It is recommeded to use Point wherever possible instead of Point32. 00172 # 00173 # This recommendation is to promote interoperability. 00174 # 00175 # This message is designed to take up less space when sending 00176 # lots of points at once, as in the case of a PointCloud. 00177 00178 float32 x 00179 float32 y 00180 float32 z 00181 ================================================================================ 00182 MSG: arm_navigation_msgs/CollisionObject 00183 # a header, used for interpreting the poses 00184 Header header 00185 00186 # the id of the object 00187 string id 00188 00189 # The padding used for filtering points near the object. 00190 # This does not affect collision checking for the object. 00191 # Set to negative to get zero padding. 00192 float32 padding 00193 00194 #This contains what is to be done with the object 00195 CollisionObjectOperation operation 00196 00197 #the shapes associated with the object 00198 arm_navigation_msgs/Shape[] shapes 00199 00200 #the poses associated with the shapes - will be transformed using the header 00201 geometry_msgs/Pose[] poses 00202 00203 ================================================================================ 00204 MSG: arm_navigation_msgs/CollisionObjectOperation 00205 #Puts the object into the environment 00206 #or updates the object if already added 00207 byte ADD=0 00208 00209 #Removes the object from the environment entirely 00210 byte REMOVE=1 00211 00212 #Only valid within the context of a CollisionAttachedObject message 00213 #Will be ignored if sent with an CollisionObject message 00214 #Takes an attached object, detaches from the attached link 00215 #But adds back in as regular object 00216 byte DETACH_AND_ADD_AS_OBJECT=2 00217 00218 #Only valid within the context of a CollisionAttachedObject message 00219 #Will be ignored if sent with an CollisionObject message 00220 #Takes current object in the environment and removes it as 00221 #a regular object 00222 byte ATTACH_AND_REMOVE_AS_OBJECT=3 00223 00224 # Byte code for operation 00225 byte operation 00226 00227 ================================================================================ 00228 MSG: arm_navigation_msgs/Shape 00229 byte SPHERE=0 00230 byte BOX=1 00231 byte CYLINDER=2 00232 byte MESH=3 00233 00234 byte type 00235 00236 00237 #### define sphere, box, cylinder #### 00238 # the origin of each shape is considered at the shape's center 00239 00240 # for sphere 00241 # radius := dimensions[0] 00242 00243 # for cylinder 00244 # radius := dimensions[0] 00245 # length := dimensions[1] 00246 # the length is along the Z axis 00247 00248 # for box 00249 # size_x := dimensions[0] 00250 # size_y := dimensions[1] 00251 # size_z := dimensions[2] 00252 float64[] dimensions 00253 00254 00255 #### define mesh #### 00256 00257 # list of triangles; triangle k is defined by tre vertices located 00258 # at indices triangles[3k], triangles[3k+1], triangles[3k+2] 00259 int32[] triangles 00260 geometry_msgs/Point[] vertices 00261 00262 ================================================================================ 00263 MSG: geometry_msgs/Point 00264 # This contains the position of a point in free space 00265 float64 x 00266 float64 y 00267 float64 z 00268 00269 ================================================================================ 00270 MSG: geometry_msgs/Pose 00271 # A representation of pose in free space, composed of postion and orientation. 00272 Point position 00273 Quaternion orientation 00274 00275 ================================================================================ 00276 MSG: geometry_msgs/Quaternion 00277 # This represents an orientation in free space in quaternion form. 00278 00279 float64 x 00280 float64 y 00281 float64 z 00282 float64 w 00283 00284 ================================================================================ 00285 MSG: arm_navigation_msgs/AttachedCollisionObject 00286 # The CollisionObject will be attached with a fixed joint to this link 00287 # If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation 00288 # is set to REMOVE will remove all attached bodies attached to any object 00289 string link_name 00290 00291 #Reserved for indicating that all attached objects should be removed 00292 string REMOVE_ALL_ATTACHED_OBJECTS = "all" 00293 00294 #This contains the actual shapes and poses for the CollisionObject 00295 #to be attached to the link 00296 #If action is remove and no object.id is set, all objects 00297 #attached to the link indicated by link_name will be removed 00298 CollisionObject object 00299 00300 # The set of links that the attached objects are allowed to touch 00301 # by default - the link_name is included by default 00302 string[] touch_links 00303 00304 """ 00305 __slots__ = ['points','collision_objects','attached_collision_objects'] 00306 _slot_types = ['arm_navigation_msgs/CollisionMap','arm_navigation_msgs/CollisionObject[]','arm_navigation_msgs/AttachedCollisionObject[]'] 00307 00308 def __init__(self, *args, **kwds): 00309 """ 00310 Constructor. Any message fields that are implicitly/explicitly 00311 set to None will be assigned a default value. The recommend 00312 use is keyword arguments as this is more robust to future message 00313 changes. You cannot mix in-order arguments and keyword arguments. 00314 00315 The available fields are: 00316 points,collision_objects,attached_collision_objects 00317 00318 @param args: complete set of field values, in .msg order 00319 @param kwds: use keyword arguments corresponding to message field names 00320 to set specific fields. 00321 """ 00322 if args or kwds: 00323 super(GetCollisionObjectsResponse, self).__init__(*args, **kwds) 00324 #message fields cannot be None, assign default values for those that are 00325 if self.points is None: 00326 self.points = arm_navigation_msgs.msg.CollisionMap() 00327 if self.collision_objects is None: 00328 self.collision_objects = [] 00329 if self.attached_collision_objects is None: 00330 self.attached_collision_objects = [] 00331 else: 00332 self.points = arm_navigation_msgs.msg.CollisionMap() 00333 self.collision_objects = [] 00334 self.attached_collision_objects = [] 00335 00336 def _get_types(self): 00337 """ 00338 internal API method 00339 """ 00340 return self._slot_types 00341 00342 def serialize(self, buff): 00343 """ 00344 serialize message into buffer 00345 @param buff: buffer 00346 @type buff: StringIO 00347 """ 00348 try: 00349 _x = self 00350 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs)) 00351 _x = self.points.header.frame_id 00352 length = len(_x) 00353 buff.write(struct.pack('<I%ss'%length, length, _x)) 00354 length = len(self.points.boxes) 00355 buff.write(_struct_I.pack(length)) 00356 for val1 in self.points.boxes: 00357 _v1 = val1.center 00358 _x = _v1 00359 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00360 _v2 = val1.extents 00361 _x = _v2 00362 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00363 _v3 = val1.axis 00364 _x = _v3 00365 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00366 buff.write(_struct_f.pack(val1.angle)) 00367 length = len(self.collision_objects) 00368 buff.write(_struct_I.pack(length)) 00369 for val1 in self.collision_objects: 00370 _v4 = val1.header 00371 buff.write(_struct_I.pack(_v4.seq)) 00372 _v5 = _v4.stamp 00373 _x = _v5 00374 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00375 _x = _v4.frame_id 00376 length = len(_x) 00377 buff.write(struct.pack('<I%ss'%length, length, _x)) 00378 _x = val1.id 00379 length = len(_x) 00380 buff.write(struct.pack('<I%ss'%length, length, _x)) 00381 buff.write(_struct_f.pack(val1.padding)) 00382 _v6 = val1.operation 00383 buff.write(_struct_b.pack(_v6.operation)) 00384 length = len(val1.shapes) 00385 buff.write(_struct_I.pack(length)) 00386 for val2 in val1.shapes: 00387 buff.write(_struct_b.pack(val2.type)) 00388 length = len(val2.dimensions) 00389 buff.write(_struct_I.pack(length)) 00390 pattern = '<%sd'%length 00391 buff.write(struct.pack(pattern, *val2.dimensions)) 00392 length = len(val2.triangles) 00393 buff.write(_struct_I.pack(length)) 00394 pattern = '<%si'%length 00395 buff.write(struct.pack(pattern, *val2.triangles)) 00396 length = len(val2.vertices) 00397 buff.write(_struct_I.pack(length)) 00398 for val3 in val2.vertices: 00399 _x = val3 00400 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00401 length = len(val1.poses) 00402 buff.write(_struct_I.pack(length)) 00403 for val2 in val1.poses: 00404 _v7 = val2.position 00405 _x = _v7 00406 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00407 _v8 = val2.orientation 00408 _x = _v8 00409 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00410 length = len(self.attached_collision_objects) 00411 buff.write(_struct_I.pack(length)) 00412 for val1 in self.attached_collision_objects: 00413 _x = val1.link_name 00414 length = len(_x) 00415 buff.write(struct.pack('<I%ss'%length, length, _x)) 00416 _v9 = val1.object 00417 _v10 = _v9.header 00418 buff.write(_struct_I.pack(_v10.seq)) 00419 _v11 = _v10.stamp 00420 _x = _v11 00421 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00422 _x = _v10.frame_id 00423 length = len(_x) 00424 buff.write(struct.pack('<I%ss'%length, length, _x)) 00425 _x = _v9.id 00426 length = len(_x) 00427 buff.write(struct.pack('<I%ss'%length, length, _x)) 00428 buff.write(_struct_f.pack(_v9.padding)) 00429 _v12 = _v9.operation 00430 buff.write(_struct_b.pack(_v12.operation)) 00431 length = len(_v9.shapes) 00432 buff.write(_struct_I.pack(length)) 00433 for val3 in _v9.shapes: 00434 buff.write(_struct_b.pack(val3.type)) 00435 length = len(val3.dimensions) 00436 buff.write(_struct_I.pack(length)) 00437 pattern = '<%sd'%length 00438 buff.write(struct.pack(pattern, *val3.dimensions)) 00439 length = len(val3.triangles) 00440 buff.write(_struct_I.pack(length)) 00441 pattern = '<%si'%length 00442 buff.write(struct.pack(pattern, *val3.triangles)) 00443 length = len(val3.vertices) 00444 buff.write(_struct_I.pack(length)) 00445 for val4 in val3.vertices: 00446 _x = val4 00447 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00448 length = len(_v9.poses) 00449 buff.write(_struct_I.pack(length)) 00450 for val3 in _v9.poses: 00451 _v13 = val3.position 00452 _x = _v13 00453 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00454 _v14 = val3.orientation 00455 _x = _v14 00456 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00457 length = len(val1.touch_links) 00458 buff.write(_struct_I.pack(length)) 00459 for val2 in val1.touch_links: 00460 length = len(val2) 00461 buff.write(struct.pack('<I%ss'%length, length, val2)) 00462 except struct.error as se: self._check_types(se) 00463 except TypeError as te: self._check_types(te) 00464 00465 def deserialize(self, str): 00466 """ 00467 unpack serialized message in str into this message instance 00468 @param str: byte array of serialized message 00469 @type str: str 00470 """ 00471 try: 00472 if self.points is None: 00473 self.points = arm_navigation_msgs.msg.CollisionMap() 00474 end = 0 00475 _x = self 00476 start = end 00477 end += 12 00478 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00479 start = end 00480 end += 4 00481 (length,) = _struct_I.unpack(str[start:end]) 00482 start = end 00483 end += length 00484 self.points.header.frame_id = str[start:end] 00485 start = end 00486 end += 4 00487 (length,) = _struct_I.unpack(str[start:end]) 00488 self.points.boxes = [] 00489 for i in range(0, length): 00490 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 00491 _v15 = val1.center 00492 _x = _v15 00493 start = end 00494 end += 12 00495 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00496 _v16 = val1.extents 00497 _x = _v16 00498 start = end 00499 end += 12 00500 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00501 _v17 = val1.axis 00502 _x = _v17 00503 start = end 00504 end += 12 00505 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00506 start = end 00507 end += 4 00508 (val1.angle,) = _struct_f.unpack(str[start:end]) 00509 self.points.boxes.append(val1) 00510 start = end 00511 end += 4 00512 (length,) = _struct_I.unpack(str[start:end]) 00513 self.collision_objects = [] 00514 for i in range(0, length): 00515 val1 = arm_navigation_msgs.msg.CollisionObject() 00516 _v18 = val1.header 00517 start = end 00518 end += 4 00519 (_v18.seq,) = _struct_I.unpack(str[start:end]) 00520 _v19 = _v18.stamp 00521 _x = _v19 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 _v18.frame_id = str[start:end] 00531 start = end 00532 end += 4 00533 (length,) = _struct_I.unpack(str[start:end]) 00534 start = end 00535 end += length 00536 val1.id = str[start:end] 00537 start = end 00538 end += 4 00539 (val1.padding,) = _struct_f.unpack(str[start:end]) 00540 _v20 = val1.operation 00541 start = end 00542 end += 1 00543 (_v20.operation,) = _struct_b.unpack(str[start:end]) 00544 start = end 00545 end += 4 00546 (length,) = _struct_I.unpack(str[start:end]) 00547 val1.shapes = [] 00548 for i in range(0, length): 00549 val2 = arm_navigation_msgs.msg.Shape() 00550 start = end 00551 end += 1 00552 (val2.type,) = _struct_b.unpack(str[start:end]) 00553 start = end 00554 end += 4 00555 (length,) = _struct_I.unpack(str[start:end]) 00556 pattern = '<%sd'%length 00557 start = end 00558 end += struct.calcsize(pattern) 00559 val2.dimensions = struct.unpack(pattern, str[start:end]) 00560 start = end 00561 end += 4 00562 (length,) = _struct_I.unpack(str[start:end]) 00563 pattern = '<%si'%length 00564 start = end 00565 end += struct.calcsize(pattern) 00566 val2.triangles = struct.unpack(pattern, str[start:end]) 00567 start = end 00568 end += 4 00569 (length,) = _struct_I.unpack(str[start:end]) 00570 val2.vertices = [] 00571 for i in range(0, length): 00572 val3 = geometry_msgs.msg.Point() 00573 _x = val3 00574 start = end 00575 end += 24 00576 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00577 val2.vertices.append(val3) 00578 val1.shapes.append(val2) 00579 start = end 00580 end += 4 00581 (length,) = _struct_I.unpack(str[start:end]) 00582 val1.poses = [] 00583 for i in range(0, length): 00584 val2 = geometry_msgs.msg.Pose() 00585 _v21 = val2.position 00586 _x = _v21 00587 start = end 00588 end += 24 00589 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00590 _v22 = val2.orientation 00591 _x = _v22 00592 start = end 00593 end += 32 00594 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00595 val1.poses.append(val2) 00596 self.collision_objects.append(val1) 00597 start = end 00598 end += 4 00599 (length,) = _struct_I.unpack(str[start:end]) 00600 self.attached_collision_objects = [] 00601 for i in range(0, length): 00602 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 00603 start = end 00604 end += 4 00605 (length,) = _struct_I.unpack(str[start:end]) 00606 start = end 00607 end += length 00608 val1.link_name = str[start:end] 00609 _v23 = val1.object 00610 _v24 = _v23.header 00611 start = end 00612 end += 4 00613 (_v24.seq,) = _struct_I.unpack(str[start:end]) 00614 _v25 = _v24.stamp 00615 _x = _v25 00616 start = end 00617 end += 8 00618 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00619 start = end 00620 end += 4 00621 (length,) = _struct_I.unpack(str[start:end]) 00622 start = end 00623 end += length 00624 _v24.frame_id = str[start:end] 00625 start = end 00626 end += 4 00627 (length,) = _struct_I.unpack(str[start:end]) 00628 start = end 00629 end += length 00630 _v23.id = str[start:end] 00631 start = end 00632 end += 4 00633 (_v23.padding,) = _struct_f.unpack(str[start:end]) 00634 _v26 = _v23.operation 00635 start = end 00636 end += 1 00637 (_v26.operation,) = _struct_b.unpack(str[start:end]) 00638 start = end 00639 end += 4 00640 (length,) = _struct_I.unpack(str[start:end]) 00641 _v23.shapes = [] 00642 for i in range(0, length): 00643 val3 = arm_navigation_msgs.msg.Shape() 00644 start = end 00645 end += 1 00646 (val3.type,) = _struct_b.unpack(str[start:end]) 00647 start = end 00648 end += 4 00649 (length,) = _struct_I.unpack(str[start:end]) 00650 pattern = '<%sd'%length 00651 start = end 00652 end += struct.calcsize(pattern) 00653 val3.dimensions = struct.unpack(pattern, str[start:end]) 00654 start = end 00655 end += 4 00656 (length,) = _struct_I.unpack(str[start:end]) 00657 pattern = '<%si'%length 00658 start = end 00659 end += struct.calcsize(pattern) 00660 val3.triangles = struct.unpack(pattern, str[start:end]) 00661 start = end 00662 end += 4 00663 (length,) = _struct_I.unpack(str[start:end]) 00664 val3.vertices = [] 00665 for i in range(0, length): 00666 val4 = geometry_msgs.msg.Point() 00667 _x = val4 00668 start = end 00669 end += 24 00670 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00671 val3.vertices.append(val4) 00672 _v23.shapes.append(val3) 00673 start = end 00674 end += 4 00675 (length,) = _struct_I.unpack(str[start:end]) 00676 _v23.poses = [] 00677 for i in range(0, length): 00678 val3 = geometry_msgs.msg.Pose() 00679 _v27 = val3.position 00680 _x = _v27 00681 start = end 00682 end += 24 00683 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00684 _v28 = val3.orientation 00685 _x = _v28 00686 start = end 00687 end += 32 00688 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00689 _v23.poses.append(val3) 00690 start = end 00691 end += 4 00692 (length,) = _struct_I.unpack(str[start:end]) 00693 val1.touch_links = [] 00694 for i in range(0, length): 00695 start = end 00696 end += 4 00697 (length,) = _struct_I.unpack(str[start:end]) 00698 start = end 00699 end += length 00700 val2 = str[start:end] 00701 val1.touch_links.append(val2) 00702 self.attached_collision_objects.append(val1) 00703 return self 00704 except struct.error as e: 00705 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00706 00707 00708 def serialize_numpy(self, buff, numpy): 00709 """ 00710 serialize message with numpy array types into buffer 00711 @param buff: buffer 00712 @type buff: StringIO 00713 @param numpy: numpy python module 00714 @type numpy module 00715 """ 00716 try: 00717 _x = self 00718 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs)) 00719 _x = self.points.header.frame_id 00720 length = len(_x) 00721 buff.write(struct.pack('<I%ss'%length, length, _x)) 00722 length = len(self.points.boxes) 00723 buff.write(_struct_I.pack(length)) 00724 for val1 in self.points.boxes: 00725 _v29 = val1.center 00726 _x = _v29 00727 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00728 _v30 = val1.extents 00729 _x = _v30 00730 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00731 _v31 = val1.axis 00732 _x = _v31 00733 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00734 buff.write(_struct_f.pack(val1.angle)) 00735 length = len(self.collision_objects) 00736 buff.write(_struct_I.pack(length)) 00737 for val1 in self.collision_objects: 00738 _v32 = val1.header 00739 buff.write(_struct_I.pack(_v32.seq)) 00740 _v33 = _v32.stamp 00741 _x = _v33 00742 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00743 _x = _v32.frame_id 00744 length = len(_x) 00745 buff.write(struct.pack('<I%ss'%length, length, _x)) 00746 _x = val1.id 00747 length = len(_x) 00748 buff.write(struct.pack('<I%ss'%length, length, _x)) 00749 buff.write(_struct_f.pack(val1.padding)) 00750 _v34 = val1.operation 00751 buff.write(_struct_b.pack(_v34.operation)) 00752 length = len(val1.shapes) 00753 buff.write(_struct_I.pack(length)) 00754 for val2 in val1.shapes: 00755 buff.write(_struct_b.pack(val2.type)) 00756 length = len(val2.dimensions) 00757 buff.write(_struct_I.pack(length)) 00758 pattern = '<%sd'%length 00759 buff.write(val2.dimensions.tostring()) 00760 length = len(val2.triangles) 00761 buff.write(_struct_I.pack(length)) 00762 pattern = '<%si'%length 00763 buff.write(val2.triangles.tostring()) 00764 length = len(val2.vertices) 00765 buff.write(_struct_I.pack(length)) 00766 for val3 in val2.vertices: 00767 _x = val3 00768 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00769 length = len(val1.poses) 00770 buff.write(_struct_I.pack(length)) 00771 for val2 in val1.poses: 00772 _v35 = val2.position 00773 _x = _v35 00774 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00775 _v36 = val2.orientation 00776 _x = _v36 00777 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00778 length = len(self.attached_collision_objects) 00779 buff.write(_struct_I.pack(length)) 00780 for val1 in self.attached_collision_objects: 00781 _x = val1.link_name 00782 length = len(_x) 00783 buff.write(struct.pack('<I%ss'%length, length, _x)) 00784 _v37 = val1.object 00785 _v38 = _v37.header 00786 buff.write(_struct_I.pack(_v38.seq)) 00787 _v39 = _v38.stamp 00788 _x = _v39 00789 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00790 _x = _v38.frame_id 00791 length = len(_x) 00792 buff.write(struct.pack('<I%ss'%length, length, _x)) 00793 _x = _v37.id 00794 length = len(_x) 00795 buff.write(struct.pack('<I%ss'%length, length, _x)) 00796 buff.write(_struct_f.pack(_v37.padding)) 00797 _v40 = _v37.operation 00798 buff.write(_struct_b.pack(_v40.operation)) 00799 length = len(_v37.shapes) 00800 buff.write(_struct_I.pack(length)) 00801 for val3 in _v37.shapes: 00802 buff.write(_struct_b.pack(val3.type)) 00803 length = len(val3.dimensions) 00804 buff.write(_struct_I.pack(length)) 00805 pattern = '<%sd'%length 00806 buff.write(val3.dimensions.tostring()) 00807 length = len(val3.triangles) 00808 buff.write(_struct_I.pack(length)) 00809 pattern = '<%si'%length 00810 buff.write(val3.triangles.tostring()) 00811 length = len(val3.vertices) 00812 buff.write(_struct_I.pack(length)) 00813 for val4 in val3.vertices: 00814 _x = val4 00815 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00816 length = len(_v37.poses) 00817 buff.write(_struct_I.pack(length)) 00818 for val3 in _v37.poses: 00819 _v41 = val3.position 00820 _x = _v41 00821 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00822 _v42 = val3.orientation 00823 _x = _v42 00824 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00825 length = len(val1.touch_links) 00826 buff.write(_struct_I.pack(length)) 00827 for val2 in val1.touch_links: 00828 length = len(val2) 00829 buff.write(struct.pack('<I%ss'%length, length, val2)) 00830 except struct.error as se: self._check_types(se) 00831 except TypeError as te: self._check_types(te) 00832 00833 def deserialize_numpy(self, str, numpy): 00834 """ 00835 unpack serialized message in str into this message instance using numpy for array types 00836 @param str: byte array of serialized message 00837 @type str: str 00838 @param numpy: numpy python module 00839 @type numpy: module 00840 """ 00841 try: 00842 if self.points is None: 00843 self.points = arm_navigation_msgs.msg.CollisionMap() 00844 end = 0 00845 _x = self 00846 start = end 00847 end += 12 00848 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00849 start = end 00850 end += 4 00851 (length,) = _struct_I.unpack(str[start:end]) 00852 start = end 00853 end += length 00854 self.points.header.frame_id = str[start:end] 00855 start = end 00856 end += 4 00857 (length,) = _struct_I.unpack(str[start:end]) 00858 self.points.boxes = [] 00859 for i in range(0, length): 00860 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 00861 _v43 = val1.center 00862 _x = _v43 00863 start = end 00864 end += 12 00865 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00866 _v44 = val1.extents 00867 _x = _v44 00868 start = end 00869 end += 12 00870 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00871 _v45 = val1.axis 00872 _x = _v45 00873 start = end 00874 end += 12 00875 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00876 start = end 00877 end += 4 00878 (val1.angle,) = _struct_f.unpack(str[start:end]) 00879 self.points.boxes.append(val1) 00880 start = end 00881 end += 4 00882 (length,) = _struct_I.unpack(str[start:end]) 00883 self.collision_objects = [] 00884 for i in range(0, length): 00885 val1 = arm_navigation_msgs.msg.CollisionObject() 00886 _v46 = val1.header 00887 start = end 00888 end += 4 00889 (_v46.seq,) = _struct_I.unpack(str[start:end]) 00890 _v47 = _v46.stamp 00891 _x = _v47 00892 start = end 00893 end += 8 00894 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00895 start = end 00896 end += 4 00897 (length,) = _struct_I.unpack(str[start:end]) 00898 start = end 00899 end += length 00900 _v46.frame_id = str[start:end] 00901 start = end 00902 end += 4 00903 (length,) = _struct_I.unpack(str[start:end]) 00904 start = end 00905 end += length 00906 val1.id = str[start:end] 00907 start = end 00908 end += 4 00909 (val1.padding,) = _struct_f.unpack(str[start:end]) 00910 _v48 = val1.operation 00911 start = end 00912 end += 1 00913 (_v48.operation,) = _struct_b.unpack(str[start:end]) 00914 start = end 00915 end += 4 00916 (length,) = _struct_I.unpack(str[start:end]) 00917 val1.shapes = [] 00918 for i in range(0, length): 00919 val2 = arm_navigation_msgs.msg.Shape() 00920 start = end 00921 end += 1 00922 (val2.type,) = _struct_b.unpack(str[start:end]) 00923 start = end 00924 end += 4 00925 (length,) = _struct_I.unpack(str[start:end]) 00926 pattern = '<%sd'%length 00927 start = end 00928 end += struct.calcsize(pattern) 00929 val2.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00930 start = end 00931 end += 4 00932 (length,) = _struct_I.unpack(str[start:end]) 00933 pattern = '<%si'%length 00934 start = end 00935 end += struct.calcsize(pattern) 00936 val2.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00937 start = end 00938 end += 4 00939 (length,) = _struct_I.unpack(str[start:end]) 00940 val2.vertices = [] 00941 for i in range(0, length): 00942 val3 = geometry_msgs.msg.Point() 00943 _x = val3 00944 start = end 00945 end += 24 00946 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00947 val2.vertices.append(val3) 00948 val1.shapes.append(val2) 00949 start = end 00950 end += 4 00951 (length,) = _struct_I.unpack(str[start:end]) 00952 val1.poses = [] 00953 for i in range(0, length): 00954 val2 = geometry_msgs.msg.Pose() 00955 _v49 = val2.position 00956 _x = _v49 00957 start = end 00958 end += 24 00959 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00960 _v50 = val2.orientation 00961 _x = _v50 00962 start = end 00963 end += 32 00964 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00965 val1.poses.append(val2) 00966 self.collision_objects.append(val1) 00967 start = end 00968 end += 4 00969 (length,) = _struct_I.unpack(str[start:end]) 00970 self.attached_collision_objects = [] 00971 for i in range(0, length): 00972 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 00973 start = end 00974 end += 4 00975 (length,) = _struct_I.unpack(str[start:end]) 00976 start = end 00977 end += length 00978 val1.link_name = str[start:end] 00979 _v51 = val1.object 00980 _v52 = _v51.header 00981 start = end 00982 end += 4 00983 (_v52.seq,) = _struct_I.unpack(str[start:end]) 00984 _v53 = _v52.stamp 00985 _x = _v53 00986 start = end 00987 end += 8 00988 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00989 start = end 00990 end += 4 00991 (length,) = _struct_I.unpack(str[start:end]) 00992 start = end 00993 end += length 00994 _v52.frame_id = str[start:end] 00995 start = end 00996 end += 4 00997 (length,) = _struct_I.unpack(str[start:end]) 00998 start = end 00999 end += length 01000 _v51.id = str[start:end] 01001 start = end 01002 end += 4 01003 (_v51.padding,) = _struct_f.unpack(str[start:end]) 01004 _v54 = _v51.operation 01005 start = end 01006 end += 1 01007 (_v54.operation,) = _struct_b.unpack(str[start:end]) 01008 start = end 01009 end += 4 01010 (length,) = _struct_I.unpack(str[start:end]) 01011 _v51.shapes = [] 01012 for i in range(0, length): 01013 val3 = arm_navigation_msgs.msg.Shape() 01014 start = end 01015 end += 1 01016 (val3.type,) = _struct_b.unpack(str[start:end]) 01017 start = end 01018 end += 4 01019 (length,) = _struct_I.unpack(str[start:end]) 01020 pattern = '<%sd'%length 01021 start = end 01022 end += struct.calcsize(pattern) 01023 val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01024 start = end 01025 end += 4 01026 (length,) = _struct_I.unpack(str[start:end]) 01027 pattern = '<%si'%length 01028 start = end 01029 end += struct.calcsize(pattern) 01030 val3.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 01031 start = end 01032 end += 4 01033 (length,) = _struct_I.unpack(str[start:end]) 01034 val3.vertices = [] 01035 for i in range(0, length): 01036 val4 = geometry_msgs.msg.Point() 01037 _x = val4 01038 start = end 01039 end += 24 01040 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01041 val3.vertices.append(val4) 01042 _v51.shapes.append(val3) 01043 start = end 01044 end += 4 01045 (length,) = _struct_I.unpack(str[start:end]) 01046 _v51.poses = [] 01047 for i in range(0, length): 01048 val3 = geometry_msgs.msg.Pose() 01049 _v55 = val3.position 01050 _x = _v55 01051 start = end 01052 end += 24 01053 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01054 _v56 = val3.orientation 01055 _x = _v56 01056 start = end 01057 end += 32 01058 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01059 _v51.poses.append(val3) 01060 start = end 01061 end += 4 01062 (length,) = _struct_I.unpack(str[start:end]) 01063 val1.touch_links = [] 01064 for i in range(0, length): 01065 start = end 01066 end += 4 01067 (length,) = _struct_I.unpack(str[start:end]) 01068 start = end 01069 end += length 01070 val2 = str[start:end] 01071 val1.touch_links.append(val2) 01072 self.attached_collision_objects.append(val1) 01073 return self 01074 except struct.error as e: 01075 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01076 01077 _struct_I = roslib.message.struct_I 01078 _struct_b = struct.Struct("<b") 01079 _struct_f = struct.Struct("<f") 01080 _struct_2I = struct.Struct("<2I") 01081 _struct_3I = struct.Struct("<3I") 01082 _struct_4d = struct.Struct("<4d") 01083 _struct_3f = struct.Struct("<3f") 01084 _struct_3d = struct.Struct("<3d") 01085 class GetCollisionObjects(roslib.message.ServiceDefinition): 01086 _type = 'arm_navigation_msgs/GetCollisionObjects' 01087 _md5sum = '8a4f57995c7be09c22ca01de6eb557ac' 01088 _request_class = GetCollisionObjectsRequest 01089 _response_class = GetCollisionObjectsResponse