$search
00001 """autogenerated by genmsg_py from GetPlanningSceneRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import arm_navigation_msgs.msg 00006 import geometry_msgs.msg 00007 import std_msgs.msg 00008 import roslib.rostime 00009 import sensor_msgs.msg 00010 00011 class GetPlanningSceneRequest(roslib.message.Message): 00012 _md5sum = "67ad55e9bed9c8f21dfb4b9b1ca8df7d" 00013 _type = "arm_navigation_msgs/GetPlanningSceneRequest" 00014 _has_header = False #flag to mark the presence of a Header object 00015 _full_text = """ 00016 00017 00018 PlanningScene planning_scene_diff 00019 00020 00021 arm_navigation_msgs/OrderedCollisionOperations operations 00022 00023 ================================================================================ 00024 MSG: arm_navigation_msgs/PlanningScene 00025 #full robot state 00026 arm_navigation_msgs/RobotState robot_state 00027 00028 #additional frames for duplicating tf 00029 geometry_msgs/TransformStamped[] fixed_frame_transforms 00030 00031 #full allowed collision matrix 00032 AllowedCollisionMatrix allowed_collision_matrix 00033 00034 #allowed contacts 00035 arm_navigation_msgs/AllowedContactSpecification[] allowed_contacts 00036 00037 #all link paddings 00038 arm_navigation_msgs/LinkPadding[] link_padding 00039 00040 #collision objects 00041 arm_navigation_msgs/CollisionObject[] collision_objects 00042 arm_navigation_msgs/AttachedCollisionObject[] attached_collision_objects 00043 00044 #the collision map 00045 arm_navigation_msgs/CollisionMap collision_map 00046 00047 ================================================================================ 00048 MSG: arm_navigation_msgs/RobotState 00049 # This message contains information about the robot state, i.e. the positions of its joints and links 00050 sensor_msgs/JointState joint_state 00051 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state 00052 00053 ================================================================================ 00054 MSG: sensor_msgs/JointState 00055 # This is a message that holds data to describe the state of a set of torque controlled joints. 00056 # 00057 # The state of each joint (revolute or prismatic) is defined by: 00058 # * the position of the joint (rad or m), 00059 # * the velocity of the joint (rad/s or m/s) and 00060 # * the effort that is applied in the joint (Nm or N). 00061 # 00062 # Each joint is uniquely identified by its name 00063 # The header specifies the time at which the joint states were recorded. All the joint states 00064 # in one message have to be recorded at the same time. 00065 # 00066 # This message consists of a multiple arrays, one for each part of the joint state. 00067 # The goal is to make each of the fields optional. When e.g. your joints have no 00068 # effort associated with them, you can leave the effort array empty. 00069 # 00070 # All arrays in this message should have the same size, or be empty. 00071 # This is the only way to uniquely associate the joint name with the correct 00072 # states. 00073 00074 00075 Header header 00076 00077 string[] name 00078 float64[] position 00079 float64[] velocity 00080 float64[] effort 00081 00082 ================================================================================ 00083 MSG: std_msgs/Header 00084 # Standard metadata for higher-level stamped data types. 00085 # This is generally used to communicate timestamped data 00086 # in a particular coordinate frame. 00087 # 00088 # sequence ID: consecutively increasing ID 00089 uint32 seq 00090 #Two-integer timestamp that is expressed as: 00091 # * stamp.secs: seconds (stamp_secs) since epoch 00092 # * stamp.nsecs: nanoseconds since stamp_secs 00093 # time-handling sugar is provided by the client library 00094 time stamp 00095 #Frame this data is associated with 00096 # 0: no frame 00097 # 1: global frame 00098 string frame_id 00099 00100 ================================================================================ 00101 MSG: arm_navigation_msgs/MultiDOFJointState 00102 #A representation of a multi-dof joint state 00103 time stamp 00104 string[] joint_names 00105 string[] frame_ids 00106 string[] child_frame_ids 00107 geometry_msgs/Pose[] poses 00108 00109 ================================================================================ 00110 MSG: geometry_msgs/Pose 00111 # A representation of pose in free space, composed of postion and orientation. 00112 Point position 00113 Quaternion orientation 00114 00115 ================================================================================ 00116 MSG: geometry_msgs/Point 00117 # This contains the position of a point in free space 00118 float64 x 00119 float64 y 00120 float64 z 00121 00122 ================================================================================ 00123 MSG: geometry_msgs/Quaternion 00124 # This represents an orientation in free space in quaternion form. 00125 00126 float64 x 00127 float64 y 00128 float64 z 00129 float64 w 00130 00131 ================================================================================ 00132 MSG: geometry_msgs/TransformStamped 00133 # This expresses a transform from coordinate frame header.frame_id 00134 # to the coordinate frame child_frame_id 00135 # 00136 # This message is mostly used by the 00137 # <a href="http://www.ros.org/wiki/tf">tf</a> package. 00138 # See it's documentation for more information. 00139 00140 Header header 00141 string child_frame_id # the frame id of the child frame 00142 Transform transform 00143 00144 ================================================================================ 00145 MSG: geometry_msgs/Transform 00146 # This represents the transform between two coordinate frames in free space. 00147 00148 Vector3 translation 00149 Quaternion rotation 00150 00151 ================================================================================ 00152 MSG: geometry_msgs/Vector3 00153 # This represents a vector in free space. 00154 00155 float64 x 00156 float64 y 00157 float64 z 00158 ================================================================================ 00159 MSG: arm_navigation_msgs/AllowedCollisionMatrix 00160 # the list of link names in the matrix 00161 string[] link_names 00162 00163 # the individual entries in the allowed collision matrix 00164 # symmetric, with same order as link_names 00165 AllowedCollisionEntry[] entries 00166 00167 ================================================================================ 00168 MSG: arm_navigation_msgs/AllowedCollisionEntry 00169 # whether or not collision checking is enabled 00170 bool[] enabled 00171 00172 ================================================================================ 00173 MSG: arm_navigation_msgs/AllowedContactSpecification 00174 # The names of the regions 00175 string name 00176 00177 # The shape of the region in the environment 00178 arm_navigation_msgs/Shape shape 00179 00180 # The pose of the space defining the region 00181 geometry_msgs/PoseStamped pose_stamped 00182 00183 # The set of links that will be allowed to have penetration contact within this region 00184 string[] link_names 00185 00186 # The maximum penetration depth allowed for every link 00187 float64 penetration_depth 00188 00189 ================================================================================ 00190 MSG: arm_navigation_msgs/Shape 00191 byte SPHERE=0 00192 byte BOX=1 00193 byte CYLINDER=2 00194 byte MESH=3 00195 00196 byte type 00197 00198 00199 #### define sphere, box, cylinder #### 00200 # the origin of each shape is considered at the shape's center 00201 00202 # for sphere 00203 # radius := dimensions[0] 00204 00205 # for cylinder 00206 # radius := dimensions[0] 00207 # length := dimensions[1] 00208 # the length is along the Z axis 00209 00210 # for box 00211 # size_x := dimensions[0] 00212 # size_y := dimensions[1] 00213 # size_z := dimensions[2] 00214 float64[] dimensions 00215 00216 00217 #### define mesh #### 00218 00219 # list of triangles; triangle k is defined by tre vertices located 00220 # at indices triangles[3k], triangles[3k+1], triangles[3k+2] 00221 int32[] triangles 00222 geometry_msgs/Point[] vertices 00223 00224 ================================================================================ 00225 MSG: geometry_msgs/PoseStamped 00226 # A Pose with reference coordinate frame and timestamp 00227 Header header 00228 Pose pose 00229 00230 ================================================================================ 00231 MSG: arm_navigation_msgs/LinkPadding 00232 #name for the link 00233 string link_name 00234 00235 # padding to apply to the link 00236 float64 padding 00237 00238 ================================================================================ 00239 MSG: arm_navigation_msgs/CollisionObject 00240 # a header, used for interpreting the poses 00241 Header header 00242 00243 # the id of the object 00244 string id 00245 00246 # The padding used for filtering points near the object. 00247 # This does not affect collision checking for the object. 00248 # Set to negative to get zero padding. 00249 float32 padding 00250 00251 #This contains what is to be done with the object 00252 CollisionObjectOperation operation 00253 00254 #the shapes associated with the object 00255 arm_navigation_msgs/Shape[] shapes 00256 00257 #the poses associated with the shapes - will be transformed using the header 00258 geometry_msgs/Pose[] poses 00259 00260 ================================================================================ 00261 MSG: arm_navigation_msgs/CollisionObjectOperation 00262 #Puts the object into the environment 00263 #or updates the object if already added 00264 byte ADD=0 00265 00266 #Removes the object from the environment entirely 00267 byte REMOVE=1 00268 00269 #Only valid within the context of a CollisionAttachedObject message 00270 #Will be ignored if sent with an CollisionObject message 00271 #Takes an attached object, detaches from the attached link 00272 #But adds back in as regular object 00273 byte DETACH_AND_ADD_AS_OBJECT=2 00274 00275 #Only valid within the context of a CollisionAttachedObject message 00276 #Will be ignored if sent with an CollisionObject message 00277 #Takes current object in the environment and removes it as 00278 #a regular object 00279 byte ATTACH_AND_REMOVE_AS_OBJECT=3 00280 00281 # Byte code for operation 00282 byte operation 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 MSG: arm_navigation_msgs/CollisionMap 00306 #header for interpreting box positions 00307 Header header 00308 00309 #boxes for use in collision testing 00310 OrientedBoundingBox[] boxes 00311 00312 ================================================================================ 00313 MSG: arm_navigation_msgs/OrientedBoundingBox 00314 #the center of the box 00315 geometry_msgs/Point32 center 00316 00317 #the extents of the box, assuming the center is at the point 00318 geometry_msgs/Point32 extents 00319 00320 #the axis of the box 00321 geometry_msgs/Point32 axis 00322 00323 #the angle of rotation around the axis 00324 float32 angle 00325 00326 ================================================================================ 00327 MSG: geometry_msgs/Point32 00328 # This contains the position of a point in free space(with 32 bits of precision). 00329 # It is recommeded to use Point wherever possible instead of Point32. 00330 # 00331 # This recommendation is to promote interoperability. 00332 # 00333 # This message is designed to take up less space when sending 00334 # lots of points at once, as in the case of a PointCloud. 00335 00336 float32 x 00337 float32 y 00338 float32 z 00339 ================================================================================ 00340 MSG: arm_navigation_msgs/OrderedCollisionOperations 00341 # A set of collision operations that will be performed in the order they are specified 00342 CollisionOperation[] collision_operations 00343 ================================================================================ 00344 MSG: arm_navigation_msgs/CollisionOperation 00345 # A definition of a collision operation 00346 # E.g. ("gripper",COLLISION_SET_ALL,ENABLE) will enable collisions 00347 # between the gripper and all objects in the collision space 00348 00349 string object1 00350 string object2 00351 string COLLISION_SET_ALL="all" 00352 string COLLISION_SET_OBJECTS="objects" 00353 string COLLISION_SET_ATTACHED_OBJECTS="attached" 00354 00355 # The penetration distance to which collisions are allowed. This is 0.0 by default. 00356 float64 penetration_distance 00357 00358 # Flag that determines whether collisions will be enabled or disabled for the pair of objects specified above 00359 int32 operation 00360 int32 DISABLE=0 00361 int32 ENABLE=1 00362 00363 """ 00364 __slots__ = ['planning_scene_diff','operations'] 00365 _slot_types = ['arm_navigation_msgs/PlanningScene','arm_navigation_msgs/OrderedCollisionOperations'] 00366 00367 def __init__(self, *args, **kwds): 00368 """ 00369 Constructor. Any message fields that are implicitly/explicitly 00370 set to None will be assigned a default value. The recommend 00371 use is keyword arguments as this is more robust to future message 00372 changes. You cannot mix in-order arguments and keyword arguments. 00373 00374 The available fields are: 00375 planning_scene_diff,operations 00376 00377 @param args: complete set of field values, in .msg order 00378 @param kwds: use keyword arguments corresponding to message field names 00379 to set specific fields. 00380 """ 00381 if args or kwds: 00382 super(GetPlanningSceneRequest, self).__init__(*args, **kwds) 00383 #message fields cannot be None, assign default values for those that are 00384 if self.planning_scene_diff is None: 00385 self.planning_scene_diff = arm_navigation_msgs.msg.PlanningScene() 00386 if self.operations is None: 00387 self.operations = arm_navigation_msgs.msg.OrderedCollisionOperations() 00388 else: 00389 self.planning_scene_diff = arm_navigation_msgs.msg.PlanningScene() 00390 self.operations = arm_navigation_msgs.msg.OrderedCollisionOperations() 00391 00392 def _get_types(self): 00393 """ 00394 internal API method 00395 """ 00396 return self._slot_types 00397 00398 def serialize(self, buff): 00399 """ 00400 serialize message into buffer 00401 @param buff: buffer 00402 @type buff: StringIO 00403 """ 00404 try: 00405 _x = self 00406 buff.write(_struct_3I.pack(_x.planning_scene_diff.robot_state.joint_state.header.seq, _x.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs)) 00407 _x = self.planning_scene_diff.robot_state.joint_state.header.frame_id 00408 length = len(_x) 00409 buff.write(struct.pack('<I%ss'%length, length, _x)) 00410 length = len(self.planning_scene_diff.robot_state.joint_state.name) 00411 buff.write(_struct_I.pack(length)) 00412 for val1 in self.planning_scene_diff.robot_state.joint_state.name: 00413 length = len(val1) 00414 buff.write(struct.pack('<I%ss'%length, length, val1)) 00415 length = len(self.planning_scene_diff.robot_state.joint_state.position) 00416 buff.write(_struct_I.pack(length)) 00417 pattern = '<%sd'%length 00418 buff.write(struct.pack(pattern, *self.planning_scene_diff.robot_state.joint_state.position)) 00419 length = len(self.planning_scene_diff.robot_state.joint_state.velocity) 00420 buff.write(_struct_I.pack(length)) 00421 pattern = '<%sd'%length 00422 buff.write(struct.pack(pattern, *self.planning_scene_diff.robot_state.joint_state.velocity)) 00423 length = len(self.planning_scene_diff.robot_state.joint_state.effort) 00424 buff.write(_struct_I.pack(length)) 00425 pattern = '<%sd'%length 00426 buff.write(struct.pack(pattern, *self.planning_scene_diff.robot_state.joint_state.effort)) 00427 _x = self 00428 buff.write(_struct_2I.pack(_x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.nsecs)) 00429 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names) 00430 buff.write(_struct_I.pack(length)) 00431 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names: 00432 length = len(val1) 00433 buff.write(struct.pack('<I%ss'%length, length, val1)) 00434 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids) 00435 buff.write(_struct_I.pack(length)) 00436 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids: 00437 length = len(val1) 00438 buff.write(struct.pack('<I%ss'%length, length, val1)) 00439 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids) 00440 buff.write(_struct_I.pack(length)) 00441 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids: 00442 length = len(val1) 00443 buff.write(struct.pack('<I%ss'%length, length, val1)) 00444 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.poses) 00445 buff.write(_struct_I.pack(length)) 00446 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.poses: 00447 _v1 = val1.position 00448 _x = _v1 00449 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00450 _v2 = val1.orientation 00451 _x = _v2 00452 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00453 length = len(self.planning_scene_diff.fixed_frame_transforms) 00454 buff.write(_struct_I.pack(length)) 00455 for val1 in self.planning_scene_diff.fixed_frame_transforms: 00456 _v3 = val1.header 00457 buff.write(_struct_I.pack(_v3.seq)) 00458 _v4 = _v3.stamp 00459 _x = _v4 00460 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00461 _x = _v3.frame_id 00462 length = len(_x) 00463 buff.write(struct.pack('<I%ss'%length, length, _x)) 00464 _x = val1.child_frame_id 00465 length = len(_x) 00466 buff.write(struct.pack('<I%ss'%length, length, _x)) 00467 _v5 = val1.transform 00468 _v6 = _v5.translation 00469 _x = _v6 00470 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00471 _v7 = _v5.rotation 00472 _x = _v7 00473 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00474 length = len(self.planning_scene_diff.allowed_collision_matrix.link_names) 00475 buff.write(_struct_I.pack(length)) 00476 for val1 in self.planning_scene_diff.allowed_collision_matrix.link_names: 00477 length = len(val1) 00478 buff.write(struct.pack('<I%ss'%length, length, val1)) 00479 length = len(self.planning_scene_diff.allowed_collision_matrix.entries) 00480 buff.write(_struct_I.pack(length)) 00481 for val1 in self.planning_scene_diff.allowed_collision_matrix.entries: 00482 length = len(val1.enabled) 00483 buff.write(_struct_I.pack(length)) 00484 pattern = '<%sB'%length 00485 buff.write(struct.pack(pattern, *val1.enabled)) 00486 length = len(self.planning_scene_diff.allowed_contacts) 00487 buff.write(_struct_I.pack(length)) 00488 for val1 in self.planning_scene_diff.allowed_contacts: 00489 _x = val1.name 00490 length = len(_x) 00491 buff.write(struct.pack('<I%ss'%length, length, _x)) 00492 _v8 = val1.shape 00493 buff.write(_struct_b.pack(_v8.type)) 00494 length = len(_v8.dimensions) 00495 buff.write(_struct_I.pack(length)) 00496 pattern = '<%sd'%length 00497 buff.write(struct.pack(pattern, *_v8.dimensions)) 00498 length = len(_v8.triangles) 00499 buff.write(_struct_I.pack(length)) 00500 pattern = '<%si'%length 00501 buff.write(struct.pack(pattern, *_v8.triangles)) 00502 length = len(_v8.vertices) 00503 buff.write(_struct_I.pack(length)) 00504 for val3 in _v8.vertices: 00505 _x = val3 00506 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00507 _v9 = val1.pose_stamped 00508 _v10 = _v9.header 00509 buff.write(_struct_I.pack(_v10.seq)) 00510 _v11 = _v10.stamp 00511 _x = _v11 00512 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00513 _x = _v10.frame_id 00514 length = len(_x) 00515 buff.write(struct.pack('<I%ss'%length, length, _x)) 00516 _v12 = _v9.pose 00517 _v13 = _v12.position 00518 _x = _v13 00519 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00520 _v14 = _v12.orientation 00521 _x = _v14 00522 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00523 length = len(val1.link_names) 00524 buff.write(_struct_I.pack(length)) 00525 for val2 in val1.link_names: 00526 length = len(val2) 00527 buff.write(struct.pack('<I%ss'%length, length, val2)) 00528 buff.write(_struct_d.pack(val1.penetration_depth)) 00529 length = len(self.planning_scene_diff.link_padding) 00530 buff.write(_struct_I.pack(length)) 00531 for val1 in self.planning_scene_diff.link_padding: 00532 _x = val1.link_name 00533 length = len(_x) 00534 buff.write(struct.pack('<I%ss'%length, length, _x)) 00535 buff.write(_struct_d.pack(val1.padding)) 00536 length = len(self.planning_scene_diff.collision_objects) 00537 buff.write(_struct_I.pack(length)) 00538 for val1 in self.planning_scene_diff.collision_objects: 00539 _v15 = val1.header 00540 buff.write(_struct_I.pack(_v15.seq)) 00541 _v16 = _v15.stamp 00542 _x = _v16 00543 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00544 _x = _v15.frame_id 00545 length = len(_x) 00546 buff.write(struct.pack('<I%ss'%length, length, _x)) 00547 _x = val1.id 00548 length = len(_x) 00549 buff.write(struct.pack('<I%ss'%length, length, _x)) 00550 buff.write(_struct_f.pack(val1.padding)) 00551 _v17 = val1.operation 00552 buff.write(_struct_b.pack(_v17.operation)) 00553 length = len(val1.shapes) 00554 buff.write(_struct_I.pack(length)) 00555 for val2 in val1.shapes: 00556 buff.write(_struct_b.pack(val2.type)) 00557 length = len(val2.dimensions) 00558 buff.write(_struct_I.pack(length)) 00559 pattern = '<%sd'%length 00560 buff.write(struct.pack(pattern, *val2.dimensions)) 00561 length = len(val2.triangles) 00562 buff.write(_struct_I.pack(length)) 00563 pattern = '<%si'%length 00564 buff.write(struct.pack(pattern, *val2.triangles)) 00565 length = len(val2.vertices) 00566 buff.write(_struct_I.pack(length)) 00567 for val3 in val2.vertices: 00568 _x = val3 00569 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00570 length = len(val1.poses) 00571 buff.write(_struct_I.pack(length)) 00572 for val2 in val1.poses: 00573 _v18 = val2.position 00574 _x = _v18 00575 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00576 _v19 = val2.orientation 00577 _x = _v19 00578 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00579 length = len(self.planning_scene_diff.attached_collision_objects) 00580 buff.write(_struct_I.pack(length)) 00581 for val1 in self.planning_scene_diff.attached_collision_objects: 00582 _x = val1.link_name 00583 length = len(_x) 00584 buff.write(struct.pack('<I%ss'%length, length, _x)) 00585 _v20 = val1.object 00586 _v21 = _v20.header 00587 buff.write(_struct_I.pack(_v21.seq)) 00588 _v22 = _v21.stamp 00589 _x = _v22 00590 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00591 _x = _v21.frame_id 00592 length = len(_x) 00593 buff.write(struct.pack('<I%ss'%length, length, _x)) 00594 _x = _v20.id 00595 length = len(_x) 00596 buff.write(struct.pack('<I%ss'%length, length, _x)) 00597 buff.write(_struct_f.pack(_v20.padding)) 00598 _v23 = _v20.operation 00599 buff.write(_struct_b.pack(_v23.operation)) 00600 length = len(_v20.shapes) 00601 buff.write(_struct_I.pack(length)) 00602 for val3 in _v20.shapes: 00603 buff.write(_struct_b.pack(val3.type)) 00604 length = len(val3.dimensions) 00605 buff.write(_struct_I.pack(length)) 00606 pattern = '<%sd'%length 00607 buff.write(struct.pack(pattern, *val3.dimensions)) 00608 length = len(val3.triangles) 00609 buff.write(_struct_I.pack(length)) 00610 pattern = '<%si'%length 00611 buff.write(struct.pack(pattern, *val3.triangles)) 00612 length = len(val3.vertices) 00613 buff.write(_struct_I.pack(length)) 00614 for val4 in val3.vertices: 00615 _x = val4 00616 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00617 length = len(_v20.poses) 00618 buff.write(_struct_I.pack(length)) 00619 for val3 in _v20.poses: 00620 _v24 = val3.position 00621 _x = _v24 00622 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00623 _v25 = val3.orientation 00624 _x = _v25 00625 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00626 length = len(val1.touch_links) 00627 buff.write(_struct_I.pack(length)) 00628 for val2 in val1.touch_links: 00629 length = len(val2) 00630 buff.write(struct.pack('<I%ss'%length, length, val2)) 00631 _x = self 00632 buff.write(_struct_3I.pack(_x.planning_scene_diff.collision_map.header.seq, _x.planning_scene_diff.collision_map.header.stamp.secs, _x.planning_scene_diff.collision_map.header.stamp.nsecs)) 00633 _x = self.planning_scene_diff.collision_map.header.frame_id 00634 length = len(_x) 00635 buff.write(struct.pack('<I%ss'%length, length, _x)) 00636 length = len(self.planning_scene_diff.collision_map.boxes) 00637 buff.write(_struct_I.pack(length)) 00638 for val1 in self.planning_scene_diff.collision_map.boxes: 00639 _v26 = val1.center 00640 _x = _v26 00641 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00642 _v27 = val1.extents 00643 _x = _v27 00644 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00645 _v28 = val1.axis 00646 _x = _v28 00647 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00648 buff.write(_struct_f.pack(val1.angle)) 00649 length = len(self.operations.collision_operations) 00650 buff.write(_struct_I.pack(length)) 00651 for val1 in self.operations.collision_operations: 00652 _x = val1.object1 00653 length = len(_x) 00654 buff.write(struct.pack('<I%ss'%length, length, _x)) 00655 _x = val1.object2 00656 length = len(_x) 00657 buff.write(struct.pack('<I%ss'%length, length, _x)) 00658 _x = val1 00659 buff.write(_struct_di.pack(_x.penetration_distance, _x.operation)) 00660 except struct.error as se: self._check_types(se) 00661 except TypeError as te: self._check_types(te) 00662 00663 def deserialize(self, str): 00664 """ 00665 unpack serialized message in str into this message instance 00666 @param str: byte array of serialized message 00667 @type str: str 00668 """ 00669 try: 00670 if self.planning_scene_diff is None: 00671 self.planning_scene_diff = arm_navigation_msgs.msg.PlanningScene() 00672 if self.operations is None: 00673 self.operations = arm_navigation_msgs.msg.OrderedCollisionOperations() 00674 end = 0 00675 _x = self 00676 start = end 00677 end += 12 00678 (_x.planning_scene_diff.robot_state.joint_state.header.seq, _x.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00679 start = end 00680 end += 4 00681 (length,) = _struct_I.unpack(str[start:end]) 00682 start = end 00683 end += length 00684 self.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end] 00685 start = end 00686 end += 4 00687 (length,) = _struct_I.unpack(str[start:end]) 00688 self.planning_scene_diff.robot_state.joint_state.name = [] 00689 for i in range(0, length): 00690 start = end 00691 end += 4 00692 (length,) = _struct_I.unpack(str[start:end]) 00693 start = end 00694 end += length 00695 val1 = str[start:end] 00696 self.planning_scene_diff.robot_state.joint_state.name.append(val1) 00697 start = end 00698 end += 4 00699 (length,) = _struct_I.unpack(str[start:end]) 00700 pattern = '<%sd'%length 00701 start = end 00702 end += struct.calcsize(pattern) 00703 self.planning_scene_diff.robot_state.joint_state.position = struct.unpack(pattern, str[start:end]) 00704 start = end 00705 end += 4 00706 (length,) = _struct_I.unpack(str[start:end]) 00707 pattern = '<%sd'%length 00708 start = end 00709 end += struct.calcsize(pattern) 00710 self.planning_scene_diff.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) 00711 start = end 00712 end += 4 00713 (length,) = _struct_I.unpack(str[start:end]) 00714 pattern = '<%sd'%length 00715 start = end 00716 end += struct.calcsize(pattern) 00717 self.planning_scene_diff.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end]) 00718 _x = self 00719 start = end 00720 end += 8 00721 (_x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00722 start = end 00723 end += 4 00724 (length,) = _struct_I.unpack(str[start:end]) 00725 self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names = [] 00726 for i in range(0, length): 00727 start = end 00728 end += 4 00729 (length,) = _struct_I.unpack(str[start:end]) 00730 start = end 00731 end += length 00732 val1 = str[start:end] 00733 self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names.append(val1) 00734 start = end 00735 end += 4 00736 (length,) = _struct_I.unpack(str[start:end]) 00737 self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids = [] 00738 for i in range(0, length): 00739 start = end 00740 end += 4 00741 (length,) = _struct_I.unpack(str[start:end]) 00742 start = end 00743 end += length 00744 val1 = str[start:end] 00745 self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids.append(val1) 00746 start = end 00747 end += 4 00748 (length,) = _struct_I.unpack(str[start:end]) 00749 self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids = [] 00750 for i in range(0, length): 00751 start = end 00752 end += 4 00753 (length,) = _struct_I.unpack(str[start:end]) 00754 start = end 00755 end += length 00756 val1 = str[start:end] 00757 self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 00758 start = end 00759 end += 4 00760 (length,) = _struct_I.unpack(str[start:end]) 00761 self.planning_scene_diff.robot_state.multi_dof_joint_state.poses = [] 00762 for i in range(0, length): 00763 val1 = geometry_msgs.msg.Pose() 00764 _v29 = val1.position 00765 _x = _v29 00766 start = end 00767 end += 24 00768 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00769 _v30 = val1.orientation 00770 _x = _v30 00771 start = end 00772 end += 32 00773 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00774 self.planning_scene_diff.robot_state.multi_dof_joint_state.poses.append(val1) 00775 start = end 00776 end += 4 00777 (length,) = _struct_I.unpack(str[start:end]) 00778 self.planning_scene_diff.fixed_frame_transforms = [] 00779 for i in range(0, length): 00780 val1 = geometry_msgs.msg.TransformStamped() 00781 _v31 = val1.header 00782 start = end 00783 end += 4 00784 (_v31.seq,) = _struct_I.unpack(str[start:end]) 00785 _v32 = _v31.stamp 00786 _x = _v32 00787 start = end 00788 end += 8 00789 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00790 start = end 00791 end += 4 00792 (length,) = _struct_I.unpack(str[start:end]) 00793 start = end 00794 end += length 00795 _v31.frame_id = str[start:end] 00796 start = end 00797 end += 4 00798 (length,) = _struct_I.unpack(str[start:end]) 00799 start = end 00800 end += length 00801 val1.child_frame_id = str[start:end] 00802 _v33 = val1.transform 00803 _v34 = _v33.translation 00804 _x = _v34 00805 start = end 00806 end += 24 00807 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00808 _v35 = _v33.rotation 00809 _x = _v35 00810 start = end 00811 end += 32 00812 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00813 self.planning_scene_diff.fixed_frame_transforms.append(val1) 00814 start = end 00815 end += 4 00816 (length,) = _struct_I.unpack(str[start:end]) 00817 self.planning_scene_diff.allowed_collision_matrix.link_names = [] 00818 for i in range(0, length): 00819 start = end 00820 end += 4 00821 (length,) = _struct_I.unpack(str[start:end]) 00822 start = end 00823 end += length 00824 val1 = str[start:end] 00825 self.planning_scene_diff.allowed_collision_matrix.link_names.append(val1) 00826 start = end 00827 end += 4 00828 (length,) = _struct_I.unpack(str[start:end]) 00829 self.planning_scene_diff.allowed_collision_matrix.entries = [] 00830 for i in range(0, length): 00831 val1 = arm_navigation_msgs.msg.AllowedCollisionEntry() 00832 start = end 00833 end += 4 00834 (length,) = _struct_I.unpack(str[start:end]) 00835 pattern = '<%sB'%length 00836 start = end 00837 end += struct.calcsize(pattern) 00838 val1.enabled = struct.unpack(pattern, str[start:end]) 00839 val1.enabled = map(bool, val1.enabled) 00840 self.planning_scene_diff.allowed_collision_matrix.entries.append(val1) 00841 start = end 00842 end += 4 00843 (length,) = _struct_I.unpack(str[start:end]) 00844 self.planning_scene_diff.allowed_contacts = [] 00845 for i in range(0, length): 00846 val1 = arm_navigation_msgs.msg.AllowedContactSpecification() 00847 start = end 00848 end += 4 00849 (length,) = _struct_I.unpack(str[start:end]) 00850 start = end 00851 end += length 00852 val1.name = str[start:end] 00853 _v36 = val1.shape 00854 start = end 00855 end += 1 00856 (_v36.type,) = _struct_b.unpack(str[start:end]) 00857 start = end 00858 end += 4 00859 (length,) = _struct_I.unpack(str[start:end]) 00860 pattern = '<%sd'%length 00861 start = end 00862 end += struct.calcsize(pattern) 00863 _v36.dimensions = struct.unpack(pattern, str[start:end]) 00864 start = end 00865 end += 4 00866 (length,) = _struct_I.unpack(str[start:end]) 00867 pattern = '<%si'%length 00868 start = end 00869 end += struct.calcsize(pattern) 00870 _v36.triangles = struct.unpack(pattern, str[start:end]) 00871 start = end 00872 end += 4 00873 (length,) = _struct_I.unpack(str[start:end]) 00874 _v36.vertices = [] 00875 for i in range(0, length): 00876 val3 = geometry_msgs.msg.Point() 00877 _x = val3 00878 start = end 00879 end += 24 00880 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00881 _v36.vertices.append(val3) 00882 _v37 = val1.pose_stamped 00883 _v38 = _v37.header 00884 start = end 00885 end += 4 00886 (_v38.seq,) = _struct_I.unpack(str[start:end]) 00887 _v39 = _v38.stamp 00888 _x = _v39 00889 start = end 00890 end += 8 00891 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00892 start = end 00893 end += 4 00894 (length,) = _struct_I.unpack(str[start:end]) 00895 start = end 00896 end += length 00897 _v38.frame_id = str[start:end] 00898 _v40 = _v37.pose 00899 _v41 = _v40.position 00900 _x = _v41 00901 start = end 00902 end += 24 00903 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00904 _v42 = _v40.orientation 00905 _x = _v42 00906 start = end 00907 end += 32 00908 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00909 start = end 00910 end += 4 00911 (length,) = _struct_I.unpack(str[start:end]) 00912 val1.link_names = [] 00913 for i in range(0, length): 00914 start = end 00915 end += 4 00916 (length,) = _struct_I.unpack(str[start:end]) 00917 start = end 00918 end += length 00919 val2 = str[start:end] 00920 val1.link_names.append(val2) 00921 start = end 00922 end += 8 00923 (val1.penetration_depth,) = _struct_d.unpack(str[start:end]) 00924 self.planning_scene_diff.allowed_contacts.append(val1) 00925 start = end 00926 end += 4 00927 (length,) = _struct_I.unpack(str[start:end]) 00928 self.planning_scene_diff.link_padding = [] 00929 for i in range(0, length): 00930 val1 = arm_navigation_msgs.msg.LinkPadding() 00931 start = end 00932 end += 4 00933 (length,) = _struct_I.unpack(str[start:end]) 00934 start = end 00935 end += length 00936 val1.link_name = str[start:end] 00937 start = end 00938 end += 8 00939 (val1.padding,) = _struct_d.unpack(str[start:end]) 00940 self.planning_scene_diff.link_padding.append(val1) 00941 start = end 00942 end += 4 00943 (length,) = _struct_I.unpack(str[start:end]) 00944 self.planning_scene_diff.collision_objects = [] 00945 for i in range(0, length): 00946 val1 = arm_navigation_msgs.msg.CollisionObject() 00947 _v43 = val1.header 00948 start = end 00949 end += 4 00950 (_v43.seq,) = _struct_I.unpack(str[start:end]) 00951 _v44 = _v43.stamp 00952 _x = _v44 00953 start = end 00954 end += 8 00955 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00956 start = end 00957 end += 4 00958 (length,) = _struct_I.unpack(str[start:end]) 00959 start = end 00960 end += length 00961 _v43.frame_id = str[start:end] 00962 start = end 00963 end += 4 00964 (length,) = _struct_I.unpack(str[start:end]) 00965 start = end 00966 end += length 00967 val1.id = str[start:end] 00968 start = end 00969 end += 4 00970 (val1.padding,) = _struct_f.unpack(str[start:end]) 00971 _v45 = val1.operation 00972 start = end 00973 end += 1 00974 (_v45.operation,) = _struct_b.unpack(str[start:end]) 00975 start = end 00976 end += 4 00977 (length,) = _struct_I.unpack(str[start:end]) 00978 val1.shapes = [] 00979 for i in range(0, length): 00980 val2 = arm_navigation_msgs.msg.Shape() 00981 start = end 00982 end += 1 00983 (val2.type,) = _struct_b.unpack(str[start:end]) 00984 start = end 00985 end += 4 00986 (length,) = _struct_I.unpack(str[start:end]) 00987 pattern = '<%sd'%length 00988 start = end 00989 end += struct.calcsize(pattern) 00990 val2.dimensions = struct.unpack(pattern, str[start:end]) 00991 start = end 00992 end += 4 00993 (length,) = _struct_I.unpack(str[start:end]) 00994 pattern = '<%si'%length 00995 start = end 00996 end += struct.calcsize(pattern) 00997 val2.triangles = struct.unpack(pattern, str[start:end]) 00998 start = end 00999 end += 4 01000 (length,) = _struct_I.unpack(str[start:end]) 01001 val2.vertices = [] 01002 for i in range(0, length): 01003 val3 = geometry_msgs.msg.Point() 01004 _x = val3 01005 start = end 01006 end += 24 01007 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01008 val2.vertices.append(val3) 01009 val1.shapes.append(val2) 01010 start = end 01011 end += 4 01012 (length,) = _struct_I.unpack(str[start:end]) 01013 val1.poses = [] 01014 for i in range(0, length): 01015 val2 = geometry_msgs.msg.Pose() 01016 _v46 = val2.position 01017 _x = _v46 01018 start = end 01019 end += 24 01020 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01021 _v47 = val2.orientation 01022 _x = _v47 01023 start = end 01024 end += 32 01025 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01026 val1.poses.append(val2) 01027 self.planning_scene_diff.collision_objects.append(val1) 01028 start = end 01029 end += 4 01030 (length,) = _struct_I.unpack(str[start:end]) 01031 self.planning_scene_diff.attached_collision_objects = [] 01032 for i in range(0, length): 01033 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 01034 start = end 01035 end += 4 01036 (length,) = _struct_I.unpack(str[start:end]) 01037 start = end 01038 end += length 01039 val1.link_name = str[start:end] 01040 _v48 = val1.object 01041 _v49 = _v48.header 01042 start = end 01043 end += 4 01044 (_v49.seq,) = _struct_I.unpack(str[start:end]) 01045 _v50 = _v49.stamp 01046 _x = _v50 01047 start = end 01048 end += 8 01049 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01050 start = end 01051 end += 4 01052 (length,) = _struct_I.unpack(str[start:end]) 01053 start = end 01054 end += length 01055 _v49.frame_id = str[start:end] 01056 start = end 01057 end += 4 01058 (length,) = _struct_I.unpack(str[start:end]) 01059 start = end 01060 end += length 01061 _v48.id = str[start:end] 01062 start = end 01063 end += 4 01064 (_v48.padding,) = _struct_f.unpack(str[start:end]) 01065 _v51 = _v48.operation 01066 start = end 01067 end += 1 01068 (_v51.operation,) = _struct_b.unpack(str[start:end]) 01069 start = end 01070 end += 4 01071 (length,) = _struct_I.unpack(str[start:end]) 01072 _v48.shapes = [] 01073 for i in range(0, length): 01074 val3 = arm_navigation_msgs.msg.Shape() 01075 start = end 01076 end += 1 01077 (val3.type,) = _struct_b.unpack(str[start:end]) 01078 start = end 01079 end += 4 01080 (length,) = _struct_I.unpack(str[start:end]) 01081 pattern = '<%sd'%length 01082 start = end 01083 end += struct.calcsize(pattern) 01084 val3.dimensions = struct.unpack(pattern, str[start:end]) 01085 start = end 01086 end += 4 01087 (length,) = _struct_I.unpack(str[start:end]) 01088 pattern = '<%si'%length 01089 start = end 01090 end += struct.calcsize(pattern) 01091 val3.triangles = struct.unpack(pattern, str[start:end]) 01092 start = end 01093 end += 4 01094 (length,) = _struct_I.unpack(str[start:end]) 01095 val3.vertices = [] 01096 for i in range(0, length): 01097 val4 = geometry_msgs.msg.Point() 01098 _x = val4 01099 start = end 01100 end += 24 01101 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01102 val3.vertices.append(val4) 01103 _v48.shapes.append(val3) 01104 start = end 01105 end += 4 01106 (length,) = _struct_I.unpack(str[start:end]) 01107 _v48.poses = [] 01108 for i in range(0, length): 01109 val3 = geometry_msgs.msg.Pose() 01110 _v52 = val3.position 01111 _x = _v52 01112 start = end 01113 end += 24 01114 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01115 _v53 = val3.orientation 01116 _x = _v53 01117 start = end 01118 end += 32 01119 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01120 _v48.poses.append(val3) 01121 start = end 01122 end += 4 01123 (length,) = _struct_I.unpack(str[start:end]) 01124 val1.touch_links = [] 01125 for i in range(0, length): 01126 start = end 01127 end += 4 01128 (length,) = _struct_I.unpack(str[start:end]) 01129 start = end 01130 end += length 01131 val2 = str[start:end] 01132 val1.touch_links.append(val2) 01133 self.planning_scene_diff.attached_collision_objects.append(val1) 01134 _x = self 01135 start = end 01136 end += 12 01137 (_x.planning_scene_diff.collision_map.header.seq, _x.planning_scene_diff.collision_map.header.stamp.secs, _x.planning_scene_diff.collision_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 01138 start = end 01139 end += 4 01140 (length,) = _struct_I.unpack(str[start:end]) 01141 start = end 01142 end += length 01143 self.planning_scene_diff.collision_map.header.frame_id = str[start:end] 01144 start = end 01145 end += 4 01146 (length,) = _struct_I.unpack(str[start:end]) 01147 self.planning_scene_diff.collision_map.boxes = [] 01148 for i in range(0, length): 01149 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 01150 _v54 = val1.center 01151 _x = _v54 01152 start = end 01153 end += 12 01154 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01155 _v55 = val1.extents 01156 _x = _v55 01157 start = end 01158 end += 12 01159 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01160 _v56 = val1.axis 01161 _x = _v56 01162 start = end 01163 end += 12 01164 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01165 start = end 01166 end += 4 01167 (val1.angle,) = _struct_f.unpack(str[start:end]) 01168 self.planning_scene_diff.collision_map.boxes.append(val1) 01169 start = end 01170 end += 4 01171 (length,) = _struct_I.unpack(str[start:end]) 01172 self.operations.collision_operations = [] 01173 for i in range(0, length): 01174 val1 = arm_navigation_msgs.msg.CollisionOperation() 01175 start = end 01176 end += 4 01177 (length,) = _struct_I.unpack(str[start:end]) 01178 start = end 01179 end += length 01180 val1.object1 = str[start:end] 01181 start = end 01182 end += 4 01183 (length,) = _struct_I.unpack(str[start:end]) 01184 start = end 01185 end += length 01186 val1.object2 = str[start:end] 01187 _x = val1 01188 start = end 01189 end += 12 01190 (_x.penetration_distance, _x.operation,) = _struct_di.unpack(str[start:end]) 01191 self.operations.collision_operations.append(val1) 01192 return self 01193 except struct.error as e: 01194 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01195 01196 01197 def serialize_numpy(self, buff, numpy): 01198 """ 01199 serialize message with numpy array types into buffer 01200 @param buff: buffer 01201 @type buff: StringIO 01202 @param numpy: numpy python module 01203 @type numpy module 01204 """ 01205 try: 01206 _x = self 01207 buff.write(_struct_3I.pack(_x.planning_scene_diff.robot_state.joint_state.header.seq, _x.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs)) 01208 _x = self.planning_scene_diff.robot_state.joint_state.header.frame_id 01209 length = len(_x) 01210 buff.write(struct.pack('<I%ss'%length, length, _x)) 01211 length = len(self.planning_scene_diff.robot_state.joint_state.name) 01212 buff.write(_struct_I.pack(length)) 01213 for val1 in self.planning_scene_diff.robot_state.joint_state.name: 01214 length = len(val1) 01215 buff.write(struct.pack('<I%ss'%length, length, val1)) 01216 length = len(self.planning_scene_diff.robot_state.joint_state.position) 01217 buff.write(_struct_I.pack(length)) 01218 pattern = '<%sd'%length 01219 buff.write(self.planning_scene_diff.robot_state.joint_state.position.tostring()) 01220 length = len(self.planning_scene_diff.robot_state.joint_state.velocity) 01221 buff.write(_struct_I.pack(length)) 01222 pattern = '<%sd'%length 01223 buff.write(self.planning_scene_diff.robot_state.joint_state.velocity.tostring()) 01224 length = len(self.planning_scene_diff.robot_state.joint_state.effort) 01225 buff.write(_struct_I.pack(length)) 01226 pattern = '<%sd'%length 01227 buff.write(self.planning_scene_diff.robot_state.joint_state.effort.tostring()) 01228 _x = self 01229 buff.write(_struct_2I.pack(_x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.nsecs)) 01230 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names) 01231 buff.write(_struct_I.pack(length)) 01232 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names: 01233 length = len(val1) 01234 buff.write(struct.pack('<I%ss'%length, length, val1)) 01235 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids) 01236 buff.write(_struct_I.pack(length)) 01237 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids: 01238 length = len(val1) 01239 buff.write(struct.pack('<I%ss'%length, length, val1)) 01240 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids) 01241 buff.write(_struct_I.pack(length)) 01242 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids: 01243 length = len(val1) 01244 buff.write(struct.pack('<I%ss'%length, length, val1)) 01245 length = len(self.planning_scene_diff.robot_state.multi_dof_joint_state.poses) 01246 buff.write(_struct_I.pack(length)) 01247 for val1 in self.planning_scene_diff.robot_state.multi_dof_joint_state.poses: 01248 _v57 = val1.position 01249 _x = _v57 01250 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01251 _v58 = val1.orientation 01252 _x = _v58 01253 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01254 length = len(self.planning_scene_diff.fixed_frame_transforms) 01255 buff.write(_struct_I.pack(length)) 01256 for val1 in self.planning_scene_diff.fixed_frame_transforms: 01257 _v59 = val1.header 01258 buff.write(_struct_I.pack(_v59.seq)) 01259 _v60 = _v59.stamp 01260 _x = _v60 01261 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01262 _x = _v59.frame_id 01263 length = len(_x) 01264 buff.write(struct.pack('<I%ss'%length, length, _x)) 01265 _x = val1.child_frame_id 01266 length = len(_x) 01267 buff.write(struct.pack('<I%ss'%length, length, _x)) 01268 _v61 = val1.transform 01269 _v62 = _v61.translation 01270 _x = _v62 01271 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01272 _v63 = _v61.rotation 01273 _x = _v63 01274 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01275 length = len(self.planning_scene_diff.allowed_collision_matrix.link_names) 01276 buff.write(_struct_I.pack(length)) 01277 for val1 in self.planning_scene_diff.allowed_collision_matrix.link_names: 01278 length = len(val1) 01279 buff.write(struct.pack('<I%ss'%length, length, val1)) 01280 length = len(self.planning_scene_diff.allowed_collision_matrix.entries) 01281 buff.write(_struct_I.pack(length)) 01282 for val1 in self.planning_scene_diff.allowed_collision_matrix.entries: 01283 length = len(val1.enabled) 01284 buff.write(_struct_I.pack(length)) 01285 pattern = '<%sB'%length 01286 buff.write(val1.enabled.tostring()) 01287 length = len(self.planning_scene_diff.allowed_contacts) 01288 buff.write(_struct_I.pack(length)) 01289 for val1 in self.planning_scene_diff.allowed_contacts: 01290 _x = val1.name 01291 length = len(_x) 01292 buff.write(struct.pack('<I%ss'%length, length, _x)) 01293 _v64 = val1.shape 01294 buff.write(_struct_b.pack(_v64.type)) 01295 length = len(_v64.dimensions) 01296 buff.write(_struct_I.pack(length)) 01297 pattern = '<%sd'%length 01298 buff.write(_v64.dimensions.tostring()) 01299 length = len(_v64.triangles) 01300 buff.write(_struct_I.pack(length)) 01301 pattern = '<%si'%length 01302 buff.write(_v64.triangles.tostring()) 01303 length = len(_v64.vertices) 01304 buff.write(_struct_I.pack(length)) 01305 for val3 in _v64.vertices: 01306 _x = val3 01307 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01308 _v65 = val1.pose_stamped 01309 _v66 = _v65.header 01310 buff.write(_struct_I.pack(_v66.seq)) 01311 _v67 = _v66.stamp 01312 _x = _v67 01313 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01314 _x = _v66.frame_id 01315 length = len(_x) 01316 buff.write(struct.pack('<I%ss'%length, length, _x)) 01317 _v68 = _v65.pose 01318 _v69 = _v68.position 01319 _x = _v69 01320 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01321 _v70 = _v68.orientation 01322 _x = _v70 01323 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01324 length = len(val1.link_names) 01325 buff.write(_struct_I.pack(length)) 01326 for val2 in val1.link_names: 01327 length = len(val2) 01328 buff.write(struct.pack('<I%ss'%length, length, val2)) 01329 buff.write(_struct_d.pack(val1.penetration_depth)) 01330 length = len(self.planning_scene_diff.link_padding) 01331 buff.write(_struct_I.pack(length)) 01332 for val1 in self.planning_scene_diff.link_padding: 01333 _x = val1.link_name 01334 length = len(_x) 01335 buff.write(struct.pack('<I%ss'%length, length, _x)) 01336 buff.write(_struct_d.pack(val1.padding)) 01337 length = len(self.planning_scene_diff.collision_objects) 01338 buff.write(_struct_I.pack(length)) 01339 for val1 in self.planning_scene_diff.collision_objects: 01340 _v71 = val1.header 01341 buff.write(_struct_I.pack(_v71.seq)) 01342 _v72 = _v71.stamp 01343 _x = _v72 01344 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01345 _x = _v71.frame_id 01346 length = len(_x) 01347 buff.write(struct.pack('<I%ss'%length, length, _x)) 01348 _x = val1.id 01349 length = len(_x) 01350 buff.write(struct.pack('<I%ss'%length, length, _x)) 01351 buff.write(_struct_f.pack(val1.padding)) 01352 _v73 = val1.operation 01353 buff.write(_struct_b.pack(_v73.operation)) 01354 length = len(val1.shapes) 01355 buff.write(_struct_I.pack(length)) 01356 for val2 in val1.shapes: 01357 buff.write(_struct_b.pack(val2.type)) 01358 length = len(val2.dimensions) 01359 buff.write(_struct_I.pack(length)) 01360 pattern = '<%sd'%length 01361 buff.write(val2.dimensions.tostring()) 01362 length = len(val2.triangles) 01363 buff.write(_struct_I.pack(length)) 01364 pattern = '<%si'%length 01365 buff.write(val2.triangles.tostring()) 01366 length = len(val2.vertices) 01367 buff.write(_struct_I.pack(length)) 01368 for val3 in val2.vertices: 01369 _x = val3 01370 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01371 length = len(val1.poses) 01372 buff.write(_struct_I.pack(length)) 01373 for val2 in val1.poses: 01374 _v74 = val2.position 01375 _x = _v74 01376 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01377 _v75 = val2.orientation 01378 _x = _v75 01379 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01380 length = len(self.planning_scene_diff.attached_collision_objects) 01381 buff.write(_struct_I.pack(length)) 01382 for val1 in self.planning_scene_diff.attached_collision_objects: 01383 _x = val1.link_name 01384 length = len(_x) 01385 buff.write(struct.pack('<I%ss'%length, length, _x)) 01386 _v76 = val1.object 01387 _v77 = _v76.header 01388 buff.write(_struct_I.pack(_v77.seq)) 01389 _v78 = _v77.stamp 01390 _x = _v78 01391 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01392 _x = _v77.frame_id 01393 length = len(_x) 01394 buff.write(struct.pack('<I%ss'%length, length, _x)) 01395 _x = _v76.id 01396 length = len(_x) 01397 buff.write(struct.pack('<I%ss'%length, length, _x)) 01398 buff.write(_struct_f.pack(_v76.padding)) 01399 _v79 = _v76.operation 01400 buff.write(_struct_b.pack(_v79.operation)) 01401 length = len(_v76.shapes) 01402 buff.write(_struct_I.pack(length)) 01403 for val3 in _v76.shapes: 01404 buff.write(_struct_b.pack(val3.type)) 01405 length = len(val3.dimensions) 01406 buff.write(_struct_I.pack(length)) 01407 pattern = '<%sd'%length 01408 buff.write(val3.dimensions.tostring()) 01409 length = len(val3.triangles) 01410 buff.write(_struct_I.pack(length)) 01411 pattern = '<%si'%length 01412 buff.write(val3.triangles.tostring()) 01413 length = len(val3.vertices) 01414 buff.write(_struct_I.pack(length)) 01415 for val4 in val3.vertices: 01416 _x = val4 01417 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01418 length = len(_v76.poses) 01419 buff.write(_struct_I.pack(length)) 01420 for val3 in _v76.poses: 01421 _v80 = val3.position 01422 _x = _v80 01423 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01424 _v81 = val3.orientation 01425 _x = _v81 01426 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01427 length = len(val1.touch_links) 01428 buff.write(_struct_I.pack(length)) 01429 for val2 in val1.touch_links: 01430 length = len(val2) 01431 buff.write(struct.pack('<I%ss'%length, length, val2)) 01432 _x = self 01433 buff.write(_struct_3I.pack(_x.planning_scene_diff.collision_map.header.seq, _x.planning_scene_diff.collision_map.header.stamp.secs, _x.planning_scene_diff.collision_map.header.stamp.nsecs)) 01434 _x = self.planning_scene_diff.collision_map.header.frame_id 01435 length = len(_x) 01436 buff.write(struct.pack('<I%ss'%length, length, _x)) 01437 length = len(self.planning_scene_diff.collision_map.boxes) 01438 buff.write(_struct_I.pack(length)) 01439 for val1 in self.planning_scene_diff.collision_map.boxes: 01440 _v82 = val1.center 01441 _x = _v82 01442 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01443 _v83 = val1.extents 01444 _x = _v83 01445 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01446 _v84 = val1.axis 01447 _x = _v84 01448 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01449 buff.write(_struct_f.pack(val1.angle)) 01450 length = len(self.operations.collision_operations) 01451 buff.write(_struct_I.pack(length)) 01452 for val1 in self.operations.collision_operations: 01453 _x = val1.object1 01454 length = len(_x) 01455 buff.write(struct.pack('<I%ss'%length, length, _x)) 01456 _x = val1.object2 01457 length = len(_x) 01458 buff.write(struct.pack('<I%ss'%length, length, _x)) 01459 _x = val1 01460 buff.write(_struct_di.pack(_x.penetration_distance, _x.operation)) 01461 except struct.error as se: self._check_types(se) 01462 except TypeError as te: self._check_types(te) 01463 01464 def deserialize_numpy(self, str, numpy): 01465 """ 01466 unpack serialized message in str into this message instance using numpy for array types 01467 @param str: byte array of serialized message 01468 @type str: str 01469 @param numpy: numpy python module 01470 @type numpy: module 01471 """ 01472 try: 01473 if self.planning_scene_diff is None: 01474 self.planning_scene_diff = arm_navigation_msgs.msg.PlanningScene() 01475 if self.operations is None: 01476 self.operations = arm_navigation_msgs.msg.OrderedCollisionOperations() 01477 end = 0 01478 _x = self 01479 start = end 01480 end += 12 01481 (_x.planning_scene_diff.robot_state.joint_state.header.seq, _x.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 01482 start = end 01483 end += 4 01484 (length,) = _struct_I.unpack(str[start:end]) 01485 start = end 01486 end += length 01487 self.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end] 01488 start = end 01489 end += 4 01490 (length,) = _struct_I.unpack(str[start:end]) 01491 self.planning_scene_diff.robot_state.joint_state.name = [] 01492 for i in range(0, length): 01493 start = end 01494 end += 4 01495 (length,) = _struct_I.unpack(str[start:end]) 01496 start = end 01497 end += length 01498 val1 = str[start:end] 01499 self.planning_scene_diff.robot_state.joint_state.name.append(val1) 01500 start = end 01501 end += 4 01502 (length,) = _struct_I.unpack(str[start:end]) 01503 pattern = '<%sd'%length 01504 start = end 01505 end += struct.calcsize(pattern) 01506 self.planning_scene_diff.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01507 start = end 01508 end += 4 01509 (length,) = _struct_I.unpack(str[start:end]) 01510 pattern = '<%sd'%length 01511 start = end 01512 end += struct.calcsize(pattern) 01513 self.planning_scene_diff.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01514 start = end 01515 end += 4 01516 (length,) = _struct_I.unpack(str[start:end]) 01517 pattern = '<%sd'%length 01518 start = end 01519 end += struct.calcsize(pattern) 01520 self.planning_scene_diff.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01521 _x = self 01522 start = end 01523 end += 8 01524 (_x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene_diff.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 01525 start = end 01526 end += 4 01527 (length,) = _struct_I.unpack(str[start:end]) 01528 self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names = [] 01529 for i in range(0, length): 01530 start = end 01531 end += 4 01532 (length,) = _struct_I.unpack(str[start:end]) 01533 start = end 01534 end += length 01535 val1 = str[start:end] 01536 self.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names.append(val1) 01537 start = end 01538 end += 4 01539 (length,) = _struct_I.unpack(str[start:end]) 01540 self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids = [] 01541 for i in range(0, length): 01542 start = end 01543 end += 4 01544 (length,) = _struct_I.unpack(str[start:end]) 01545 start = end 01546 end += length 01547 val1 = str[start:end] 01548 self.planning_scene_diff.robot_state.multi_dof_joint_state.frame_ids.append(val1) 01549 start = end 01550 end += 4 01551 (length,) = _struct_I.unpack(str[start:end]) 01552 self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids = [] 01553 for i in range(0, length): 01554 start = end 01555 end += 4 01556 (length,) = _struct_I.unpack(str[start:end]) 01557 start = end 01558 end += length 01559 val1 = str[start:end] 01560 self.planning_scene_diff.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 01561 start = end 01562 end += 4 01563 (length,) = _struct_I.unpack(str[start:end]) 01564 self.planning_scene_diff.robot_state.multi_dof_joint_state.poses = [] 01565 for i in range(0, length): 01566 val1 = geometry_msgs.msg.Pose() 01567 _v85 = val1.position 01568 _x = _v85 01569 start = end 01570 end += 24 01571 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01572 _v86 = val1.orientation 01573 _x = _v86 01574 start = end 01575 end += 32 01576 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01577 self.planning_scene_diff.robot_state.multi_dof_joint_state.poses.append(val1) 01578 start = end 01579 end += 4 01580 (length,) = _struct_I.unpack(str[start:end]) 01581 self.planning_scene_diff.fixed_frame_transforms = [] 01582 for i in range(0, length): 01583 val1 = geometry_msgs.msg.TransformStamped() 01584 _v87 = val1.header 01585 start = end 01586 end += 4 01587 (_v87.seq,) = _struct_I.unpack(str[start:end]) 01588 _v88 = _v87.stamp 01589 _x = _v88 01590 start = end 01591 end += 8 01592 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01593 start = end 01594 end += 4 01595 (length,) = _struct_I.unpack(str[start:end]) 01596 start = end 01597 end += length 01598 _v87.frame_id = str[start:end] 01599 start = end 01600 end += 4 01601 (length,) = _struct_I.unpack(str[start:end]) 01602 start = end 01603 end += length 01604 val1.child_frame_id = str[start:end] 01605 _v89 = val1.transform 01606 _v90 = _v89.translation 01607 _x = _v90 01608 start = end 01609 end += 24 01610 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01611 _v91 = _v89.rotation 01612 _x = _v91 01613 start = end 01614 end += 32 01615 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01616 self.planning_scene_diff.fixed_frame_transforms.append(val1) 01617 start = end 01618 end += 4 01619 (length,) = _struct_I.unpack(str[start:end]) 01620 self.planning_scene_diff.allowed_collision_matrix.link_names = [] 01621 for i in range(0, length): 01622 start = end 01623 end += 4 01624 (length,) = _struct_I.unpack(str[start:end]) 01625 start = end 01626 end += length 01627 val1 = str[start:end] 01628 self.planning_scene_diff.allowed_collision_matrix.link_names.append(val1) 01629 start = end 01630 end += 4 01631 (length,) = _struct_I.unpack(str[start:end]) 01632 self.planning_scene_diff.allowed_collision_matrix.entries = [] 01633 for i in range(0, length): 01634 val1 = arm_navigation_msgs.msg.AllowedCollisionEntry() 01635 start = end 01636 end += 4 01637 (length,) = _struct_I.unpack(str[start:end]) 01638 pattern = '<%sB'%length 01639 start = end 01640 end += struct.calcsize(pattern) 01641 val1.enabled = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 01642 val1.enabled = map(bool, val1.enabled) 01643 self.planning_scene_diff.allowed_collision_matrix.entries.append(val1) 01644 start = end 01645 end += 4 01646 (length,) = _struct_I.unpack(str[start:end]) 01647 self.planning_scene_diff.allowed_contacts = [] 01648 for i in range(0, length): 01649 val1 = arm_navigation_msgs.msg.AllowedContactSpecification() 01650 start = end 01651 end += 4 01652 (length,) = _struct_I.unpack(str[start:end]) 01653 start = end 01654 end += length 01655 val1.name = str[start:end] 01656 _v92 = val1.shape 01657 start = end 01658 end += 1 01659 (_v92.type,) = _struct_b.unpack(str[start:end]) 01660 start = end 01661 end += 4 01662 (length,) = _struct_I.unpack(str[start:end]) 01663 pattern = '<%sd'%length 01664 start = end 01665 end += struct.calcsize(pattern) 01666 _v92.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01667 start = end 01668 end += 4 01669 (length,) = _struct_I.unpack(str[start:end]) 01670 pattern = '<%si'%length 01671 start = end 01672 end += struct.calcsize(pattern) 01673 _v92.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 01674 start = end 01675 end += 4 01676 (length,) = _struct_I.unpack(str[start:end]) 01677 _v92.vertices = [] 01678 for i in range(0, length): 01679 val3 = geometry_msgs.msg.Point() 01680 _x = val3 01681 start = end 01682 end += 24 01683 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01684 _v92.vertices.append(val3) 01685 _v93 = val1.pose_stamped 01686 _v94 = _v93.header 01687 start = end 01688 end += 4 01689 (_v94.seq,) = _struct_I.unpack(str[start:end]) 01690 _v95 = _v94.stamp 01691 _x = _v95 01692 start = end 01693 end += 8 01694 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01695 start = end 01696 end += 4 01697 (length,) = _struct_I.unpack(str[start:end]) 01698 start = end 01699 end += length 01700 _v94.frame_id = str[start:end] 01701 _v96 = _v93.pose 01702 _v97 = _v96.position 01703 _x = _v97 01704 start = end 01705 end += 24 01706 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01707 _v98 = _v96.orientation 01708 _x = _v98 01709 start = end 01710 end += 32 01711 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01712 start = end 01713 end += 4 01714 (length,) = _struct_I.unpack(str[start:end]) 01715 val1.link_names = [] 01716 for i in range(0, length): 01717 start = end 01718 end += 4 01719 (length,) = _struct_I.unpack(str[start:end]) 01720 start = end 01721 end += length 01722 val2 = str[start:end] 01723 val1.link_names.append(val2) 01724 start = end 01725 end += 8 01726 (val1.penetration_depth,) = _struct_d.unpack(str[start:end]) 01727 self.planning_scene_diff.allowed_contacts.append(val1) 01728 start = end 01729 end += 4 01730 (length,) = _struct_I.unpack(str[start:end]) 01731 self.planning_scene_diff.link_padding = [] 01732 for i in range(0, length): 01733 val1 = arm_navigation_msgs.msg.LinkPadding() 01734 start = end 01735 end += 4 01736 (length,) = _struct_I.unpack(str[start:end]) 01737 start = end 01738 end += length 01739 val1.link_name = str[start:end] 01740 start = end 01741 end += 8 01742 (val1.padding,) = _struct_d.unpack(str[start:end]) 01743 self.planning_scene_diff.link_padding.append(val1) 01744 start = end 01745 end += 4 01746 (length,) = _struct_I.unpack(str[start:end]) 01747 self.planning_scene_diff.collision_objects = [] 01748 for i in range(0, length): 01749 val1 = arm_navigation_msgs.msg.CollisionObject() 01750 _v99 = val1.header 01751 start = end 01752 end += 4 01753 (_v99.seq,) = _struct_I.unpack(str[start:end]) 01754 _v100 = _v99.stamp 01755 _x = _v100 01756 start = end 01757 end += 8 01758 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01759 start = end 01760 end += 4 01761 (length,) = _struct_I.unpack(str[start:end]) 01762 start = end 01763 end += length 01764 _v99.frame_id = str[start:end] 01765 start = end 01766 end += 4 01767 (length,) = _struct_I.unpack(str[start:end]) 01768 start = end 01769 end += length 01770 val1.id = str[start:end] 01771 start = end 01772 end += 4 01773 (val1.padding,) = _struct_f.unpack(str[start:end]) 01774 _v101 = val1.operation 01775 start = end 01776 end += 1 01777 (_v101.operation,) = _struct_b.unpack(str[start:end]) 01778 start = end 01779 end += 4 01780 (length,) = _struct_I.unpack(str[start:end]) 01781 val1.shapes = [] 01782 for i in range(0, length): 01783 val2 = arm_navigation_msgs.msg.Shape() 01784 start = end 01785 end += 1 01786 (val2.type,) = _struct_b.unpack(str[start:end]) 01787 start = end 01788 end += 4 01789 (length,) = _struct_I.unpack(str[start:end]) 01790 pattern = '<%sd'%length 01791 start = end 01792 end += struct.calcsize(pattern) 01793 val2.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01794 start = end 01795 end += 4 01796 (length,) = _struct_I.unpack(str[start:end]) 01797 pattern = '<%si'%length 01798 start = end 01799 end += struct.calcsize(pattern) 01800 val2.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 01801 start = end 01802 end += 4 01803 (length,) = _struct_I.unpack(str[start:end]) 01804 val2.vertices = [] 01805 for i in range(0, length): 01806 val3 = geometry_msgs.msg.Point() 01807 _x = val3 01808 start = end 01809 end += 24 01810 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01811 val2.vertices.append(val3) 01812 val1.shapes.append(val2) 01813 start = end 01814 end += 4 01815 (length,) = _struct_I.unpack(str[start:end]) 01816 val1.poses = [] 01817 for i in range(0, length): 01818 val2 = geometry_msgs.msg.Pose() 01819 _v102 = val2.position 01820 _x = _v102 01821 start = end 01822 end += 24 01823 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01824 _v103 = val2.orientation 01825 _x = _v103 01826 start = end 01827 end += 32 01828 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01829 val1.poses.append(val2) 01830 self.planning_scene_diff.collision_objects.append(val1) 01831 start = end 01832 end += 4 01833 (length,) = _struct_I.unpack(str[start:end]) 01834 self.planning_scene_diff.attached_collision_objects = [] 01835 for i in range(0, length): 01836 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 01837 start = end 01838 end += 4 01839 (length,) = _struct_I.unpack(str[start:end]) 01840 start = end 01841 end += length 01842 val1.link_name = str[start:end] 01843 _v104 = val1.object 01844 _v105 = _v104.header 01845 start = end 01846 end += 4 01847 (_v105.seq,) = _struct_I.unpack(str[start:end]) 01848 _v106 = _v105.stamp 01849 _x = _v106 01850 start = end 01851 end += 8 01852 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01853 start = end 01854 end += 4 01855 (length,) = _struct_I.unpack(str[start:end]) 01856 start = end 01857 end += length 01858 _v105.frame_id = str[start:end] 01859 start = end 01860 end += 4 01861 (length,) = _struct_I.unpack(str[start:end]) 01862 start = end 01863 end += length 01864 _v104.id = str[start:end] 01865 start = end 01866 end += 4 01867 (_v104.padding,) = _struct_f.unpack(str[start:end]) 01868 _v107 = _v104.operation 01869 start = end 01870 end += 1 01871 (_v107.operation,) = _struct_b.unpack(str[start:end]) 01872 start = end 01873 end += 4 01874 (length,) = _struct_I.unpack(str[start:end]) 01875 _v104.shapes = [] 01876 for i in range(0, length): 01877 val3 = arm_navigation_msgs.msg.Shape() 01878 start = end 01879 end += 1 01880 (val3.type,) = _struct_b.unpack(str[start:end]) 01881 start = end 01882 end += 4 01883 (length,) = _struct_I.unpack(str[start:end]) 01884 pattern = '<%sd'%length 01885 start = end 01886 end += struct.calcsize(pattern) 01887 val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01888 start = end 01889 end += 4 01890 (length,) = _struct_I.unpack(str[start:end]) 01891 pattern = '<%si'%length 01892 start = end 01893 end += struct.calcsize(pattern) 01894 val3.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 01895 start = end 01896 end += 4 01897 (length,) = _struct_I.unpack(str[start:end]) 01898 val3.vertices = [] 01899 for i in range(0, length): 01900 val4 = geometry_msgs.msg.Point() 01901 _x = val4 01902 start = end 01903 end += 24 01904 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01905 val3.vertices.append(val4) 01906 _v104.shapes.append(val3) 01907 start = end 01908 end += 4 01909 (length,) = _struct_I.unpack(str[start:end]) 01910 _v104.poses = [] 01911 for i in range(0, length): 01912 val3 = geometry_msgs.msg.Pose() 01913 _v108 = val3.position 01914 _x = _v108 01915 start = end 01916 end += 24 01917 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01918 _v109 = val3.orientation 01919 _x = _v109 01920 start = end 01921 end += 32 01922 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01923 _v104.poses.append(val3) 01924 start = end 01925 end += 4 01926 (length,) = _struct_I.unpack(str[start:end]) 01927 val1.touch_links = [] 01928 for i in range(0, length): 01929 start = end 01930 end += 4 01931 (length,) = _struct_I.unpack(str[start:end]) 01932 start = end 01933 end += length 01934 val2 = str[start:end] 01935 val1.touch_links.append(val2) 01936 self.planning_scene_diff.attached_collision_objects.append(val1) 01937 _x = self 01938 start = end 01939 end += 12 01940 (_x.planning_scene_diff.collision_map.header.seq, _x.planning_scene_diff.collision_map.header.stamp.secs, _x.planning_scene_diff.collision_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 01941 start = end 01942 end += 4 01943 (length,) = _struct_I.unpack(str[start:end]) 01944 start = end 01945 end += length 01946 self.planning_scene_diff.collision_map.header.frame_id = str[start:end] 01947 start = end 01948 end += 4 01949 (length,) = _struct_I.unpack(str[start:end]) 01950 self.planning_scene_diff.collision_map.boxes = [] 01951 for i in range(0, length): 01952 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 01953 _v110 = val1.center 01954 _x = _v110 01955 start = end 01956 end += 12 01957 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01958 _v111 = val1.extents 01959 _x = _v111 01960 start = end 01961 end += 12 01962 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01963 _v112 = val1.axis 01964 _x = _v112 01965 start = end 01966 end += 12 01967 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01968 start = end 01969 end += 4 01970 (val1.angle,) = _struct_f.unpack(str[start:end]) 01971 self.planning_scene_diff.collision_map.boxes.append(val1) 01972 start = end 01973 end += 4 01974 (length,) = _struct_I.unpack(str[start:end]) 01975 self.operations.collision_operations = [] 01976 for i in range(0, length): 01977 val1 = arm_navigation_msgs.msg.CollisionOperation() 01978 start = end 01979 end += 4 01980 (length,) = _struct_I.unpack(str[start:end]) 01981 start = end 01982 end += length 01983 val1.object1 = str[start:end] 01984 start = end 01985 end += 4 01986 (length,) = _struct_I.unpack(str[start:end]) 01987 start = end 01988 end += length 01989 val1.object2 = str[start:end] 01990 _x = val1 01991 start = end 01992 end += 12 01993 (_x.penetration_distance, _x.operation,) = _struct_di.unpack(str[start:end]) 01994 self.operations.collision_operations.append(val1) 01995 return self 01996 except struct.error as e: 01997 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01998 01999 _struct_I = roslib.message.struct_I 02000 _struct_b = struct.Struct("<b") 02001 _struct_d = struct.Struct("<d") 02002 _struct_f = struct.Struct("<f") 02003 _struct_di = struct.Struct("<di") 02004 _struct_3f = struct.Struct("<3f") 02005 _struct_3I = struct.Struct("<3I") 02006 _struct_4d = struct.Struct("<4d") 02007 _struct_2I = struct.Struct("<2I") 02008 _struct_3d = struct.Struct("<3d") 02009 """autogenerated by genmsg_py from GetPlanningSceneResponse.msg. Do not edit.""" 02010 import roslib.message 02011 import struct 02012 02013 import arm_navigation_msgs.msg 02014 import geometry_msgs.msg 02015 import std_msgs.msg 02016 import roslib.rostime 02017 import sensor_msgs.msg 02018 02019 class GetPlanningSceneResponse(roslib.message.Message): 02020 _md5sum = "285525c9abe002fbafa99af84a14b4cb" 02021 _type = "arm_navigation_msgs/GetPlanningSceneResponse" 02022 _has_header = False #flag to mark the presence of a Header object 02023 _full_text = """ 02024 02025 PlanningScene planning_scene 02026 02027 02028 02029 02030 02031 ================================================================================ 02032 MSG: arm_navigation_msgs/PlanningScene 02033 #full robot state 02034 arm_navigation_msgs/RobotState robot_state 02035 02036 #additional frames for duplicating tf 02037 geometry_msgs/TransformStamped[] fixed_frame_transforms 02038 02039 #full allowed collision matrix 02040 AllowedCollisionMatrix allowed_collision_matrix 02041 02042 #allowed contacts 02043 arm_navigation_msgs/AllowedContactSpecification[] allowed_contacts 02044 02045 #all link paddings 02046 arm_navigation_msgs/LinkPadding[] link_padding 02047 02048 #collision objects 02049 arm_navigation_msgs/CollisionObject[] collision_objects 02050 arm_navigation_msgs/AttachedCollisionObject[] attached_collision_objects 02051 02052 #the collision map 02053 arm_navigation_msgs/CollisionMap collision_map 02054 02055 ================================================================================ 02056 MSG: arm_navigation_msgs/RobotState 02057 # This message contains information about the robot state, i.e. the positions of its joints and links 02058 sensor_msgs/JointState joint_state 02059 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state 02060 02061 ================================================================================ 02062 MSG: sensor_msgs/JointState 02063 # This is a message that holds data to describe the state of a set of torque controlled joints. 02064 # 02065 # The state of each joint (revolute or prismatic) is defined by: 02066 # * the position of the joint (rad or m), 02067 # * the velocity of the joint (rad/s or m/s) and 02068 # * the effort that is applied in the joint (Nm or N). 02069 # 02070 # Each joint is uniquely identified by its name 02071 # The header specifies the time at which the joint states were recorded. All the joint states 02072 # in one message have to be recorded at the same time. 02073 # 02074 # This message consists of a multiple arrays, one for each part of the joint state. 02075 # The goal is to make each of the fields optional. When e.g. your joints have no 02076 # effort associated with them, you can leave the effort array empty. 02077 # 02078 # All arrays in this message should have the same size, or be empty. 02079 # This is the only way to uniquely associate the joint name with the correct 02080 # states. 02081 02082 02083 Header header 02084 02085 string[] name 02086 float64[] position 02087 float64[] velocity 02088 float64[] effort 02089 02090 ================================================================================ 02091 MSG: std_msgs/Header 02092 # Standard metadata for higher-level stamped data types. 02093 # This is generally used to communicate timestamped data 02094 # in a particular coordinate frame. 02095 # 02096 # sequence ID: consecutively increasing ID 02097 uint32 seq 02098 #Two-integer timestamp that is expressed as: 02099 # * stamp.secs: seconds (stamp_secs) since epoch 02100 # * stamp.nsecs: nanoseconds since stamp_secs 02101 # time-handling sugar is provided by the client library 02102 time stamp 02103 #Frame this data is associated with 02104 # 0: no frame 02105 # 1: global frame 02106 string frame_id 02107 02108 ================================================================================ 02109 MSG: arm_navigation_msgs/MultiDOFJointState 02110 #A representation of a multi-dof joint state 02111 time stamp 02112 string[] joint_names 02113 string[] frame_ids 02114 string[] child_frame_ids 02115 geometry_msgs/Pose[] poses 02116 02117 ================================================================================ 02118 MSG: geometry_msgs/Pose 02119 # A representation of pose in free space, composed of postion and orientation. 02120 Point position 02121 Quaternion orientation 02122 02123 ================================================================================ 02124 MSG: geometry_msgs/Point 02125 # This contains the position of a point in free space 02126 float64 x 02127 float64 y 02128 float64 z 02129 02130 ================================================================================ 02131 MSG: geometry_msgs/Quaternion 02132 # This represents an orientation in free space in quaternion form. 02133 02134 float64 x 02135 float64 y 02136 float64 z 02137 float64 w 02138 02139 ================================================================================ 02140 MSG: geometry_msgs/TransformStamped 02141 # This expresses a transform from coordinate frame header.frame_id 02142 # to the coordinate frame child_frame_id 02143 # 02144 # This message is mostly used by the 02145 # <a href="http://www.ros.org/wiki/tf">tf</a> package. 02146 # See it's documentation for more information. 02147 02148 Header header 02149 string child_frame_id # the frame id of the child frame 02150 Transform transform 02151 02152 ================================================================================ 02153 MSG: geometry_msgs/Transform 02154 # This represents the transform between two coordinate frames in free space. 02155 02156 Vector3 translation 02157 Quaternion rotation 02158 02159 ================================================================================ 02160 MSG: geometry_msgs/Vector3 02161 # This represents a vector in free space. 02162 02163 float64 x 02164 float64 y 02165 float64 z 02166 ================================================================================ 02167 MSG: arm_navigation_msgs/AllowedCollisionMatrix 02168 # the list of link names in the matrix 02169 string[] link_names 02170 02171 # the individual entries in the allowed collision matrix 02172 # symmetric, with same order as link_names 02173 AllowedCollisionEntry[] entries 02174 02175 ================================================================================ 02176 MSG: arm_navigation_msgs/AllowedCollisionEntry 02177 # whether or not collision checking is enabled 02178 bool[] enabled 02179 02180 ================================================================================ 02181 MSG: arm_navigation_msgs/AllowedContactSpecification 02182 # The names of the regions 02183 string name 02184 02185 # The shape of the region in the environment 02186 arm_navigation_msgs/Shape shape 02187 02188 # The pose of the space defining the region 02189 geometry_msgs/PoseStamped pose_stamped 02190 02191 # The set of links that will be allowed to have penetration contact within this region 02192 string[] link_names 02193 02194 # The maximum penetration depth allowed for every link 02195 float64 penetration_depth 02196 02197 ================================================================================ 02198 MSG: arm_navigation_msgs/Shape 02199 byte SPHERE=0 02200 byte BOX=1 02201 byte CYLINDER=2 02202 byte MESH=3 02203 02204 byte type 02205 02206 02207 #### define sphere, box, cylinder #### 02208 # the origin of each shape is considered at the shape's center 02209 02210 # for sphere 02211 # radius := dimensions[0] 02212 02213 # for cylinder 02214 # radius := dimensions[0] 02215 # length := dimensions[1] 02216 # the length is along the Z axis 02217 02218 # for box 02219 # size_x := dimensions[0] 02220 # size_y := dimensions[1] 02221 # size_z := dimensions[2] 02222 float64[] dimensions 02223 02224 02225 #### define mesh #### 02226 02227 # list of triangles; triangle k is defined by tre vertices located 02228 # at indices triangles[3k], triangles[3k+1], triangles[3k+2] 02229 int32[] triangles 02230 geometry_msgs/Point[] vertices 02231 02232 ================================================================================ 02233 MSG: geometry_msgs/PoseStamped 02234 # A Pose with reference coordinate frame and timestamp 02235 Header header 02236 Pose pose 02237 02238 ================================================================================ 02239 MSG: arm_navigation_msgs/LinkPadding 02240 #name for the link 02241 string link_name 02242 02243 # padding to apply to the link 02244 float64 padding 02245 02246 ================================================================================ 02247 MSG: arm_navigation_msgs/CollisionObject 02248 # a header, used for interpreting the poses 02249 Header header 02250 02251 # the id of the object 02252 string id 02253 02254 # The padding used for filtering points near the object. 02255 # This does not affect collision checking for the object. 02256 # Set to negative to get zero padding. 02257 float32 padding 02258 02259 #This contains what is to be done with the object 02260 CollisionObjectOperation operation 02261 02262 #the shapes associated with the object 02263 arm_navigation_msgs/Shape[] shapes 02264 02265 #the poses associated with the shapes - will be transformed using the header 02266 geometry_msgs/Pose[] poses 02267 02268 ================================================================================ 02269 MSG: arm_navigation_msgs/CollisionObjectOperation 02270 #Puts the object into the environment 02271 #or updates the object if already added 02272 byte ADD=0 02273 02274 #Removes the object from the environment entirely 02275 byte REMOVE=1 02276 02277 #Only valid within the context of a CollisionAttachedObject message 02278 #Will be ignored if sent with an CollisionObject message 02279 #Takes an attached object, detaches from the attached link 02280 #But adds back in as regular object 02281 byte DETACH_AND_ADD_AS_OBJECT=2 02282 02283 #Only valid within the context of a CollisionAttachedObject message 02284 #Will be ignored if sent with an CollisionObject message 02285 #Takes current object in the environment and removes it as 02286 #a regular object 02287 byte ATTACH_AND_REMOVE_AS_OBJECT=3 02288 02289 # Byte code for operation 02290 byte operation 02291 02292 ================================================================================ 02293 MSG: arm_navigation_msgs/AttachedCollisionObject 02294 # The CollisionObject will be attached with a fixed joint to this link 02295 # If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation 02296 # is set to REMOVE will remove all attached bodies attached to any object 02297 string link_name 02298 02299 #Reserved for indicating that all attached objects should be removed 02300 string REMOVE_ALL_ATTACHED_OBJECTS = "all" 02301 02302 #This contains the actual shapes and poses for the CollisionObject 02303 #to be attached to the link 02304 #If action is remove and no object.id is set, all objects 02305 #attached to the link indicated by link_name will be removed 02306 CollisionObject object 02307 02308 # The set of links that the attached objects are allowed to touch 02309 # by default - the link_name is included by default 02310 string[] touch_links 02311 02312 ================================================================================ 02313 MSG: arm_navigation_msgs/CollisionMap 02314 #header for interpreting box positions 02315 Header header 02316 02317 #boxes for use in collision testing 02318 OrientedBoundingBox[] boxes 02319 02320 ================================================================================ 02321 MSG: arm_navigation_msgs/OrientedBoundingBox 02322 #the center of the box 02323 geometry_msgs/Point32 center 02324 02325 #the extents of the box, assuming the center is at the point 02326 geometry_msgs/Point32 extents 02327 02328 #the axis of the box 02329 geometry_msgs/Point32 axis 02330 02331 #the angle of rotation around the axis 02332 float32 angle 02333 02334 ================================================================================ 02335 MSG: geometry_msgs/Point32 02336 # This contains the position of a point in free space(with 32 bits of precision). 02337 # It is recommeded to use Point wherever possible instead of Point32. 02338 # 02339 # This recommendation is to promote interoperability. 02340 # 02341 # This message is designed to take up less space when sending 02342 # lots of points at once, as in the case of a PointCloud. 02343 02344 float32 x 02345 float32 y 02346 float32 z 02347 """ 02348 __slots__ = ['planning_scene'] 02349 _slot_types = ['arm_navigation_msgs/PlanningScene'] 02350 02351 def __init__(self, *args, **kwds): 02352 """ 02353 Constructor. Any message fields that are implicitly/explicitly 02354 set to None will be assigned a default value. The recommend 02355 use is keyword arguments as this is more robust to future message 02356 changes. You cannot mix in-order arguments and keyword arguments. 02357 02358 The available fields are: 02359 planning_scene 02360 02361 @param args: complete set of field values, in .msg order 02362 @param kwds: use keyword arguments corresponding to message field names 02363 to set specific fields. 02364 """ 02365 if args or kwds: 02366 super(GetPlanningSceneResponse, self).__init__(*args, **kwds) 02367 #message fields cannot be None, assign default values for those that are 02368 if self.planning_scene is None: 02369 self.planning_scene = arm_navigation_msgs.msg.PlanningScene() 02370 else: 02371 self.planning_scene = arm_navigation_msgs.msg.PlanningScene() 02372 02373 def _get_types(self): 02374 """ 02375 internal API method 02376 """ 02377 return self._slot_types 02378 02379 def serialize(self, buff): 02380 """ 02381 serialize message into buffer 02382 @param buff: buffer 02383 @type buff: StringIO 02384 """ 02385 try: 02386 _x = self 02387 buff.write(_struct_3I.pack(_x.planning_scene.robot_state.joint_state.header.seq, _x.planning_scene.robot_state.joint_state.header.stamp.secs, _x.planning_scene.robot_state.joint_state.header.stamp.nsecs)) 02388 _x = self.planning_scene.robot_state.joint_state.header.frame_id 02389 length = len(_x) 02390 buff.write(struct.pack('<I%ss'%length, length, _x)) 02391 length = len(self.planning_scene.robot_state.joint_state.name) 02392 buff.write(_struct_I.pack(length)) 02393 for val1 in self.planning_scene.robot_state.joint_state.name: 02394 length = len(val1) 02395 buff.write(struct.pack('<I%ss'%length, length, val1)) 02396 length = len(self.planning_scene.robot_state.joint_state.position) 02397 buff.write(_struct_I.pack(length)) 02398 pattern = '<%sd'%length 02399 buff.write(struct.pack(pattern, *self.planning_scene.robot_state.joint_state.position)) 02400 length = len(self.planning_scene.robot_state.joint_state.velocity) 02401 buff.write(_struct_I.pack(length)) 02402 pattern = '<%sd'%length 02403 buff.write(struct.pack(pattern, *self.planning_scene.robot_state.joint_state.velocity)) 02404 length = len(self.planning_scene.robot_state.joint_state.effort) 02405 buff.write(_struct_I.pack(length)) 02406 pattern = '<%sd'%length 02407 buff.write(struct.pack(pattern, *self.planning_scene.robot_state.joint_state.effort)) 02408 _x = self 02409 buff.write(_struct_2I.pack(_x.planning_scene.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene.robot_state.multi_dof_joint_state.stamp.nsecs)) 02410 length = len(self.planning_scene.robot_state.multi_dof_joint_state.joint_names) 02411 buff.write(_struct_I.pack(length)) 02412 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.joint_names: 02413 length = len(val1) 02414 buff.write(struct.pack('<I%ss'%length, length, val1)) 02415 length = len(self.planning_scene.robot_state.multi_dof_joint_state.frame_ids) 02416 buff.write(_struct_I.pack(length)) 02417 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.frame_ids: 02418 length = len(val1) 02419 buff.write(struct.pack('<I%ss'%length, length, val1)) 02420 length = len(self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids) 02421 buff.write(_struct_I.pack(length)) 02422 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids: 02423 length = len(val1) 02424 buff.write(struct.pack('<I%ss'%length, length, val1)) 02425 length = len(self.planning_scene.robot_state.multi_dof_joint_state.poses) 02426 buff.write(_struct_I.pack(length)) 02427 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.poses: 02428 _v113 = val1.position 02429 _x = _v113 02430 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02431 _v114 = val1.orientation 02432 _x = _v114 02433 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 02434 length = len(self.planning_scene.fixed_frame_transforms) 02435 buff.write(_struct_I.pack(length)) 02436 for val1 in self.planning_scene.fixed_frame_transforms: 02437 _v115 = val1.header 02438 buff.write(_struct_I.pack(_v115.seq)) 02439 _v116 = _v115.stamp 02440 _x = _v116 02441 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02442 _x = _v115.frame_id 02443 length = len(_x) 02444 buff.write(struct.pack('<I%ss'%length, length, _x)) 02445 _x = val1.child_frame_id 02446 length = len(_x) 02447 buff.write(struct.pack('<I%ss'%length, length, _x)) 02448 _v117 = val1.transform 02449 _v118 = _v117.translation 02450 _x = _v118 02451 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02452 _v119 = _v117.rotation 02453 _x = _v119 02454 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 02455 length = len(self.planning_scene.allowed_collision_matrix.link_names) 02456 buff.write(_struct_I.pack(length)) 02457 for val1 in self.planning_scene.allowed_collision_matrix.link_names: 02458 length = len(val1) 02459 buff.write(struct.pack('<I%ss'%length, length, val1)) 02460 length = len(self.planning_scene.allowed_collision_matrix.entries) 02461 buff.write(_struct_I.pack(length)) 02462 for val1 in self.planning_scene.allowed_collision_matrix.entries: 02463 length = len(val1.enabled) 02464 buff.write(_struct_I.pack(length)) 02465 pattern = '<%sB'%length 02466 buff.write(struct.pack(pattern, *val1.enabled)) 02467 length = len(self.planning_scene.allowed_contacts) 02468 buff.write(_struct_I.pack(length)) 02469 for val1 in self.planning_scene.allowed_contacts: 02470 _x = val1.name 02471 length = len(_x) 02472 buff.write(struct.pack('<I%ss'%length, length, _x)) 02473 _v120 = val1.shape 02474 buff.write(_struct_b.pack(_v120.type)) 02475 length = len(_v120.dimensions) 02476 buff.write(_struct_I.pack(length)) 02477 pattern = '<%sd'%length 02478 buff.write(struct.pack(pattern, *_v120.dimensions)) 02479 length = len(_v120.triangles) 02480 buff.write(_struct_I.pack(length)) 02481 pattern = '<%si'%length 02482 buff.write(struct.pack(pattern, *_v120.triangles)) 02483 length = len(_v120.vertices) 02484 buff.write(_struct_I.pack(length)) 02485 for val3 in _v120.vertices: 02486 _x = val3 02487 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02488 _v121 = val1.pose_stamped 02489 _v122 = _v121.header 02490 buff.write(_struct_I.pack(_v122.seq)) 02491 _v123 = _v122.stamp 02492 _x = _v123 02493 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02494 _x = _v122.frame_id 02495 length = len(_x) 02496 buff.write(struct.pack('<I%ss'%length, length, _x)) 02497 _v124 = _v121.pose 02498 _v125 = _v124.position 02499 _x = _v125 02500 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02501 _v126 = _v124.orientation 02502 _x = _v126 02503 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 02504 length = len(val1.link_names) 02505 buff.write(_struct_I.pack(length)) 02506 for val2 in val1.link_names: 02507 length = len(val2) 02508 buff.write(struct.pack('<I%ss'%length, length, val2)) 02509 buff.write(_struct_d.pack(val1.penetration_depth)) 02510 length = len(self.planning_scene.link_padding) 02511 buff.write(_struct_I.pack(length)) 02512 for val1 in self.planning_scene.link_padding: 02513 _x = val1.link_name 02514 length = len(_x) 02515 buff.write(struct.pack('<I%ss'%length, length, _x)) 02516 buff.write(_struct_d.pack(val1.padding)) 02517 length = len(self.planning_scene.collision_objects) 02518 buff.write(_struct_I.pack(length)) 02519 for val1 in self.planning_scene.collision_objects: 02520 _v127 = val1.header 02521 buff.write(_struct_I.pack(_v127.seq)) 02522 _v128 = _v127.stamp 02523 _x = _v128 02524 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02525 _x = _v127.frame_id 02526 length = len(_x) 02527 buff.write(struct.pack('<I%ss'%length, length, _x)) 02528 _x = val1.id 02529 length = len(_x) 02530 buff.write(struct.pack('<I%ss'%length, length, _x)) 02531 buff.write(_struct_f.pack(val1.padding)) 02532 _v129 = val1.operation 02533 buff.write(_struct_b.pack(_v129.operation)) 02534 length = len(val1.shapes) 02535 buff.write(_struct_I.pack(length)) 02536 for val2 in val1.shapes: 02537 buff.write(_struct_b.pack(val2.type)) 02538 length = len(val2.dimensions) 02539 buff.write(_struct_I.pack(length)) 02540 pattern = '<%sd'%length 02541 buff.write(struct.pack(pattern, *val2.dimensions)) 02542 length = len(val2.triangles) 02543 buff.write(_struct_I.pack(length)) 02544 pattern = '<%si'%length 02545 buff.write(struct.pack(pattern, *val2.triangles)) 02546 length = len(val2.vertices) 02547 buff.write(_struct_I.pack(length)) 02548 for val3 in val2.vertices: 02549 _x = val3 02550 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02551 length = len(val1.poses) 02552 buff.write(_struct_I.pack(length)) 02553 for val2 in val1.poses: 02554 _v130 = val2.position 02555 _x = _v130 02556 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02557 _v131 = val2.orientation 02558 _x = _v131 02559 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 02560 length = len(self.planning_scene.attached_collision_objects) 02561 buff.write(_struct_I.pack(length)) 02562 for val1 in self.planning_scene.attached_collision_objects: 02563 _x = val1.link_name 02564 length = len(_x) 02565 buff.write(struct.pack('<I%ss'%length, length, _x)) 02566 _v132 = val1.object 02567 _v133 = _v132.header 02568 buff.write(_struct_I.pack(_v133.seq)) 02569 _v134 = _v133.stamp 02570 _x = _v134 02571 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02572 _x = _v133.frame_id 02573 length = len(_x) 02574 buff.write(struct.pack('<I%ss'%length, length, _x)) 02575 _x = _v132.id 02576 length = len(_x) 02577 buff.write(struct.pack('<I%ss'%length, length, _x)) 02578 buff.write(_struct_f.pack(_v132.padding)) 02579 _v135 = _v132.operation 02580 buff.write(_struct_b.pack(_v135.operation)) 02581 length = len(_v132.shapes) 02582 buff.write(_struct_I.pack(length)) 02583 for val3 in _v132.shapes: 02584 buff.write(_struct_b.pack(val3.type)) 02585 length = len(val3.dimensions) 02586 buff.write(_struct_I.pack(length)) 02587 pattern = '<%sd'%length 02588 buff.write(struct.pack(pattern, *val3.dimensions)) 02589 length = len(val3.triangles) 02590 buff.write(_struct_I.pack(length)) 02591 pattern = '<%si'%length 02592 buff.write(struct.pack(pattern, *val3.triangles)) 02593 length = len(val3.vertices) 02594 buff.write(_struct_I.pack(length)) 02595 for val4 in val3.vertices: 02596 _x = val4 02597 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02598 length = len(_v132.poses) 02599 buff.write(_struct_I.pack(length)) 02600 for val3 in _v132.poses: 02601 _v136 = val3.position 02602 _x = _v136 02603 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02604 _v137 = val3.orientation 02605 _x = _v137 02606 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 02607 length = len(val1.touch_links) 02608 buff.write(_struct_I.pack(length)) 02609 for val2 in val1.touch_links: 02610 length = len(val2) 02611 buff.write(struct.pack('<I%ss'%length, length, val2)) 02612 _x = self 02613 buff.write(_struct_3I.pack(_x.planning_scene.collision_map.header.seq, _x.planning_scene.collision_map.header.stamp.secs, _x.planning_scene.collision_map.header.stamp.nsecs)) 02614 _x = self.planning_scene.collision_map.header.frame_id 02615 length = len(_x) 02616 buff.write(struct.pack('<I%ss'%length, length, _x)) 02617 length = len(self.planning_scene.collision_map.boxes) 02618 buff.write(_struct_I.pack(length)) 02619 for val1 in self.planning_scene.collision_map.boxes: 02620 _v138 = val1.center 02621 _x = _v138 02622 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 02623 _v139 = val1.extents 02624 _x = _v139 02625 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 02626 _v140 = val1.axis 02627 _x = _v140 02628 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 02629 buff.write(_struct_f.pack(val1.angle)) 02630 except struct.error as se: self._check_types(se) 02631 except TypeError as te: self._check_types(te) 02632 02633 def deserialize(self, str): 02634 """ 02635 unpack serialized message in str into this message instance 02636 @param str: byte array of serialized message 02637 @type str: str 02638 """ 02639 try: 02640 if self.planning_scene is None: 02641 self.planning_scene = arm_navigation_msgs.msg.PlanningScene() 02642 end = 0 02643 _x = self 02644 start = end 02645 end += 12 02646 (_x.planning_scene.robot_state.joint_state.header.seq, _x.planning_scene.robot_state.joint_state.header.stamp.secs, _x.planning_scene.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 02647 start = end 02648 end += 4 02649 (length,) = _struct_I.unpack(str[start:end]) 02650 start = end 02651 end += length 02652 self.planning_scene.robot_state.joint_state.header.frame_id = str[start:end] 02653 start = end 02654 end += 4 02655 (length,) = _struct_I.unpack(str[start:end]) 02656 self.planning_scene.robot_state.joint_state.name = [] 02657 for i in range(0, length): 02658 start = end 02659 end += 4 02660 (length,) = _struct_I.unpack(str[start:end]) 02661 start = end 02662 end += length 02663 val1 = str[start:end] 02664 self.planning_scene.robot_state.joint_state.name.append(val1) 02665 start = end 02666 end += 4 02667 (length,) = _struct_I.unpack(str[start:end]) 02668 pattern = '<%sd'%length 02669 start = end 02670 end += struct.calcsize(pattern) 02671 self.planning_scene.robot_state.joint_state.position = struct.unpack(pattern, str[start:end]) 02672 start = end 02673 end += 4 02674 (length,) = _struct_I.unpack(str[start:end]) 02675 pattern = '<%sd'%length 02676 start = end 02677 end += struct.calcsize(pattern) 02678 self.planning_scene.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) 02679 start = end 02680 end += 4 02681 (length,) = _struct_I.unpack(str[start:end]) 02682 pattern = '<%sd'%length 02683 start = end 02684 end += struct.calcsize(pattern) 02685 self.planning_scene.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end]) 02686 _x = self 02687 start = end 02688 end += 8 02689 (_x.planning_scene.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 02690 start = end 02691 end += 4 02692 (length,) = _struct_I.unpack(str[start:end]) 02693 self.planning_scene.robot_state.multi_dof_joint_state.joint_names = [] 02694 for i in range(0, length): 02695 start = end 02696 end += 4 02697 (length,) = _struct_I.unpack(str[start:end]) 02698 start = end 02699 end += length 02700 val1 = str[start:end] 02701 self.planning_scene.robot_state.multi_dof_joint_state.joint_names.append(val1) 02702 start = end 02703 end += 4 02704 (length,) = _struct_I.unpack(str[start:end]) 02705 self.planning_scene.robot_state.multi_dof_joint_state.frame_ids = [] 02706 for i in range(0, length): 02707 start = end 02708 end += 4 02709 (length,) = _struct_I.unpack(str[start:end]) 02710 start = end 02711 end += length 02712 val1 = str[start:end] 02713 self.planning_scene.robot_state.multi_dof_joint_state.frame_ids.append(val1) 02714 start = end 02715 end += 4 02716 (length,) = _struct_I.unpack(str[start:end]) 02717 self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids = [] 02718 for i in range(0, length): 02719 start = end 02720 end += 4 02721 (length,) = _struct_I.unpack(str[start:end]) 02722 start = end 02723 end += length 02724 val1 = str[start:end] 02725 self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 02726 start = end 02727 end += 4 02728 (length,) = _struct_I.unpack(str[start:end]) 02729 self.planning_scene.robot_state.multi_dof_joint_state.poses = [] 02730 for i in range(0, length): 02731 val1 = geometry_msgs.msg.Pose() 02732 _v141 = val1.position 02733 _x = _v141 02734 start = end 02735 end += 24 02736 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02737 _v142 = val1.orientation 02738 _x = _v142 02739 start = end 02740 end += 32 02741 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02742 self.planning_scene.robot_state.multi_dof_joint_state.poses.append(val1) 02743 start = end 02744 end += 4 02745 (length,) = _struct_I.unpack(str[start:end]) 02746 self.planning_scene.fixed_frame_transforms = [] 02747 for i in range(0, length): 02748 val1 = geometry_msgs.msg.TransformStamped() 02749 _v143 = val1.header 02750 start = end 02751 end += 4 02752 (_v143.seq,) = _struct_I.unpack(str[start:end]) 02753 _v144 = _v143.stamp 02754 _x = _v144 02755 start = end 02756 end += 8 02757 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02758 start = end 02759 end += 4 02760 (length,) = _struct_I.unpack(str[start:end]) 02761 start = end 02762 end += length 02763 _v143.frame_id = str[start:end] 02764 start = end 02765 end += 4 02766 (length,) = _struct_I.unpack(str[start:end]) 02767 start = end 02768 end += length 02769 val1.child_frame_id = str[start:end] 02770 _v145 = val1.transform 02771 _v146 = _v145.translation 02772 _x = _v146 02773 start = end 02774 end += 24 02775 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02776 _v147 = _v145.rotation 02777 _x = _v147 02778 start = end 02779 end += 32 02780 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02781 self.planning_scene.fixed_frame_transforms.append(val1) 02782 start = end 02783 end += 4 02784 (length,) = _struct_I.unpack(str[start:end]) 02785 self.planning_scene.allowed_collision_matrix.link_names = [] 02786 for i in range(0, length): 02787 start = end 02788 end += 4 02789 (length,) = _struct_I.unpack(str[start:end]) 02790 start = end 02791 end += length 02792 val1 = str[start:end] 02793 self.planning_scene.allowed_collision_matrix.link_names.append(val1) 02794 start = end 02795 end += 4 02796 (length,) = _struct_I.unpack(str[start:end]) 02797 self.planning_scene.allowed_collision_matrix.entries = [] 02798 for i in range(0, length): 02799 val1 = arm_navigation_msgs.msg.AllowedCollisionEntry() 02800 start = end 02801 end += 4 02802 (length,) = _struct_I.unpack(str[start:end]) 02803 pattern = '<%sB'%length 02804 start = end 02805 end += struct.calcsize(pattern) 02806 val1.enabled = struct.unpack(pattern, str[start:end]) 02807 val1.enabled = map(bool, val1.enabled) 02808 self.planning_scene.allowed_collision_matrix.entries.append(val1) 02809 start = end 02810 end += 4 02811 (length,) = _struct_I.unpack(str[start:end]) 02812 self.planning_scene.allowed_contacts = [] 02813 for i in range(0, length): 02814 val1 = arm_navigation_msgs.msg.AllowedContactSpecification() 02815 start = end 02816 end += 4 02817 (length,) = _struct_I.unpack(str[start:end]) 02818 start = end 02819 end += length 02820 val1.name = str[start:end] 02821 _v148 = val1.shape 02822 start = end 02823 end += 1 02824 (_v148.type,) = _struct_b.unpack(str[start:end]) 02825 start = end 02826 end += 4 02827 (length,) = _struct_I.unpack(str[start:end]) 02828 pattern = '<%sd'%length 02829 start = end 02830 end += struct.calcsize(pattern) 02831 _v148.dimensions = struct.unpack(pattern, str[start:end]) 02832 start = end 02833 end += 4 02834 (length,) = _struct_I.unpack(str[start:end]) 02835 pattern = '<%si'%length 02836 start = end 02837 end += struct.calcsize(pattern) 02838 _v148.triangles = struct.unpack(pattern, str[start:end]) 02839 start = end 02840 end += 4 02841 (length,) = _struct_I.unpack(str[start:end]) 02842 _v148.vertices = [] 02843 for i in range(0, length): 02844 val3 = geometry_msgs.msg.Point() 02845 _x = val3 02846 start = end 02847 end += 24 02848 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02849 _v148.vertices.append(val3) 02850 _v149 = val1.pose_stamped 02851 _v150 = _v149.header 02852 start = end 02853 end += 4 02854 (_v150.seq,) = _struct_I.unpack(str[start:end]) 02855 _v151 = _v150.stamp 02856 _x = _v151 02857 start = end 02858 end += 8 02859 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02860 start = end 02861 end += 4 02862 (length,) = _struct_I.unpack(str[start:end]) 02863 start = end 02864 end += length 02865 _v150.frame_id = str[start:end] 02866 _v152 = _v149.pose 02867 _v153 = _v152.position 02868 _x = _v153 02869 start = end 02870 end += 24 02871 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02872 _v154 = _v152.orientation 02873 _x = _v154 02874 start = end 02875 end += 32 02876 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02877 start = end 02878 end += 4 02879 (length,) = _struct_I.unpack(str[start:end]) 02880 val1.link_names = [] 02881 for i in range(0, length): 02882 start = end 02883 end += 4 02884 (length,) = _struct_I.unpack(str[start:end]) 02885 start = end 02886 end += length 02887 val2 = str[start:end] 02888 val1.link_names.append(val2) 02889 start = end 02890 end += 8 02891 (val1.penetration_depth,) = _struct_d.unpack(str[start:end]) 02892 self.planning_scene.allowed_contacts.append(val1) 02893 start = end 02894 end += 4 02895 (length,) = _struct_I.unpack(str[start:end]) 02896 self.planning_scene.link_padding = [] 02897 for i in range(0, length): 02898 val1 = arm_navigation_msgs.msg.LinkPadding() 02899 start = end 02900 end += 4 02901 (length,) = _struct_I.unpack(str[start:end]) 02902 start = end 02903 end += length 02904 val1.link_name = str[start:end] 02905 start = end 02906 end += 8 02907 (val1.padding,) = _struct_d.unpack(str[start:end]) 02908 self.planning_scene.link_padding.append(val1) 02909 start = end 02910 end += 4 02911 (length,) = _struct_I.unpack(str[start:end]) 02912 self.planning_scene.collision_objects = [] 02913 for i in range(0, length): 02914 val1 = arm_navigation_msgs.msg.CollisionObject() 02915 _v155 = val1.header 02916 start = end 02917 end += 4 02918 (_v155.seq,) = _struct_I.unpack(str[start:end]) 02919 _v156 = _v155.stamp 02920 _x = _v156 02921 start = end 02922 end += 8 02923 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02924 start = end 02925 end += 4 02926 (length,) = _struct_I.unpack(str[start:end]) 02927 start = end 02928 end += length 02929 _v155.frame_id = str[start:end] 02930 start = end 02931 end += 4 02932 (length,) = _struct_I.unpack(str[start:end]) 02933 start = end 02934 end += length 02935 val1.id = str[start:end] 02936 start = end 02937 end += 4 02938 (val1.padding,) = _struct_f.unpack(str[start:end]) 02939 _v157 = val1.operation 02940 start = end 02941 end += 1 02942 (_v157.operation,) = _struct_b.unpack(str[start:end]) 02943 start = end 02944 end += 4 02945 (length,) = _struct_I.unpack(str[start:end]) 02946 val1.shapes = [] 02947 for i in range(0, length): 02948 val2 = arm_navigation_msgs.msg.Shape() 02949 start = end 02950 end += 1 02951 (val2.type,) = _struct_b.unpack(str[start:end]) 02952 start = end 02953 end += 4 02954 (length,) = _struct_I.unpack(str[start:end]) 02955 pattern = '<%sd'%length 02956 start = end 02957 end += struct.calcsize(pattern) 02958 val2.dimensions = struct.unpack(pattern, str[start:end]) 02959 start = end 02960 end += 4 02961 (length,) = _struct_I.unpack(str[start:end]) 02962 pattern = '<%si'%length 02963 start = end 02964 end += struct.calcsize(pattern) 02965 val2.triangles = struct.unpack(pattern, str[start:end]) 02966 start = end 02967 end += 4 02968 (length,) = _struct_I.unpack(str[start:end]) 02969 val2.vertices = [] 02970 for i in range(0, length): 02971 val3 = geometry_msgs.msg.Point() 02972 _x = val3 02973 start = end 02974 end += 24 02975 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02976 val2.vertices.append(val3) 02977 val1.shapes.append(val2) 02978 start = end 02979 end += 4 02980 (length,) = _struct_I.unpack(str[start:end]) 02981 val1.poses = [] 02982 for i in range(0, length): 02983 val2 = geometry_msgs.msg.Pose() 02984 _v158 = val2.position 02985 _x = _v158 02986 start = end 02987 end += 24 02988 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02989 _v159 = val2.orientation 02990 _x = _v159 02991 start = end 02992 end += 32 02993 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02994 val1.poses.append(val2) 02995 self.planning_scene.collision_objects.append(val1) 02996 start = end 02997 end += 4 02998 (length,) = _struct_I.unpack(str[start:end]) 02999 self.planning_scene.attached_collision_objects = [] 03000 for i in range(0, length): 03001 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 03002 start = end 03003 end += 4 03004 (length,) = _struct_I.unpack(str[start:end]) 03005 start = end 03006 end += length 03007 val1.link_name = str[start:end] 03008 _v160 = val1.object 03009 _v161 = _v160.header 03010 start = end 03011 end += 4 03012 (_v161.seq,) = _struct_I.unpack(str[start:end]) 03013 _v162 = _v161.stamp 03014 _x = _v162 03015 start = end 03016 end += 8 03017 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 03018 start = end 03019 end += 4 03020 (length,) = _struct_I.unpack(str[start:end]) 03021 start = end 03022 end += length 03023 _v161.frame_id = str[start:end] 03024 start = end 03025 end += 4 03026 (length,) = _struct_I.unpack(str[start:end]) 03027 start = end 03028 end += length 03029 _v160.id = str[start:end] 03030 start = end 03031 end += 4 03032 (_v160.padding,) = _struct_f.unpack(str[start:end]) 03033 _v163 = _v160.operation 03034 start = end 03035 end += 1 03036 (_v163.operation,) = _struct_b.unpack(str[start:end]) 03037 start = end 03038 end += 4 03039 (length,) = _struct_I.unpack(str[start:end]) 03040 _v160.shapes = [] 03041 for i in range(0, length): 03042 val3 = arm_navigation_msgs.msg.Shape() 03043 start = end 03044 end += 1 03045 (val3.type,) = _struct_b.unpack(str[start:end]) 03046 start = end 03047 end += 4 03048 (length,) = _struct_I.unpack(str[start:end]) 03049 pattern = '<%sd'%length 03050 start = end 03051 end += struct.calcsize(pattern) 03052 val3.dimensions = struct.unpack(pattern, str[start:end]) 03053 start = end 03054 end += 4 03055 (length,) = _struct_I.unpack(str[start:end]) 03056 pattern = '<%si'%length 03057 start = end 03058 end += struct.calcsize(pattern) 03059 val3.triangles = struct.unpack(pattern, str[start:end]) 03060 start = end 03061 end += 4 03062 (length,) = _struct_I.unpack(str[start:end]) 03063 val3.vertices = [] 03064 for i in range(0, length): 03065 val4 = geometry_msgs.msg.Point() 03066 _x = val4 03067 start = end 03068 end += 24 03069 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03070 val3.vertices.append(val4) 03071 _v160.shapes.append(val3) 03072 start = end 03073 end += 4 03074 (length,) = _struct_I.unpack(str[start:end]) 03075 _v160.poses = [] 03076 for i in range(0, length): 03077 val3 = geometry_msgs.msg.Pose() 03078 _v164 = val3.position 03079 _x = _v164 03080 start = end 03081 end += 24 03082 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03083 _v165 = val3.orientation 03084 _x = _v165 03085 start = end 03086 end += 32 03087 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03088 _v160.poses.append(val3) 03089 start = end 03090 end += 4 03091 (length,) = _struct_I.unpack(str[start:end]) 03092 val1.touch_links = [] 03093 for i in range(0, length): 03094 start = end 03095 end += 4 03096 (length,) = _struct_I.unpack(str[start:end]) 03097 start = end 03098 end += length 03099 val2 = str[start:end] 03100 val1.touch_links.append(val2) 03101 self.planning_scene.attached_collision_objects.append(val1) 03102 _x = self 03103 start = end 03104 end += 12 03105 (_x.planning_scene.collision_map.header.seq, _x.planning_scene.collision_map.header.stamp.secs, _x.planning_scene.collision_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 03106 start = end 03107 end += 4 03108 (length,) = _struct_I.unpack(str[start:end]) 03109 start = end 03110 end += length 03111 self.planning_scene.collision_map.header.frame_id = str[start:end] 03112 start = end 03113 end += 4 03114 (length,) = _struct_I.unpack(str[start:end]) 03115 self.planning_scene.collision_map.boxes = [] 03116 for i in range(0, length): 03117 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 03118 _v166 = val1.center 03119 _x = _v166 03120 start = end 03121 end += 12 03122 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03123 _v167 = val1.extents 03124 _x = _v167 03125 start = end 03126 end += 12 03127 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03128 _v168 = val1.axis 03129 _x = _v168 03130 start = end 03131 end += 12 03132 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03133 start = end 03134 end += 4 03135 (val1.angle,) = _struct_f.unpack(str[start:end]) 03136 self.planning_scene.collision_map.boxes.append(val1) 03137 return self 03138 except struct.error as e: 03139 raise roslib.message.DeserializationError(e) #most likely buffer underfill 03140 03141 03142 def serialize_numpy(self, buff, numpy): 03143 """ 03144 serialize message with numpy array types into buffer 03145 @param buff: buffer 03146 @type buff: StringIO 03147 @param numpy: numpy python module 03148 @type numpy module 03149 """ 03150 try: 03151 _x = self 03152 buff.write(_struct_3I.pack(_x.planning_scene.robot_state.joint_state.header.seq, _x.planning_scene.robot_state.joint_state.header.stamp.secs, _x.planning_scene.robot_state.joint_state.header.stamp.nsecs)) 03153 _x = self.planning_scene.robot_state.joint_state.header.frame_id 03154 length = len(_x) 03155 buff.write(struct.pack('<I%ss'%length, length, _x)) 03156 length = len(self.planning_scene.robot_state.joint_state.name) 03157 buff.write(_struct_I.pack(length)) 03158 for val1 in self.planning_scene.robot_state.joint_state.name: 03159 length = len(val1) 03160 buff.write(struct.pack('<I%ss'%length, length, val1)) 03161 length = len(self.planning_scene.robot_state.joint_state.position) 03162 buff.write(_struct_I.pack(length)) 03163 pattern = '<%sd'%length 03164 buff.write(self.planning_scene.robot_state.joint_state.position.tostring()) 03165 length = len(self.planning_scene.robot_state.joint_state.velocity) 03166 buff.write(_struct_I.pack(length)) 03167 pattern = '<%sd'%length 03168 buff.write(self.planning_scene.robot_state.joint_state.velocity.tostring()) 03169 length = len(self.planning_scene.robot_state.joint_state.effort) 03170 buff.write(_struct_I.pack(length)) 03171 pattern = '<%sd'%length 03172 buff.write(self.planning_scene.robot_state.joint_state.effort.tostring()) 03173 _x = self 03174 buff.write(_struct_2I.pack(_x.planning_scene.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene.robot_state.multi_dof_joint_state.stamp.nsecs)) 03175 length = len(self.planning_scene.robot_state.multi_dof_joint_state.joint_names) 03176 buff.write(_struct_I.pack(length)) 03177 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.joint_names: 03178 length = len(val1) 03179 buff.write(struct.pack('<I%ss'%length, length, val1)) 03180 length = len(self.planning_scene.robot_state.multi_dof_joint_state.frame_ids) 03181 buff.write(_struct_I.pack(length)) 03182 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.frame_ids: 03183 length = len(val1) 03184 buff.write(struct.pack('<I%ss'%length, length, val1)) 03185 length = len(self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids) 03186 buff.write(_struct_I.pack(length)) 03187 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids: 03188 length = len(val1) 03189 buff.write(struct.pack('<I%ss'%length, length, val1)) 03190 length = len(self.planning_scene.robot_state.multi_dof_joint_state.poses) 03191 buff.write(_struct_I.pack(length)) 03192 for val1 in self.planning_scene.robot_state.multi_dof_joint_state.poses: 03193 _v169 = val1.position 03194 _x = _v169 03195 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03196 _v170 = val1.orientation 03197 _x = _v170 03198 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 03199 length = len(self.planning_scene.fixed_frame_transforms) 03200 buff.write(_struct_I.pack(length)) 03201 for val1 in self.planning_scene.fixed_frame_transforms: 03202 _v171 = val1.header 03203 buff.write(_struct_I.pack(_v171.seq)) 03204 _v172 = _v171.stamp 03205 _x = _v172 03206 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 03207 _x = _v171.frame_id 03208 length = len(_x) 03209 buff.write(struct.pack('<I%ss'%length, length, _x)) 03210 _x = val1.child_frame_id 03211 length = len(_x) 03212 buff.write(struct.pack('<I%ss'%length, length, _x)) 03213 _v173 = val1.transform 03214 _v174 = _v173.translation 03215 _x = _v174 03216 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03217 _v175 = _v173.rotation 03218 _x = _v175 03219 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 03220 length = len(self.planning_scene.allowed_collision_matrix.link_names) 03221 buff.write(_struct_I.pack(length)) 03222 for val1 in self.planning_scene.allowed_collision_matrix.link_names: 03223 length = len(val1) 03224 buff.write(struct.pack('<I%ss'%length, length, val1)) 03225 length = len(self.planning_scene.allowed_collision_matrix.entries) 03226 buff.write(_struct_I.pack(length)) 03227 for val1 in self.planning_scene.allowed_collision_matrix.entries: 03228 length = len(val1.enabled) 03229 buff.write(_struct_I.pack(length)) 03230 pattern = '<%sB'%length 03231 buff.write(val1.enabled.tostring()) 03232 length = len(self.planning_scene.allowed_contacts) 03233 buff.write(_struct_I.pack(length)) 03234 for val1 in self.planning_scene.allowed_contacts: 03235 _x = val1.name 03236 length = len(_x) 03237 buff.write(struct.pack('<I%ss'%length, length, _x)) 03238 _v176 = val1.shape 03239 buff.write(_struct_b.pack(_v176.type)) 03240 length = len(_v176.dimensions) 03241 buff.write(_struct_I.pack(length)) 03242 pattern = '<%sd'%length 03243 buff.write(_v176.dimensions.tostring()) 03244 length = len(_v176.triangles) 03245 buff.write(_struct_I.pack(length)) 03246 pattern = '<%si'%length 03247 buff.write(_v176.triangles.tostring()) 03248 length = len(_v176.vertices) 03249 buff.write(_struct_I.pack(length)) 03250 for val3 in _v176.vertices: 03251 _x = val3 03252 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03253 _v177 = val1.pose_stamped 03254 _v178 = _v177.header 03255 buff.write(_struct_I.pack(_v178.seq)) 03256 _v179 = _v178.stamp 03257 _x = _v179 03258 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 03259 _x = _v178.frame_id 03260 length = len(_x) 03261 buff.write(struct.pack('<I%ss'%length, length, _x)) 03262 _v180 = _v177.pose 03263 _v181 = _v180.position 03264 _x = _v181 03265 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03266 _v182 = _v180.orientation 03267 _x = _v182 03268 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 03269 length = len(val1.link_names) 03270 buff.write(_struct_I.pack(length)) 03271 for val2 in val1.link_names: 03272 length = len(val2) 03273 buff.write(struct.pack('<I%ss'%length, length, val2)) 03274 buff.write(_struct_d.pack(val1.penetration_depth)) 03275 length = len(self.planning_scene.link_padding) 03276 buff.write(_struct_I.pack(length)) 03277 for val1 in self.planning_scene.link_padding: 03278 _x = val1.link_name 03279 length = len(_x) 03280 buff.write(struct.pack('<I%ss'%length, length, _x)) 03281 buff.write(_struct_d.pack(val1.padding)) 03282 length = len(self.planning_scene.collision_objects) 03283 buff.write(_struct_I.pack(length)) 03284 for val1 in self.planning_scene.collision_objects: 03285 _v183 = val1.header 03286 buff.write(_struct_I.pack(_v183.seq)) 03287 _v184 = _v183.stamp 03288 _x = _v184 03289 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 03290 _x = _v183.frame_id 03291 length = len(_x) 03292 buff.write(struct.pack('<I%ss'%length, length, _x)) 03293 _x = val1.id 03294 length = len(_x) 03295 buff.write(struct.pack('<I%ss'%length, length, _x)) 03296 buff.write(_struct_f.pack(val1.padding)) 03297 _v185 = val1.operation 03298 buff.write(_struct_b.pack(_v185.operation)) 03299 length = len(val1.shapes) 03300 buff.write(_struct_I.pack(length)) 03301 for val2 in val1.shapes: 03302 buff.write(_struct_b.pack(val2.type)) 03303 length = len(val2.dimensions) 03304 buff.write(_struct_I.pack(length)) 03305 pattern = '<%sd'%length 03306 buff.write(val2.dimensions.tostring()) 03307 length = len(val2.triangles) 03308 buff.write(_struct_I.pack(length)) 03309 pattern = '<%si'%length 03310 buff.write(val2.triangles.tostring()) 03311 length = len(val2.vertices) 03312 buff.write(_struct_I.pack(length)) 03313 for val3 in val2.vertices: 03314 _x = val3 03315 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03316 length = len(val1.poses) 03317 buff.write(_struct_I.pack(length)) 03318 for val2 in val1.poses: 03319 _v186 = val2.position 03320 _x = _v186 03321 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03322 _v187 = val2.orientation 03323 _x = _v187 03324 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 03325 length = len(self.planning_scene.attached_collision_objects) 03326 buff.write(_struct_I.pack(length)) 03327 for val1 in self.planning_scene.attached_collision_objects: 03328 _x = val1.link_name 03329 length = len(_x) 03330 buff.write(struct.pack('<I%ss'%length, length, _x)) 03331 _v188 = val1.object 03332 _v189 = _v188.header 03333 buff.write(_struct_I.pack(_v189.seq)) 03334 _v190 = _v189.stamp 03335 _x = _v190 03336 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 03337 _x = _v189.frame_id 03338 length = len(_x) 03339 buff.write(struct.pack('<I%ss'%length, length, _x)) 03340 _x = _v188.id 03341 length = len(_x) 03342 buff.write(struct.pack('<I%ss'%length, length, _x)) 03343 buff.write(_struct_f.pack(_v188.padding)) 03344 _v191 = _v188.operation 03345 buff.write(_struct_b.pack(_v191.operation)) 03346 length = len(_v188.shapes) 03347 buff.write(_struct_I.pack(length)) 03348 for val3 in _v188.shapes: 03349 buff.write(_struct_b.pack(val3.type)) 03350 length = len(val3.dimensions) 03351 buff.write(_struct_I.pack(length)) 03352 pattern = '<%sd'%length 03353 buff.write(val3.dimensions.tostring()) 03354 length = len(val3.triangles) 03355 buff.write(_struct_I.pack(length)) 03356 pattern = '<%si'%length 03357 buff.write(val3.triangles.tostring()) 03358 length = len(val3.vertices) 03359 buff.write(_struct_I.pack(length)) 03360 for val4 in val3.vertices: 03361 _x = val4 03362 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03363 length = len(_v188.poses) 03364 buff.write(_struct_I.pack(length)) 03365 for val3 in _v188.poses: 03366 _v192 = val3.position 03367 _x = _v192 03368 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 03369 _v193 = val3.orientation 03370 _x = _v193 03371 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 03372 length = len(val1.touch_links) 03373 buff.write(_struct_I.pack(length)) 03374 for val2 in val1.touch_links: 03375 length = len(val2) 03376 buff.write(struct.pack('<I%ss'%length, length, val2)) 03377 _x = self 03378 buff.write(_struct_3I.pack(_x.planning_scene.collision_map.header.seq, _x.planning_scene.collision_map.header.stamp.secs, _x.planning_scene.collision_map.header.stamp.nsecs)) 03379 _x = self.planning_scene.collision_map.header.frame_id 03380 length = len(_x) 03381 buff.write(struct.pack('<I%ss'%length, length, _x)) 03382 length = len(self.planning_scene.collision_map.boxes) 03383 buff.write(_struct_I.pack(length)) 03384 for val1 in self.planning_scene.collision_map.boxes: 03385 _v194 = val1.center 03386 _x = _v194 03387 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 03388 _v195 = val1.extents 03389 _x = _v195 03390 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 03391 _v196 = val1.axis 03392 _x = _v196 03393 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 03394 buff.write(_struct_f.pack(val1.angle)) 03395 except struct.error as se: self._check_types(se) 03396 except TypeError as te: self._check_types(te) 03397 03398 def deserialize_numpy(self, str, numpy): 03399 """ 03400 unpack serialized message in str into this message instance using numpy for array types 03401 @param str: byte array of serialized message 03402 @type str: str 03403 @param numpy: numpy python module 03404 @type numpy: module 03405 """ 03406 try: 03407 if self.planning_scene is None: 03408 self.planning_scene = arm_navigation_msgs.msg.PlanningScene() 03409 end = 0 03410 _x = self 03411 start = end 03412 end += 12 03413 (_x.planning_scene.robot_state.joint_state.header.seq, _x.planning_scene.robot_state.joint_state.header.stamp.secs, _x.planning_scene.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 03414 start = end 03415 end += 4 03416 (length,) = _struct_I.unpack(str[start:end]) 03417 start = end 03418 end += length 03419 self.planning_scene.robot_state.joint_state.header.frame_id = str[start:end] 03420 start = end 03421 end += 4 03422 (length,) = _struct_I.unpack(str[start:end]) 03423 self.planning_scene.robot_state.joint_state.name = [] 03424 for i in range(0, length): 03425 start = end 03426 end += 4 03427 (length,) = _struct_I.unpack(str[start:end]) 03428 start = end 03429 end += length 03430 val1 = str[start:end] 03431 self.planning_scene.robot_state.joint_state.name.append(val1) 03432 start = end 03433 end += 4 03434 (length,) = _struct_I.unpack(str[start:end]) 03435 pattern = '<%sd'%length 03436 start = end 03437 end += struct.calcsize(pattern) 03438 self.planning_scene.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03439 start = end 03440 end += 4 03441 (length,) = _struct_I.unpack(str[start:end]) 03442 pattern = '<%sd'%length 03443 start = end 03444 end += struct.calcsize(pattern) 03445 self.planning_scene.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03446 start = end 03447 end += 4 03448 (length,) = _struct_I.unpack(str[start:end]) 03449 pattern = '<%sd'%length 03450 start = end 03451 end += struct.calcsize(pattern) 03452 self.planning_scene.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03453 _x = self 03454 start = end 03455 end += 8 03456 (_x.planning_scene.robot_state.multi_dof_joint_state.stamp.secs, _x.planning_scene.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 03457 start = end 03458 end += 4 03459 (length,) = _struct_I.unpack(str[start:end]) 03460 self.planning_scene.robot_state.multi_dof_joint_state.joint_names = [] 03461 for i in range(0, length): 03462 start = end 03463 end += 4 03464 (length,) = _struct_I.unpack(str[start:end]) 03465 start = end 03466 end += length 03467 val1 = str[start:end] 03468 self.planning_scene.robot_state.multi_dof_joint_state.joint_names.append(val1) 03469 start = end 03470 end += 4 03471 (length,) = _struct_I.unpack(str[start:end]) 03472 self.planning_scene.robot_state.multi_dof_joint_state.frame_ids = [] 03473 for i in range(0, length): 03474 start = end 03475 end += 4 03476 (length,) = _struct_I.unpack(str[start:end]) 03477 start = end 03478 end += length 03479 val1 = str[start:end] 03480 self.planning_scene.robot_state.multi_dof_joint_state.frame_ids.append(val1) 03481 start = end 03482 end += 4 03483 (length,) = _struct_I.unpack(str[start:end]) 03484 self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids = [] 03485 for i in range(0, length): 03486 start = end 03487 end += 4 03488 (length,) = _struct_I.unpack(str[start:end]) 03489 start = end 03490 end += length 03491 val1 = str[start:end] 03492 self.planning_scene.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 03493 start = end 03494 end += 4 03495 (length,) = _struct_I.unpack(str[start:end]) 03496 self.planning_scene.robot_state.multi_dof_joint_state.poses = [] 03497 for i in range(0, length): 03498 val1 = geometry_msgs.msg.Pose() 03499 _v197 = val1.position 03500 _x = _v197 03501 start = end 03502 end += 24 03503 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03504 _v198 = val1.orientation 03505 _x = _v198 03506 start = end 03507 end += 32 03508 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03509 self.planning_scene.robot_state.multi_dof_joint_state.poses.append(val1) 03510 start = end 03511 end += 4 03512 (length,) = _struct_I.unpack(str[start:end]) 03513 self.planning_scene.fixed_frame_transforms = [] 03514 for i in range(0, length): 03515 val1 = geometry_msgs.msg.TransformStamped() 03516 _v199 = val1.header 03517 start = end 03518 end += 4 03519 (_v199.seq,) = _struct_I.unpack(str[start:end]) 03520 _v200 = _v199.stamp 03521 _x = _v200 03522 start = end 03523 end += 8 03524 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 03525 start = end 03526 end += 4 03527 (length,) = _struct_I.unpack(str[start:end]) 03528 start = end 03529 end += length 03530 _v199.frame_id = str[start:end] 03531 start = end 03532 end += 4 03533 (length,) = _struct_I.unpack(str[start:end]) 03534 start = end 03535 end += length 03536 val1.child_frame_id = str[start:end] 03537 _v201 = val1.transform 03538 _v202 = _v201.translation 03539 _x = _v202 03540 start = end 03541 end += 24 03542 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03543 _v203 = _v201.rotation 03544 _x = _v203 03545 start = end 03546 end += 32 03547 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03548 self.planning_scene.fixed_frame_transforms.append(val1) 03549 start = end 03550 end += 4 03551 (length,) = _struct_I.unpack(str[start:end]) 03552 self.planning_scene.allowed_collision_matrix.link_names = [] 03553 for i in range(0, length): 03554 start = end 03555 end += 4 03556 (length,) = _struct_I.unpack(str[start:end]) 03557 start = end 03558 end += length 03559 val1 = str[start:end] 03560 self.planning_scene.allowed_collision_matrix.link_names.append(val1) 03561 start = end 03562 end += 4 03563 (length,) = _struct_I.unpack(str[start:end]) 03564 self.planning_scene.allowed_collision_matrix.entries = [] 03565 for i in range(0, length): 03566 val1 = arm_navigation_msgs.msg.AllowedCollisionEntry() 03567 start = end 03568 end += 4 03569 (length,) = _struct_I.unpack(str[start:end]) 03570 pattern = '<%sB'%length 03571 start = end 03572 end += struct.calcsize(pattern) 03573 val1.enabled = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 03574 val1.enabled = map(bool, val1.enabled) 03575 self.planning_scene.allowed_collision_matrix.entries.append(val1) 03576 start = end 03577 end += 4 03578 (length,) = _struct_I.unpack(str[start:end]) 03579 self.planning_scene.allowed_contacts = [] 03580 for i in range(0, length): 03581 val1 = arm_navigation_msgs.msg.AllowedContactSpecification() 03582 start = end 03583 end += 4 03584 (length,) = _struct_I.unpack(str[start:end]) 03585 start = end 03586 end += length 03587 val1.name = str[start:end] 03588 _v204 = val1.shape 03589 start = end 03590 end += 1 03591 (_v204.type,) = _struct_b.unpack(str[start:end]) 03592 start = end 03593 end += 4 03594 (length,) = _struct_I.unpack(str[start:end]) 03595 pattern = '<%sd'%length 03596 start = end 03597 end += struct.calcsize(pattern) 03598 _v204.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03599 start = end 03600 end += 4 03601 (length,) = _struct_I.unpack(str[start:end]) 03602 pattern = '<%si'%length 03603 start = end 03604 end += struct.calcsize(pattern) 03605 _v204.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 03606 start = end 03607 end += 4 03608 (length,) = _struct_I.unpack(str[start:end]) 03609 _v204.vertices = [] 03610 for i in range(0, length): 03611 val3 = geometry_msgs.msg.Point() 03612 _x = val3 03613 start = end 03614 end += 24 03615 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03616 _v204.vertices.append(val3) 03617 _v205 = val1.pose_stamped 03618 _v206 = _v205.header 03619 start = end 03620 end += 4 03621 (_v206.seq,) = _struct_I.unpack(str[start:end]) 03622 _v207 = _v206.stamp 03623 _x = _v207 03624 start = end 03625 end += 8 03626 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 03627 start = end 03628 end += 4 03629 (length,) = _struct_I.unpack(str[start:end]) 03630 start = end 03631 end += length 03632 _v206.frame_id = str[start:end] 03633 _v208 = _v205.pose 03634 _v209 = _v208.position 03635 _x = _v209 03636 start = end 03637 end += 24 03638 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03639 _v210 = _v208.orientation 03640 _x = _v210 03641 start = end 03642 end += 32 03643 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03644 start = end 03645 end += 4 03646 (length,) = _struct_I.unpack(str[start:end]) 03647 val1.link_names = [] 03648 for i in range(0, length): 03649 start = end 03650 end += 4 03651 (length,) = _struct_I.unpack(str[start:end]) 03652 start = end 03653 end += length 03654 val2 = str[start:end] 03655 val1.link_names.append(val2) 03656 start = end 03657 end += 8 03658 (val1.penetration_depth,) = _struct_d.unpack(str[start:end]) 03659 self.planning_scene.allowed_contacts.append(val1) 03660 start = end 03661 end += 4 03662 (length,) = _struct_I.unpack(str[start:end]) 03663 self.planning_scene.link_padding = [] 03664 for i in range(0, length): 03665 val1 = arm_navigation_msgs.msg.LinkPadding() 03666 start = end 03667 end += 4 03668 (length,) = _struct_I.unpack(str[start:end]) 03669 start = end 03670 end += length 03671 val1.link_name = str[start:end] 03672 start = end 03673 end += 8 03674 (val1.padding,) = _struct_d.unpack(str[start:end]) 03675 self.planning_scene.link_padding.append(val1) 03676 start = end 03677 end += 4 03678 (length,) = _struct_I.unpack(str[start:end]) 03679 self.planning_scene.collision_objects = [] 03680 for i in range(0, length): 03681 val1 = arm_navigation_msgs.msg.CollisionObject() 03682 _v211 = val1.header 03683 start = end 03684 end += 4 03685 (_v211.seq,) = _struct_I.unpack(str[start:end]) 03686 _v212 = _v211.stamp 03687 _x = _v212 03688 start = end 03689 end += 8 03690 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 03691 start = end 03692 end += 4 03693 (length,) = _struct_I.unpack(str[start:end]) 03694 start = end 03695 end += length 03696 _v211.frame_id = str[start:end] 03697 start = end 03698 end += 4 03699 (length,) = _struct_I.unpack(str[start:end]) 03700 start = end 03701 end += length 03702 val1.id = str[start:end] 03703 start = end 03704 end += 4 03705 (val1.padding,) = _struct_f.unpack(str[start:end]) 03706 _v213 = val1.operation 03707 start = end 03708 end += 1 03709 (_v213.operation,) = _struct_b.unpack(str[start:end]) 03710 start = end 03711 end += 4 03712 (length,) = _struct_I.unpack(str[start:end]) 03713 val1.shapes = [] 03714 for i in range(0, length): 03715 val2 = arm_navigation_msgs.msg.Shape() 03716 start = end 03717 end += 1 03718 (val2.type,) = _struct_b.unpack(str[start:end]) 03719 start = end 03720 end += 4 03721 (length,) = _struct_I.unpack(str[start:end]) 03722 pattern = '<%sd'%length 03723 start = end 03724 end += struct.calcsize(pattern) 03725 val2.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03726 start = end 03727 end += 4 03728 (length,) = _struct_I.unpack(str[start:end]) 03729 pattern = '<%si'%length 03730 start = end 03731 end += struct.calcsize(pattern) 03732 val2.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 03733 start = end 03734 end += 4 03735 (length,) = _struct_I.unpack(str[start:end]) 03736 val2.vertices = [] 03737 for i in range(0, length): 03738 val3 = geometry_msgs.msg.Point() 03739 _x = val3 03740 start = end 03741 end += 24 03742 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03743 val2.vertices.append(val3) 03744 val1.shapes.append(val2) 03745 start = end 03746 end += 4 03747 (length,) = _struct_I.unpack(str[start:end]) 03748 val1.poses = [] 03749 for i in range(0, length): 03750 val2 = geometry_msgs.msg.Pose() 03751 _v214 = val2.position 03752 _x = _v214 03753 start = end 03754 end += 24 03755 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03756 _v215 = val2.orientation 03757 _x = _v215 03758 start = end 03759 end += 32 03760 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03761 val1.poses.append(val2) 03762 self.planning_scene.collision_objects.append(val1) 03763 start = end 03764 end += 4 03765 (length,) = _struct_I.unpack(str[start:end]) 03766 self.planning_scene.attached_collision_objects = [] 03767 for i in range(0, length): 03768 val1 = arm_navigation_msgs.msg.AttachedCollisionObject() 03769 start = end 03770 end += 4 03771 (length,) = _struct_I.unpack(str[start:end]) 03772 start = end 03773 end += length 03774 val1.link_name = str[start:end] 03775 _v216 = val1.object 03776 _v217 = _v216.header 03777 start = end 03778 end += 4 03779 (_v217.seq,) = _struct_I.unpack(str[start:end]) 03780 _v218 = _v217.stamp 03781 _x = _v218 03782 start = end 03783 end += 8 03784 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 03785 start = end 03786 end += 4 03787 (length,) = _struct_I.unpack(str[start:end]) 03788 start = end 03789 end += length 03790 _v217.frame_id = str[start:end] 03791 start = end 03792 end += 4 03793 (length,) = _struct_I.unpack(str[start:end]) 03794 start = end 03795 end += length 03796 _v216.id = str[start:end] 03797 start = end 03798 end += 4 03799 (_v216.padding,) = _struct_f.unpack(str[start:end]) 03800 _v219 = _v216.operation 03801 start = end 03802 end += 1 03803 (_v219.operation,) = _struct_b.unpack(str[start:end]) 03804 start = end 03805 end += 4 03806 (length,) = _struct_I.unpack(str[start:end]) 03807 _v216.shapes = [] 03808 for i in range(0, length): 03809 val3 = arm_navigation_msgs.msg.Shape() 03810 start = end 03811 end += 1 03812 (val3.type,) = _struct_b.unpack(str[start:end]) 03813 start = end 03814 end += 4 03815 (length,) = _struct_I.unpack(str[start:end]) 03816 pattern = '<%sd'%length 03817 start = end 03818 end += struct.calcsize(pattern) 03819 val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 03820 start = end 03821 end += 4 03822 (length,) = _struct_I.unpack(str[start:end]) 03823 pattern = '<%si'%length 03824 start = end 03825 end += struct.calcsize(pattern) 03826 val3.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 03827 start = end 03828 end += 4 03829 (length,) = _struct_I.unpack(str[start:end]) 03830 val3.vertices = [] 03831 for i in range(0, length): 03832 val4 = geometry_msgs.msg.Point() 03833 _x = val4 03834 start = end 03835 end += 24 03836 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03837 val3.vertices.append(val4) 03838 _v216.shapes.append(val3) 03839 start = end 03840 end += 4 03841 (length,) = _struct_I.unpack(str[start:end]) 03842 _v216.poses = [] 03843 for i in range(0, length): 03844 val3 = geometry_msgs.msg.Pose() 03845 _v220 = val3.position 03846 _x = _v220 03847 start = end 03848 end += 24 03849 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 03850 _v221 = val3.orientation 03851 _x = _v221 03852 start = end 03853 end += 32 03854 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 03855 _v216.poses.append(val3) 03856 start = end 03857 end += 4 03858 (length,) = _struct_I.unpack(str[start:end]) 03859 val1.touch_links = [] 03860 for i in range(0, length): 03861 start = end 03862 end += 4 03863 (length,) = _struct_I.unpack(str[start:end]) 03864 start = end 03865 end += length 03866 val2 = str[start:end] 03867 val1.touch_links.append(val2) 03868 self.planning_scene.attached_collision_objects.append(val1) 03869 _x = self 03870 start = end 03871 end += 12 03872 (_x.planning_scene.collision_map.header.seq, _x.planning_scene.collision_map.header.stamp.secs, _x.planning_scene.collision_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 03873 start = end 03874 end += 4 03875 (length,) = _struct_I.unpack(str[start:end]) 03876 start = end 03877 end += length 03878 self.planning_scene.collision_map.header.frame_id = str[start:end] 03879 start = end 03880 end += 4 03881 (length,) = _struct_I.unpack(str[start:end]) 03882 self.planning_scene.collision_map.boxes = [] 03883 for i in range(0, length): 03884 val1 = arm_navigation_msgs.msg.OrientedBoundingBox() 03885 _v222 = val1.center 03886 _x = _v222 03887 start = end 03888 end += 12 03889 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03890 _v223 = val1.extents 03891 _x = _v223 03892 start = end 03893 end += 12 03894 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03895 _v224 = val1.axis 03896 _x = _v224 03897 start = end 03898 end += 12 03899 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 03900 start = end 03901 end += 4 03902 (val1.angle,) = _struct_f.unpack(str[start:end]) 03903 self.planning_scene.collision_map.boxes.append(val1) 03904 return self 03905 except struct.error as e: 03906 raise roslib.message.DeserializationError(e) #most likely buffer underfill 03907 03908 _struct_I = roslib.message.struct_I 03909 _struct_b = struct.Struct("<b") 03910 _struct_d = struct.Struct("<d") 03911 _struct_f = struct.Struct("<f") 03912 _struct_3f = struct.Struct("<3f") 03913 _struct_3I = struct.Struct("<3I") 03914 _struct_4d = struct.Struct("<4d") 03915 _struct_2I = struct.Struct("<2I") 03916 _struct_3d = struct.Struct("<3d") 03917 class GetPlanningScene(roslib.message.ServiceDefinition): 03918 _type = 'arm_navigation_msgs/GetPlanningScene' 03919 _md5sum = '0a7b07718e4e5c5d35740c730509a151' 03920 _request_class = GetPlanningSceneRequest 03921 _response_class = GetPlanningSceneResponse