$search
00001 """autogenerated by genmsg_py from GetJointTrajectoryValidityRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import trajectory_msgs.msg 00006 import arm_navigation_msgs.msg 00007 import roslib.rostime 00008 import geometry_msgs.msg 00009 import sensor_msgs.msg 00010 import std_msgs.msg 00011 00012 class GetJointTrajectoryValidityRequest(roslib.message.Message): 00013 _md5sum = "084166b764e3c85269ae9d5ee08f7654" 00014 _type = "arm_navigation_msgs/GetJointTrajectoryValidityRequest" 00015 _has_header = False #flag to mark the presence of a Header object 00016 _full_text = """ 00017 trajectory_msgs/JointTrajectory trajectory 00018 00019 00020 00021 00022 00023 00024 00025 arm_navigation_msgs/RobotState robot_state 00026 00027 00028 bool check_collisions 00029 00030 00031 bool check_path_constraints 00032 00033 00034 bool check_goal_constraints 00035 00036 00037 bool check_joint_limits 00038 00039 00040 00041 00042 bool check_full_trajectory 00043 00044 00045 00046 00047 arm_navigation_msgs/Constraints path_constraints 00048 00049 00050 00051 00052 arm_navigation_msgs/Constraints goal_constraints 00053 00054 00055 ================================================================================ 00056 MSG: trajectory_msgs/JointTrajectory 00057 Header header 00058 string[] joint_names 00059 JointTrajectoryPoint[] points 00060 ================================================================================ 00061 MSG: std_msgs/Header 00062 # Standard metadata for higher-level stamped data types. 00063 # This is generally used to communicate timestamped data 00064 # in a particular coordinate frame. 00065 # 00066 # sequence ID: consecutively increasing ID 00067 uint32 seq 00068 #Two-integer timestamp that is expressed as: 00069 # * stamp.secs: seconds (stamp_secs) since epoch 00070 # * stamp.nsecs: nanoseconds since stamp_secs 00071 # time-handling sugar is provided by the client library 00072 time stamp 00073 #Frame this data is associated with 00074 # 0: no frame 00075 # 1: global frame 00076 string frame_id 00077 00078 ================================================================================ 00079 MSG: trajectory_msgs/JointTrajectoryPoint 00080 float64[] positions 00081 float64[] velocities 00082 float64[] accelerations 00083 duration time_from_start 00084 ================================================================================ 00085 MSG: arm_navigation_msgs/RobotState 00086 # This message contains information about the robot state, i.e. the positions of its joints and links 00087 sensor_msgs/JointState joint_state 00088 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state 00089 00090 ================================================================================ 00091 MSG: sensor_msgs/JointState 00092 # This is a message that holds data to describe the state of a set of torque controlled joints. 00093 # 00094 # The state of each joint (revolute or prismatic) is defined by: 00095 # * the position of the joint (rad or m), 00096 # * the velocity of the joint (rad/s or m/s) and 00097 # * the effort that is applied in the joint (Nm or N). 00098 # 00099 # Each joint is uniquely identified by its name 00100 # The header specifies the time at which the joint states were recorded. All the joint states 00101 # in one message have to be recorded at the same time. 00102 # 00103 # This message consists of a multiple arrays, one for each part of the joint state. 00104 # The goal is to make each of the fields optional. When e.g. your joints have no 00105 # effort associated with them, you can leave the effort array empty. 00106 # 00107 # All arrays in this message should have the same size, or be empty. 00108 # This is the only way to uniquely associate the joint name with the correct 00109 # states. 00110 00111 00112 Header header 00113 00114 string[] name 00115 float64[] position 00116 float64[] velocity 00117 float64[] effort 00118 00119 ================================================================================ 00120 MSG: arm_navigation_msgs/MultiDOFJointState 00121 #A representation of a multi-dof joint state 00122 time stamp 00123 string[] joint_names 00124 string[] frame_ids 00125 string[] child_frame_ids 00126 geometry_msgs/Pose[] poses 00127 00128 ================================================================================ 00129 MSG: geometry_msgs/Pose 00130 # A representation of pose in free space, composed of postion and orientation. 00131 Point position 00132 Quaternion orientation 00133 00134 ================================================================================ 00135 MSG: geometry_msgs/Point 00136 # This contains the position of a point in free space 00137 float64 x 00138 float64 y 00139 float64 z 00140 00141 ================================================================================ 00142 MSG: geometry_msgs/Quaternion 00143 # This represents an orientation in free space in quaternion form. 00144 00145 float64 x 00146 float64 y 00147 float64 z 00148 float64 w 00149 00150 ================================================================================ 00151 MSG: arm_navigation_msgs/Constraints 00152 # This message contains a list of motion planning constraints. 00153 00154 arm_navigation_msgs/JointConstraint[] joint_constraints 00155 arm_navigation_msgs/PositionConstraint[] position_constraints 00156 arm_navigation_msgs/OrientationConstraint[] orientation_constraints 00157 arm_navigation_msgs/VisibilityConstraint[] visibility_constraints 00158 00159 ================================================================================ 00160 MSG: arm_navigation_msgs/JointConstraint 00161 # Constrain the position of a joint to be within a certain bound 00162 string joint_name 00163 00164 # the bound to be achieved is [position - tolerance_below, position + tolerance_above] 00165 float64 position 00166 float64 tolerance_above 00167 float64 tolerance_below 00168 00169 # A weighting factor for this constraint 00170 float64 weight 00171 ================================================================================ 00172 MSG: arm_navigation_msgs/PositionConstraint 00173 # This message contains the definition of a position constraint. 00174 Header header 00175 00176 # The robot link this constraint refers to 00177 string link_name 00178 00179 # The offset (in the link frame) for the target point on the link we are planning for 00180 geometry_msgs/Point target_point_offset 00181 00182 # The nominal/target position for the point we are planning for 00183 geometry_msgs/Point position 00184 00185 # The shape of the bounded region that constrains the position of the end-effector 00186 # This region is always centered at the position defined above 00187 arm_navigation_msgs/Shape constraint_region_shape 00188 00189 # The orientation of the bounded region that constrains the position of the end-effector. 00190 # This allows the specification of non-axis aligned constraints 00191 geometry_msgs/Quaternion constraint_region_orientation 00192 00193 # Constraint weighting factor - a weight for this constraint 00194 float64 weight 00195 00196 ================================================================================ 00197 MSG: arm_navigation_msgs/Shape 00198 byte SPHERE=0 00199 byte BOX=1 00200 byte CYLINDER=2 00201 byte MESH=3 00202 00203 byte type 00204 00205 00206 #### define sphere, box, cylinder #### 00207 # the origin of each shape is considered at the shape's center 00208 00209 # for sphere 00210 # radius := dimensions[0] 00211 00212 # for cylinder 00213 # radius := dimensions[0] 00214 # length := dimensions[1] 00215 # the length is along the Z axis 00216 00217 # for box 00218 # size_x := dimensions[0] 00219 # size_y := dimensions[1] 00220 # size_z := dimensions[2] 00221 float64[] dimensions 00222 00223 00224 #### define mesh #### 00225 00226 # list of triangles; triangle k is defined by tre vertices located 00227 # at indices triangles[3k], triangles[3k+1], triangles[3k+2] 00228 int32[] triangles 00229 geometry_msgs/Point[] vertices 00230 00231 ================================================================================ 00232 MSG: arm_navigation_msgs/OrientationConstraint 00233 # This message contains the definition of an orientation constraint. 00234 Header header 00235 00236 # The robot link this constraint refers to 00237 string link_name 00238 00239 # The type of the constraint 00240 int32 type 00241 int32 LINK_FRAME=0 00242 int32 HEADER_FRAME=1 00243 00244 # The desired orientation of the robot link specified as a quaternion 00245 geometry_msgs/Quaternion orientation 00246 00247 # optional RPY error tolerances specified if 00248 float64 absolute_roll_tolerance 00249 float64 absolute_pitch_tolerance 00250 float64 absolute_yaw_tolerance 00251 00252 # Constraint weighting factor - a weight for this constraint 00253 float64 weight 00254 00255 ================================================================================ 00256 MSG: arm_navigation_msgs/VisibilityConstraint 00257 # This message contains the definition of a visibility constraint. 00258 Header header 00259 00260 # The point stamped target that needs to be kept within view of the sensor 00261 geometry_msgs/PointStamped target 00262 00263 # The local pose of the frame in which visibility is to be maintained 00264 # The frame id should represent the robot link to which the sensor is attached 00265 # The visual axis of the sensor is assumed to be along the X axis of this frame 00266 geometry_msgs/PoseStamped sensor_pose 00267 00268 # The deviation (in radians) that will be tolerated 00269 # Constraint error will be measured as the solid angle between the 00270 # X axis of the frame defined above and the vector between the origin 00271 # of the frame defined above and the target location 00272 float64 absolute_tolerance 00273 00274 00275 ================================================================================ 00276 MSG: geometry_msgs/PointStamped 00277 # This represents a Point with reference coordinate frame and timestamp 00278 Header header 00279 Point point 00280 00281 ================================================================================ 00282 MSG: geometry_msgs/PoseStamped 00283 # A Pose with reference coordinate frame and timestamp 00284 Header header 00285 Pose pose 00286 00287 """ 00288 __slots__ = ['trajectory','robot_state','check_collisions','check_path_constraints','check_goal_constraints','check_joint_limits','check_full_trajectory','path_constraints','goal_constraints'] 00289 _slot_types = ['trajectory_msgs/JointTrajectory','arm_navigation_msgs/RobotState','bool','bool','bool','bool','bool','arm_navigation_msgs/Constraints','arm_navigation_msgs/Constraints'] 00290 00291 def __init__(self, *args, **kwds): 00292 """ 00293 Constructor. Any message fields that are implicitly/explicitly 00294 set to None will be assigned a default value. The recommend 00295 use is keyword arguments as this is more robust to future message 00296 changes. You cannot mix in-order arguments and keyword arguments. 00297 00298 The available fields are: 00299 trajectory,robot_state,check_collisions,check_path_constraints,check_goal_constraints,check_joint_limits,check_full_trajectory,path_constraints,goal_constraints 00300 00301 @param args: complete set of field values, in .msg order 00302 @param kwds: use keyword arguments corresponding to message field names 00303 to set specific fields. 00304 """ 00305 if args or kwds: 00306 super(GetJointTrajectoryValidityRequest, self).__init__(*args, **kwds) 00307 #message fields cannot be None, assign default values for those that are 00308 if self.trajectory is None: 00309 self.trajectory = trajectory_msgs.msg.JointTrajectory() 00310 if self.robot_state is None: 00311 self.robot_state = arm_navigation_msgs.msg.RobotState() 00312 if self.check_collisions is None: 00313 self.check_collisions = False 00314 if self.check_path_constraints is None: 00315 self.check_path_constraints = False 00316 if self.check_goal_constraints is None: 00317 self.check_goal_constraints = False 00318 if self.check_joint_limits is None: 00319 self.check_joint_limits = False 00320 if self.check_full_trajectory is None: 00321 self.check_full_trajectory = False 00322 if self.path_constraints is None: 00323 self.path_constraints = arm_navigation_msgs.msg.Constraints() 00324 if self.goal_constraints is None: 00325 self.goal_constraints = arm_navigation_msgs.msg.Constraints() 00326 else: 00327 self.trajectory = trajectory_msgs.msg.JointTrajectory() 00328 self.robot_state = arm_navigation_msgs.msg.RobotState() 00329 self.check_collisions = False 00330 self.check_path_constraints = False 00331 self.check_goal_constraints = False 00332 self.check_joint_limits = False 00333 self.check_full_trajectory = False 00334 self.path_constraints = arm_navigation_msgs.msg.Constraints() 00335 self.goal_constraints = arm_navigation_msgs.msg.Constraints() 00336 00337 def _get_types(self): 00338 """ 00339 internal API method 00340 """ 00341 return self._slot_types 00342 00343 def serialize(self, buff): 00344 """ 00345 serialize message into buffer 00346 @param buff: buffer 00347 @type buff: StringIO 00348 """ 00349 try: 00350 _x = self 00351 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs)) 00352 _x = self.trajectory.header.frame_id 00353 length = len(_x) 00354 buff.write(struct.pack('<I%ss'%length, length, _x)) 00355 length = len(self.trajectory.joint_names) 00356 buff.write(_struct_I.pack(length)) 00357 for val1 in self.trajectory.joint_names: 00358 length = len(val1) 00359 buff.write(struct.pack('<I%ss'%length, length, val1)) 00360 length = len(self.trajectory.points) 00361 buff.write(_struct_I.pack(length)) 00362 for val1 in self.trajectory.points: 00363 length = len(val1.positions) 00364 buff.write(_struct_I.pack(length)) 00365 pattern = '<%sd'%length 00366 buff.write(struct.pack(pattern, *val1.positions)) 00367 length = len(val1.velocities) 00368 buff.write(_struct_I.pack(length)) 00369 pattern = '<%sd'%length 00370 buff.write(struct.pack(pattern, *val1.velocities)) 00371 length = len(val1.accelerations) 00372 buff.write(_struct_I.pack(length)) 00373 pattern = '<%sd'%length 00374 buff.write(struct.pack(pattern, *val1.accelerations)) 00375 _v1 = val1.time_from_start 00376 _x = _v1 00377 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00378 _x = self 00379 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs)) 00380 _x = self.robot_state.joint_state.header.frame_id 00381 length = len(_x) 00382 buff.write(struct.pack('<I%ss'%length, length, _x)) 00383 length = len(self.robot_state.joint_state.name) 00384 buff.write(_struct_I.pack(length)) 00385 for val1 in self.robot_state.joint_state.name: 00386 length = len(val1) 00387 buff.write(struct.pack('<I%ss'%length, length, val1)) 00388 length = len(self.robot_state.joint_state.position) 00389 buff.write(_struct_I.pack(length)) 00390 pattern = '<%sd'%length 00391 buff.write(struct.pack(pattern, *self.robot_state.joint_state.position)) 00392 length = len(self.robot_state.joint_state.velocity) 00393 buff.write(_struct_I.pack(length)) 00394 pattern = '<%sd'%length 00395 buff.write(struct.pack(pattern, *self.robot_state.joint_state.velocity)) 00396 length = len(self.robot_state.joint_state.effort) 00397 buff.write(_struct_I.pack(length)) 00398 pattern = '<%sd'%length 00399 buff.write(struct.pack(pattern, *self.robot_state.joint_state.effort)) 00400 _x = self 00401 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs)) 00402 length = len(self.robot_state.multi_dof_joint_state.joint_names) 00403 buff.write(_struct_I.pack(length)) 00404 for val1 in self.robot_state.multi_dof_joint_state.joint_names: 00405 length = len(val1) 00406 buff.write(struct.pack('<I%ss'%length, length, val1)) 00407 length = len(self.robot_state.multi_dof_joint_state.frame_ids) 00408 buff.write(_struct_I.pack(length)) 00409 for val1 in self.robot_state.multi_dof_joint_state.frame_ids: 00410 length = len(val1) 00411 buff.write(struct.pack('<I%ss'%length, length, val1)) 00412 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids) 00413 buff.write(_struct_I.pack(length)) 00414 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids: 00415 length = len(val1) 00416 buff.write(struct.pack('<I%ss'%length, length, val1)) 00417 length = len(self.robot_state.multi_dof_joint_state.poses) 00418 buff.write(_struct_I.pack(length)) 00419 for val1 in self.robot_state.multi_dof_joint_state.poses: 00420 _v2 = val1.position 00421 _x = _v2 00422 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00423 _v3 = val1.orientation 00424 _x = _v3 00425 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00426 _x = self 00427 buff.write(_struct_5B.pack(_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory)) 00428 length = len(self.path_constraints.joint_constraints) 00429 buff.write(_struct_I.pack(length)) 00430 for val1 in self.path_constraints.joint_constraints: 00431 _x = val1.joint_name 00432 length = len(_x) 00433 buff.write(struct.pack('<I%ss'%length, length, _x)) 00434 _x = val1 00435 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) 00436 length = len(self.path_constraints.position_constraints) 00437 buff.write(_struct_I.pack(length)) 00438 for val1 in self.path_constraints.position_constraints: 00439 _v4 = val1.header 00440 buff.write(_struct_I.pack(_v4.seq)) 00441 _v5 = _v4.stamp 00442 _x = _v5 00443 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00444 _x = _v4.frame_id 00445 length = len(_x) 00446 buff.write(struct.pack('<I%ss'%length, length, _x)) 00447 _x = val1.link_name 00448 length = len(_x) 00449 buff.write(struct.pack('<I%ss'%length, length, _x)) 00450 _v6 = val1.target_point_offset 00451 _x = _v6 00452 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00453 _v7 = val1.position 00454 _x = _v7 00455 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00456 _v8 = val1.constraint_region_shape 00457 buff.write(_struct_b.pack(_v8.type)) 00458 length = len(_v8.dimensions) 00459 buff.write(_struct_I.pack(length)) 00460 pattern = '<%sd'%length 00461 buff.write(struct.pack(pattern, *_v8.dimensions)) 00462 length = len(_v8.triangles) 00463 buff.write(_struct_I.pack(length)) 00464 pattern = '<%si'%length 00465 buff.write(struct.pack(pattern, *_v8.triangles)) 00466 length = len(_v8.vertices) 00467 buff.write(_struct_I.pack(length)) 00468 for val3 in _v8.vertices: 00469 _x = val3 00470 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00471 _v9 = val1.constraint_region_orientation 00472 _x = _v9 00473 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00474 buff.write(_struct_d.pack(val1.weight)) 00475 length = len(self.path_constraints.orientation_constraints) 00476 buff.write(_struct_I.pack(length)) 00477 for val1 in self.path_constraints.orientation_constraints: 00478 _v10 = val1.header 00479 buff.write(_struct_I.pack(_v10.seq)) 00480 _v11 = _v10.stamp 00481 _x = _v11 00482 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00483 _x = _v10.frame_id 00484 length = len(_x) 00485 buff.write(struct.pack('<I%ss'%length, length, _x)) 00486 _x = val1.link_name 00487 length = len(_x) 00488 buff.write(struct.pack('<I%ss'%length, length, _x)) 00489 buff.write(_struct_i.pack(val1.type)) 00490 _v12 = val1.orientation 00491 _x = _v12 00492 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00493 _x = val1 00494 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight)) 00495 length = len(self.path_constraints.visibility_constraints) 00496 buff.write(_struct_I.pack(length)) 00497 for val1 in self.path_constraints.visibility_constraints: 00498 _v13 = val1.header 00499 buff.write(_struct_I.pack(_v13.seq)) 00500 _v14 = _v13.stamp 00501 _x = _v14 00502 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00503 _x = _v13.frame_id 00504 length = len(_x) 00505 buff.write(struct.pack('<I%ss'%length, length, _x)) 00506 _v15 = val1.target 00507 _v16 = _v15.header 00508 buff.write(_struct_I.pack(_v16.seq)) 00509 _v17 = _v16.stamp 00510 _x = _v17 00511 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00512 _x = _v16.frame_id 00513 length = len(_x) 00514 buff.write(struct.pack('<I%ss'%length, length, _x)) 00515 _v18 = _v15.point 00516 _x = _v18 00517 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00518 _v19 = val1.sensor_pose 00519 _v20 = _v19.header 00520 buff.write(_struct_I.pack(_v20.seq)) 00521 _v21 = _v20.stamp 00522 _x = _v21 00523 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00524 _x = _v20.frame_id 00525 length = len(_x) 00526 buff.write(struct.pack('<I%ss'%length, length, _x)) 00527 _v22 = _v19.pose 00528 _v23 = _v22.position 00529 _x = _v23 00530 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00531 _v24 = _v22.orientation 00532 _x = _v24 00533 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00534 buff.write(_struct_d.pack(val1.absolute_tolerance)) 00535 length = len(self.goal_constraints.joint_constraints) 00536 buff.write(_struct_I.pack(length)) 00537 for val1 in self.goal_constraints.joint_constraints: 00538 _x = val1.joint_name 00539 length = len(_x) 00540 buff.write(struct.pack('<I%ss'%length, length, _x)) 00541 _x = val1 00542 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) 00543 length = len(self.goal_constraints.position_constraints) 00544 buff.write(_struct_I.pack(length)) 00545 for val1 in self.goal_constraints.position_constraints: 00546 _v25 = val1.header 00547 buff.write(_struct_I.pack(_v25.seq)) 00548 _v26 = _v25.stamp 00549 _x = _v26 00550 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00551 _x = _v25.frame_id 00552 length = len(_x) 00553 buff.write(struct.pack('<I%ss'%length, length, _x)) 00554 _x = val1.link_name 00555 length = len(_x) 00556 buff.write(struct.pack('<I%ss'%length, length, _x)) 00557 _v27 = val1.target_point_offset 00558 _x = _v27 00559 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00560 _v28 = val1.position 00561 _x = _v28 00562 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00563 _v29 = val1.constraint_region_shape 00564 buff.write(_struct_b.pack(_v29.type)) 00565 length = len(_v29.dimensions) 00566 buff.write(_struct_I.pack(length)) 00567 pattern = '<%sd'%length 00568 buff.write(struct.pack(pattern, *_v29.dimensions)) 00569 length = len(_v29.triangles) 00570 buff.write(_struct_I.pack(length)) 00571 pattern = '<%si'%length 00572 buff.write(struct.pack(pattern, *_v29.triangles)) 00573 length = len(_v29.vertices) 00574 buff.write(_struct_I.pack(length)) 00575 for val3 in _v29.vertices: 00576 _x = val3 00577 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00578 _v30 = val1.constraint_region_orientation 00579 _x = _v30 00580 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00581 buff.write(_struct_d.pack(val1.weight)) 00582 length = len(self.goal_constraints.orientation_constraints) 00583 buff.write(_struct_I.pack(length)) 00584 for val1 in self.goal_constraints.orientation_constraints: 00585 _v31 = val1.header 00586 buff.write(_struct_I.pack(_v31.seq)) 00587 _v32 = _v31.stamp 00588 _x = _v32 00589 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00590 _x = _v31.frame_id 00591 length = len(_x) 00592 buff.write(struct.pack('<I%ss'%length, length, _x)) 00593 _x = val1.link_name 00594 length = len(_x) 00595 buff.write(struct.pack('<I%ss'%length, length, _x)) 00596 buff.write(_struct_i.pack(val1.type)) 00597 _v33 = val1.orientation 00598 _x = _v33 00599 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00600 _x = val1 00601 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight)) 00602 length = len(self.goal_constraints.visibility_constraints) 00603 buff.write(_struct_I.pack(length)) 00604 for val1 in self.goal_constraints.visibility_constraints: 00605 _v34 = val1.header 00606 buff.write(_struct_I.pack(_v34.seq)) 00607 _v35 = _v34.stamp 00608 _x = _v35 00609 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00610 _x = _v34.frame_id 00611 length = len(_x) 00612 buff.write(struct.pack('<I%ss'%length, length, _x)) 00613 _v36 = val1.target 00614 _v37 = _v36.header 00615 buff.write(_struct_I.pack(_v37.seq)) 00616 _v38 = _v37.stamp 00617 _x = _v38 00618 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00619 _x = _v37.frame_id 00620 length = len(_x) 00621 buff.write(struct.pack('<I%ss'%length, length, _x)) 00622 _v39 = _v36.point 00623 _x = _v39 00624 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00625 _v40 = val1.sensor_pose 00626 _v41 = _v40.header 00627 buff.write(_struct_I.pack(_v41.seq)) 00628 _v42 = _v41.stamp 00629 _x = _v42 00630 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00631 _x = _v41.frame_id 00632 length = len(_x) 00633 buff.write(struct.pack('<I%ss'%length, length, _x)) 00634 _v43 = _v40.pose 00635 _v44 = _v43.position 00636 _x = _v44 00637 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00638 _v45 = _v43.orientation 00639 _x = _v45 00640 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00641 buff.write(_struct_d.pack(val1.absolute_tolerance)) 00642 except struct.error as se: self._check_types(se) 00643 except TypeError as te: self._check_types(te) 00644 00645 def deserialize(self, str): 00646 """ 00647 unpack serialized message in str into this message instance 00648 @param str: byte array of serialized message 00649 @type str: str 00650 """ 00651 try: 00652 if self.trajectory is None: 00653 self.trajectory = trajectory_msgs.msg.JointTrajectory() 00654 if self.robot_state is None: 00655 self.robot_state = arm_navigation_msgs.msg.RobotState() 00656 if self.path_constraints is None: 00657 self.path_constraints = arm_navigation_msgs.msg.Constraints() 00658 if self.goal_constraints is None: 00659 self.goal_constraints = arm_navigation_msgs.msg.Constraints() 00660 end = 0 00661 _x = self 00662 start = end 00663 end += 12 00664 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00665 start = end 00666 end += 4 00667 (length,) = _struct_I.unpack(str[start:end]) 00668 start = end 00669 end += length 00670 self.trajectory.header.frame_id = str[start:end] 00671 start = end 00672 end += 4 00673 (length,) = _struct_I.unpack(str[start:end]) 00674 self.trajectory.joint_names = [] 00675 for i in range(0, length): 00676 start = end 00677 end += 4 00678 (length,) = _struct_I.unpack(str[start:end]) 00679 start = end 00680 end += length 00681 val1 = str[start:end] 00682 self.trajectory.joint_names.append(val1) 00683 start = end 00684 end += 4 00685 (length,) = _struct_I.unpack(str[start:end]) 00686 self.trajectory.points = [] 00687 for i in range(0, length): 00688 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 00689 start = end 00690 end += 4 00691 (length,) = _struct_I.unpack(str[start:end]) 00692 pattern = '<%sd'%length 00693 start = end 00694 end += struct.calcsize(pattern) 00695 val1.positions = struct.unpack(pattern, str[start:end]) 00696 start = end 00697 end += 4 00698 (length,) = _struct_I.unpack(str[start:end]) 00699 pattern = '<%sd'%length 00700 start = end 00701 end += struct.calcsize(pattern) 00702 val1.velocities = struct.unpack(pattern, str[start:end]) 00703 start = end 00704 end += 4 00705 (length,) = _struct_I.unpack(str[start:end]) 00706 pattern = '<%sd'%length 00707 start = end 00708 end += struct.calcsize(pattern) 00709 val1.accelerations = struct.unpack(pattern, str[start:end]) 00710 _v46 = val1.time_from_start 00711 _x = _v46 00712 start = end 00713 end += 8 00714 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00715 self.trajectory.points.append(val1) 00716 _x = self 00717 start = end 00718 end += 12 00719 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00720 start = end 00721 end += 4 00722 (length,) = _struct_I.unpack(str[start:end]) 00723 start = end 00724 end += length 00725 self.robot_state.joint_state.header.frame_id = str[start:end] 00726 start = end 00727 end += 4 00728 (length,) = _struct_I.unpack(str[start:end]) 00729 self.robot_state.joint_state.name = [] 00730 for i in range(0, length): 00731 start = end 00732 end += 4 00733 (length,) = _struct_I.unpack(str[start:end]) 00734 start = end 00735 end += length 00736 val1 = str[start:end] 00737 self.robot_state.joint_state.name.append(val1) 00738 start = end 00739 end += 4 00740 (length,) = _struct_I.unpack(str[start:end]) 00741 pattern = '<%sd'%length 00742 start = end 00743 end += struct.calcsize(pattern) 00744 self.robot_state.joint_state.position = struct.unpack(pattern, str[start:end]) 00745 start = end 00746 end += 4 00747 (length,) = _struct_I.unpack(str[start:end]) 00748 pattern = '<%sd'%length 00749 start = end 00750 end += struct.calcsize(pattern) 00751 self.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) 00752 start = end 00753 end += 4 00754 (length,) = _struct_I.unpack(str[start:end]) 00755 pattern = '<%sd'%length 00756 start = end 00757 end += struct.calcsize(pattern) 00758 self.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end]) 00759 _x = self 00760 start = end 00761 end += 8 00762 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00763 start = end 00764 end += 4 00765 (length,) = _struct_I.unpack(str[start:end]) 00766 self.robot_state.multi_dof_joint_state.joint_names = [] 00767 for i in range(0, length): 00768 start = end 00769 end += 4 00770 (length,) = _struct_I.unpack(str[start:end]) 00771 start = end 00772 end += length 00773 val1 = str[start:end] 00774 self.robot_state.multi_dof_joint_state.joint_names.append(val1) 00775 start = end 00776 end += 4 00777 (length,) = _struct_I.unpack(str[start:end]) 00778 self.robot_state.multi_dof_joint_state.frame_ids = [] 00779 for i in range(0, length): 00780 start = end 00781 end += 4 00782 (length,) = _struct_I.unpack(str[start:end]) 00783 start = end 00784 end += length 00785 val1 = str[start:end] 00786 self.robot_state.multi_dof_joint_state.frame_ids.append(val1) 00787 start = end 00788 end += 4 00789 (length,) = _struct_I.unpack(str[start:end]) 00790 self.robot_state.multi_dof_joint_state.child_frame_ids = [] 00791 for i in range(0, length): 00792 start = end 00793 end += 4 00794 (length,) = _struct_I.unpack(str[start:end]) 00795 start = end 00796 end += length 00797 val1 = str[start:end] 00798 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 00799 start = end 00800 end += 4 00801 (length,) = _struct_I.unpack(str[start:end]) 00802 self.robot_state.multi_dof_joint_state.poses = [] 00803 for i in range(0, length): 00804 val1 = geometry_msgs.msg.Pose() 00805 _v47 = val1.position 00806 _x = _v47 00807 start = end 00808 end += 24 00809 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00810 _v48 = val1.orientation 00811 _x = _v48 00812 start = end 00813 end += 32 00814 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00815 self.robot_state.multi_dof_joint_state.poses.append(val1) 00816 _x = self 00817 start = end 00818 end += 5 00819 (_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory,) = _struct_5B.unpack(str[start:end]) 00820 self.check_collisions = bool(self.check_collisions) 00821 self.check_path_constraints = bool(self.check_path_constraints) 00822 self.check_goal_constraints = bool(self.check_goal_constraints) 00823 self.check_joint_limits = bool(self.check_joint_limits) 00824 self.check_full_trajectory = bool(self.check_full_trajectory) 00825 start = end 00826 end += 4 00827 (length,) = _struct_I.unpack(str[start:end]) 00828 self.path_constraints.joint_constraints = [] 00829 for i in range(0, length): 00830 val1 = arm_navigation_msgs.msg.JointConstraint() 00831 start = end 00832 end += 4 00833 (length,) = _struct_I.unpack(str[start:end]) 00834 start = end 00835 end += length 00836 val1.joint_name = str[start:end] 00837 _x = val1 00838 start = end 00839 end += 32 00840 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end]) 00841 self.path_constraints.joint_constraints.append(val1) 00842 start = end 00843 end += 4 00844 (length,) = _struct_I.unpack(str[start:end]) 00845 self.path_constraints.position_constraints = [] 00846 for i in range(0, length): 00847 val1 = arm_navigation_msgs.msg.PositionConstraint() 00848 _v49 = val1.header 00849 start = end 00850 end += 4 00851 (_v49.seq,) = _struct_I.unpack(str[start:end]) 00852 _v50 = _v49.stamp 00853 _x = _v50 00854 start = end 00855 end += 8 00856 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00857 start = end 00858 end += 4 00859 (length,) = _struct_I.unpack(str[start:end]) 00860 start = end 00861 end += length 00862 _v49.frame_id = str[start:end] 00863 start = end 00864 end += 4 00865 (length,) = _struct_I.unpack(str[start:end]) 00866 start = end 00867 end += length 00868 val1.link_name = str[start:end] 00869 _v51 = val1.target_point_offset 00870 _x = _v51 00871 start = end 00872 end += 24 00873 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00874 _v52 = val1.position 00875 _x = _v52 00876 start = end 00877 end += 24 00878 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00879 _v53 = val1.constraint_region_shape 00880 start = end 00881 end += 1 00882 (_v53.type,) = _struct_b.unpack(str[start:end]) 00883 start = end 00884 end += 4 00885 (length,) = _struct_I.unpack(str[start:end]) 00886 pattern = '<%sd'%length 00887 start = end 00888 end += struct.calcsize(pattern) 00889 _v53.dimensions = struct.unpack(pattern, str[start:end]) 00890 start = end 00891 end += 4 00892 (length,) = _struct_I.unpack(str[start:end]) 00893 pattern = '<%si'%length 00894 start = end 00895 end += struct.calcsize(pattern) 00896 _v53.triangles = struct.unpack(pattern, str[start:end]) 00897 start = end 00898 end += 4 00899 (length,) = _struct_I.unpack(str[start:end]) 00900 _v53.vertices = [] 00901 for i in range(0, length): 00902 val3 = geometry_msgs.msg.Point() 00903 _x = val3 00904 start = end 00905 end += 24 00906 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00907 _v53.vertices.append(val3) 00908 _v54 = val1.constraint_region_orientation 00909 _x = _v54 00910 start = end 00911 end += 32 00912 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00913 start = end 00914 end += 8 00915 (val1.weight,) = _struct_d.unpack(str[start:end]) 00916 self.path_constraints.position_constraints.append(val1) 00917 start = end 00918 end += 4 00919 (length,) = _struct_I.unpack(str[start:end]) 00920 self.path_constraints.orientation_constraints = [] 00921 for i in range(0, length): 00922 val1 = arm_navigation_msgs.msg.OrientationConstraint() 00923 _v55 = val1.header 00924 start = end 00925 end += 4 00926 (_v55.seq,) = _struct_I.unpack(str[start:end]) 00927 _v56 = _v55.stamp 00928 _x = _v56 00929 start = end 00930 end += 8 00931 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00932 start = end 00933 end += 4 00934 (length,) = _struct_I.unpack(str[start:end]) 00935 start = end 00936 end += length 00937 _v55.frame_id = str[start:end] 00938 start = end 00939 end += 4 00940 (length,) = _struct_I.unpack(str[start:end]) 00941 start = end 00942 end += length 00943 val1.link_name = str[start:end] 00944 start = end 00945 end += 4 00946 (val1.type,) = _struct_i.unpack(str[start:end]) 00947 _v57 = val1.orientation 00948 _x = _v57 00949 start = end 00950 end += 32 00951 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00952 _x = val1 00953 start = end 00954 end += 32 00955 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end]) 00956 self.path_constraints.orientation_constraints.append(val1) 00957 start = end 00958 end += 4 00959 (length,) = _struct_I.unpack(str[start:end]) 00960 self.path_constraints.visibility_constraints = [] 00961 for i in range(0, length): 00962 val1 = arm_navigation_msgs.msg.VisibilityConstraint() 00963 _v58 = val1.header 00964 start = end 00965 end += 4 00966 (_v58.seq,) = _struct_I.unpack(str[start:end]) 00967 _v59 = _v58.stamp 00968 _x = _v59 00969 start = end 00970 end += 8 00971 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00972 start = end 00973 end += 4 00974 (length,) = _struct_I.unpack(str[start:end]) 00975 start = end 00976 end += length 00977 _v58.frame_id = str[start:end] 00978 _v60 = val1.target 00979 _v61 = _v60.header 00980 start = end 00981 end += 4 00982 (_v61.seq,) = _struct_I.unpack(str[start:end]) 00983 _v62 = _v61.stamp 00984 _x = _v62 00985 start = end 00986 end += 8 00987 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00988 start = end 00989 end += 4 00990 (length,) = _struct_I.unpack(str[start:end]) 00991 start = end 00992 end += length 00993 _v61.frame_id = str[start:end] 00994 _v63 = _v60.point 00995 _x = _v63 00996 start = end 00997 end += 24 00998 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00999 _v64 = val1.sensor_pose 01000 _v65 = _v64.header 01001 start = end 01002 end += 4 01003 (_v65.seq,) = _struct_I.unpack(str[start:end]) 01004 _v66 = _v65.stamp 01005 _x = _v66 01006 start = end 01007 end += 8 01008 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01009 start = end 01010 end += 4 01011 (length,) = _struct_I.unpack(str[start:end]) 01012 start = end 01013 end += length 01014 _v65.frame_id = str[start:end] 01015 _v67 = _v64.pose 01016 _v68 = _v67.position 01017 _x = _v68 01018 start = end 01019 end += 24 01020 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01021 _v69 = _v67.orientation 01022 _x = _v69 01023 start = end 01024 end += 32 01025 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01026 start = end 01027 end += 8 01028 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end]) 01029 self.path_constraints.visibility_constraints.append(val1) 01030 start = end 01031 end += 4 01032 (length,) = _struct_I.unpack(str[start:end]) 01033 self.goal_constraints.joint_constraints = [] 01034 for i in range(0, length): 01035 val1 = arm_navigation_msgs.msg.JointConstraint() 01036 start = end 01037 end += 4 01038 (length,) = _struct_I.unpack(str[start:end]) 01039 start = end 01040 end += length 01041 val1.joint_name = str[start:end] 01042 _x = val1 01043 start = end 01044 end += 32 01045 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end]) 01046 self.goal_constraints.joint_constraints.append(val1) 01047 start = end 01048 end += 4 01049 (length,) = _struct_I.unpack(str[start:end]) 01050 self.goal_constraints.position_constraints = [] 01051 for i in range(0, length): 01052 val1 = arm_navigation_msgs.msg.PositionConstraint() 01053 _v70 = val1.header 01054 start = end 01055 end += 4 01056 (_v70.seq,) = _struct_I.unpack(str[start:end]) 01057 _v71 = _v70.stamp 01058 _x = _v71 01059 start = end 01060 end += 8 01061 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01062 start = end 01063 end += 4 01064 (length,) = _struct_I.unpack(str[start:end]) 01065 start = end 01066 end += length 01067 _v70.frame_id = str[start:end] 01068 start = end 01069 end += 4 01070 (length,) = _struct_I.unpack(str[start:end]) 01071 start = end 01072 end += length 01073 val1.link_name = str[start:end] 01074 _v72 = val1.target_point_offset 01075 _x = _v72 01076 start = end 01077 end += 24 01078 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01079 _v73 = val1.position 01080 _x = _v73 01081 start = end 01082 end += 24 01083 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01084 _v74 = val1.constraint_region_shape 01085 start = end 01086 end += 1 01087 (_v74.type,) = _struct_b.unpack(str[start:end]) 01088 start = end 01089 end += 4 01090 (length,) = _struct_I.unpack(str[start:end]) 01091 pattern = '<%sd'%length 01092 start = end 01093 end += struct.calcsize(pattern) 01094 _v74.dimensions = struct.unpack(pattern, str[start:end]) 01095 start = end 01096 end += 4 01097 (length,) = _struct_I.unpack(str[start:end]) 01098 pattern = '<%si'%length 01099 start = end 01100 end += struct.calcsize(pattern) 01101 _v74.triangles = struct.unpack(pattern, str[start:end]) 01102 start = end 01103 end += 4 01104 (length,) = _struct_I.unpack(str[start:end]) 01105 _v74.vertices = [] 01106 for i in range(0, length): 01107 val3 = geometry_msgs.msg.Point() 01108 _x = val3 01109 start = end 01110 end += 24 01111 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01112 _v74.vertices.append(val3) 01113 _v75 = val1.constraint_region_orientation 01114 _x = _v75 01115 start = end 01116 end += 32 01117 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01118 start = end 01119 end += 8 01120 (val1.weight,) = _struct_d.unpack(str[start:end]) 01121 self.goal_constraints.position_constraints.append(val1) 01122 start = end 01123 end += 4 01124 (length,) = _struct_I.unpack(str[start:end]) 01125 self.goal_constraints.orientation_constraints = [] 01126 for i in range(0, length): 01127 val1 = arm_navigation_msgs.msg.OrientationConstraint() 01128 _v76 = val1.header 01129 start = end 01130 end += 4 01131 (_v76.seq,) = _struct_I.unpack(str[start:end]) 01132 _v77 = _v76.stamp 01133 _x = _v77 01134 start = end 01135 end += 8 01136 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01137 start = end 01138 end += 4 01139 (length,) = _struct_I.unpack(str[start:end]) 01140 start = end 01141 end += length 01142 _v76.frame_id = str[start:end] 01143 start = end 01144 end += 4 01145 (length,) = _struct_I.unpack(str[start:end]) 01146 start = end 01147 end += length 01148 val1.link_name = str[start:end] 01149 start = end 01150 end += 4 01151 (val1.type,) = _struct_i.unpack(str[start:end]) 01152 _v78 = val1.orientation 01153 _x = _v78 01154 start = end 01155 end += 32 01156 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01157 _x = val1 01158 start = end 01159 end += 32 01160 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end]) 01161 self.goal_constraints.orientation_constraints.append(val1) 01162 start = end 01163 end += 4 01164 (length,) = _struct_I.unpack(str[start:end]) 01165 self.goal_constraints.visibility_constraints = [] 01166 for i in range(0, length): 01167 val1 = arm_navigation_msgs.msg.VisibilityConstraint() 01168 _v79 = val1.header 01169 start = end 01170 end += 4 01171 (_v79.seq,) = _struct_I.unpack(str[start:end]) 01172 _v80 = _v79.stamp 01173 _x = _v80 01174 start = end 01175 end += 8 01176 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01177 start = end 01178 end += 4 01179 (length,) = _struct_I.unpack(str[start:end]) 01180 start = end 01181 end += length 01182 _v79.frame_id = str[start:end] 01183 _v81 = val1.target 01184 _v82 = _v81.header 01185 start = end 01186 end += 4 01187 (_v82.seq,) = _struct_I.unpack(str[start:end]) 01188 _v83 = _v82.stamp 01189 _x = _v83 01190 start = end 01191 end += 8 01192 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01193 start = end 01194 end += 4 01195 (length,) = _struct_I.unpack(str[start:end]) 01196 start = end 01197 end += length 01198 _v82.frame_id = str[start:end] 01199 _v84 = _v81.point 01200 _x = _v84 01201 start = end 01202 end += 24 01203 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01204 _v85 = val1.sensor_pose 01205 _v86 = _v85.header 01206 start = end 01207 end += 4 01208 (_v86.seq,) = _struct_I.unpack(str[start:end]) 01209 _v87 = _v86.stamp 01210 _x = _v87 01211 start = end 01212 end += 8 01213 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01214 start = end 01215 end += 4 01216 (length,) = _struct_I.unpack(str[start:end]) 01217 start = end 01218 end += length 01219 _v86.frame_id = str[start:end] 01220 _v88 = _v85.pose 01221 _v89 = _v88.position 01222 _x = _v89 01223 start = end 01224 end += 24 01225 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01226 _v90 = _v88.orientation 01227 _x = _v90 01228 start = end 01229 end += 32 01230 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01231 start = end 01232 end += 8 01233 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end]) 01234 self.goal_constraints.visibility_constraints.append(val1) 01235 return self 01236 except struct.error as e: 01237 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01238 01239 01240 def serialize_numpy(self, buff, numpy): 01241 """ 01242 serialize message with numpy array types into buffer 01243 @param buff: buffer 01244 @type buff: StringIO 01245 @param numpy: numpy python module 01246 @type numpy module 01247 """ 01248 try: 01249 _x = self 01250 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs)) 01251 _x = self.trajectory.header.frame_id 01252 length = len(_x) 01253 buff.write(struct.pack('<I%ss'%length, length, _x)) 01254 length = len(self.trajectory.joint_names) 01255 buff.write(_struct_I.pack(length)) 01256 for val1 in self.trajectory.joint_names: 01257 length = len(val1) 01258 buff.write(struct.pack('<I%ss'%length, length, val1)) 01259 length = len(self.trajectory.points) 01260 buff.write(_struct_I.pack(length)) 01261 for val1 in self.trajectory.points: 01262 length = len(val1.positions) 01263 buff.write(_struct_I.pack(length)) 01264 pattern = '<%sd'%length 01265 buff.write(val1.positions.tostring()) 01266 length = len(val1.velocities) 01267 buff.write(_struct_I.pack(length)) 01268 pattern = '<%sd'%length 01269 buff.write(val1.velocities.tostring()) 01270 length = len(val1.accelerations) 01271 buff.write(_struct_I.pack(length)) 01272 pattern = '<%sd'%length 01273 buff.write(val1.accelerations.tostring()) 01274 _v91 = val1.time_from_start 01275 _x = _v91 01276 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 01277 _x = self 01278 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs)) 01279 _x = self.robot_state.joint_state.header.frame_id 01280 length = len(_x) 01281 buff.write(struct.pack('<I%ss'%length, length, _x)) 01282 length = len(self.robot_state.joint_state.name) 01283 buff.write(_struct_I.pack(length)) 01284 for val1 in self.robot_state.joint_state.name: 01285 length = len(val1) 01286 buff.write(struct.pack('<I%ss'%length, length, val1)) 01287 length = len(self.robot_state.joint_state.position) 01288 buff.write(_struct_I.pack(length)) 01289 pattern = '<%sd'%length 01290 buff.write(self.robot_state.joint_state.position.tostring()) 01291 length = len(self.robot_state.joint_state.velocity) 01292 buff.write(_struct_I.pack(length)) 01293 pattern = '<%sd'%length 01294 buff.write(self.robot_state.joint_state.velocity.tostring()) 01295 length = len(self.robot_state.joint_state.effort) 01296 buff.write(_struct_I.pack(length)) 01297 pattern = '<%sd'%length 01298 buff.write(self.robot_state.joint_state.effort.tostring()) 01299 _x = self 01300 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs)) 01301 length = len(self.robot_state.multi_dof_joint_state.joint_names) 01302 buff.write(_struct_I.pack(length)) 01303 for val1 in self.robot_state.multi_dof_joint_state.joint_names: 01304 length = len(val1) 01305 buff.write(struct.pack('<I%ss'%length, length, val1)) 01306 length = len(self.robot_state.multi_dof_joint_state.frame_ids) 01307 buff.write(_struct_I.pack(length)) 01308 for val1 in self.robot_state.multi_dof_joint_state.frame_ids: 01309 length = len(val1) 01310 buff.write(struct.pack('<I%ss'%length, length, val1)) 01311 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids) 01312 buff.write(_struct_I.pack(length)) 01313 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids: 01314 length = len(val1) 01315 buff.write(struct.pack('<I%ss'%length, length, val1)) 01316 length = len(self.robot_state.multi_dof_joint_state.poses) 01317 buff.write(_struct_I.pack(length)) 01318 for val1 in self.robot_state.multi_dof_joint_state.poses: 01319 _v92 = val1.position 01320 _x = _v92 01321 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01322 _v93 = val1.orientation 01323 _x = _v93 01324 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01325 _x = self 01326 buff.write(_struct_5B.pack(_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory)) 01327 length = len(self.path_constraints.joint_constraints) 01328 buff.write(_struct_I.pack(length)) 01329 for val1 in self.path_constraints.joint_constraints: 01330 _x = val1.joint_name 01331 length = len(_x) 01332 buff.write(struct.pack('<I%ss'%length, length, _x)) 01333 _x = val1 01334 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) 01335 length = len(self.path_constraints.position_constraints) 01336 buff.write(_struct_I.pack(length)) 01337 for val1 in self.path_constraints.position_constraints: 01338 _v94 = val1.header 01339 buff.write(_struct_I.pack(_v94.seq)) 01340 _v95 = _v94.stamp 01341 _x = _v95 01342 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01343 _x = _v94.frame_id 01344 length = len(_x) 01345 buff.write(struct.pack('<I%ss'%length, length, _x)) 01346 _x = val1.link_name 01347 length = len(_x) 01348 buff.write(struct.pack('<I%ss'%length, length, _x)) 01349 _v96 = val1.target_point_offset 01350 _x = _v96 01351 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01352 _v97 = val1.position 01353 _x = _v97 01354 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01355 _v98 = val1.constraint_region_shape 01356 buff.write(_struct_b.pack(_v98.type)) 01357 length = len(_v98.dimensions) 01358 buff.write(_struct_I.pack(length)) 01359 pattern = '<%sd'%length 01360 buff.write(_v98.dimensions.tostring()) 01361 length = len(_v98.triangles) 01362 buff.write(_struct_I.pack(length)) 01363 pattern = '<%si'%length 01364 buff.write(_v98.triangles.tostring()) 01365 length = len(_v98.vertices) 01366 buff.write(_struct_I.pack(length)) 01367 for val3 in _v98.vertices: 01368 _x = val3 01369 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01370 _v99 = val1.constraint_region_orientation 01371 _x = _v99 01372 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01373 buff.write(_struct_d.pack(val1.weight)) 01374 length = len(self.path_constraints.orientation_constraints) 01375 buff.write(_struct_I.pack(length)) 01376 for val1 in self.path_constraints.orientation_constraints: 01377 _v100 = val1.header 01378 buff.write(_struct_I.pack(_v100.seq)) 01379 _v101 = _v100.stamp 01380 _x = _v101 01381 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01382 _x = _v100.frame_id 01383 length = len(_x) 01384 buff.write(struct.pack('<I%ss'%length, length, _x)) 01385 _x = val1.link_name 01386 length = len(_x) 01387 buff.write(struct.pack('<I%ss'%length, length, _x)) 01388 buff.write(_struct_i.pack(val1.type)) 01389 _v102 = val1.orientation 01390 _x = _v102 01391 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01392 _x = val1 01393 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight)) 01394 length = len(self.path_constraints.visibility_constraints) 01395 buff.write(_struct_I.pack(length)) 01396 for val1 in self.path_constraints.visibility_constraints: 01397 _v103 = val1.header 01398 buff.write(_struct_I.pack(_v103.seq)) 01399 _v104 = _v103.stamp 01400 _x = _v104 01401 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01402 _x = _v103.frame_id 01403 length = len(_x) 01404 buff.write(struct.pack('<I%ss'%length, length, _x)) 01405 _v105 = val1.target 01406 _v106 = _v105.header 01407 buff.write(_struct_I.pack(_v106.seq)) 01408 _v107 = _v106.stamp 01409 _x = _v107 01410 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01411 _x = _v106.frame_id 01412 length = len(_x) 01413 buff.write(struct.pack('<I%ss'%length, length, _x)) 01414 _v108 = _v105.point 01415 _x = _v108 01416 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01417 _v109 = val1.sensor_pose 01418 _v110 = _v109.header 01419 buff.write(_struct_I.pack(_v110.seq)) 01420 _v111 = _v110.stamp 01421 _x = _v111 01422 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01423 _x = _v110.frame_id 01424 length = len(_x) 01425 buff.write(struct.pack('<I%ss'%length, length, _x)) 01426 _v112 = _v109.pose 01427 _v113 = _v112.position 01428 _x = _v113 01429 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01430 _v114 = _v112.orientation 01431 _x = _v114 01432 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01433 buff.write(_struct_d.pack(val1.absolute_tolerance)) 01434 length = len(self.goal_constraints.joint_constraints) 01435 buff.write(_struct_I.pack(length)) 01436 for val1 in self.goal_constraints.joint_constraints: 01437 _x = val1.joint_name 01438 length = len(_x) 01439 buff.write(struct.pack('<I%ss'%length, length, _x)) 01440 _x = val1 01441 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) 01442 length = len(self.goal_constraints.position_constraints) 01443 buff.write(_struct_I.pack(length)) 01444 for val1 in self.goal_constraints.position_constraints: 01445 _v115 = val1.header 01446 buff.write(_struct_I.pack(_v115.seq)) 01447 _v116 = _v115.stamp 01448 _x = _v116 01449 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01450 _x = _v115.frame_id 01451 length = len(_x) 01452 buff.write(struct.pack('<I%ss'%length, length, _x)) 01453 _x = val1.link_name 01454 length = len(_x) 01455 buff.write(struct.pack('<I%ss'%length, length, _x)) 01456 _v117 = val1.target_point_offset 01457 _x = _v117 01458 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01459 _v118 = val1.position 01460 _x = _v118 01461 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01462 _v119 = val1.constraint_region_shape 01463 buff.write(_struct_b.pack(_v119.type)) 01464 length = len(_v119.dimensions) 01465 buff.write(_struct_I.pack(length)) 01466 pattern = '<%sd'%length 01467 buff.write(_v119.dimensions.tostring()) 01468 length = len(_v119.triangles) 01469 buff.write(_struct_I.pack(length)) 01470 pattern = '<%si'%length 01471 buff.write(_v119.triangles.tostring()) 01472 length = len(_v119.vertices) 01473 buff.write(_struct_I.pack(length)) 01474 for val3 in _v119.vertices: 01475 _x = val3 01476 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01477 _v120 = val1.constraint_region_orientation 01478 _x = _v120 01479 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01480 buff.write(_struct_d.pack(val1.weight)) 01481 length = len(self.goal_constraints.orientation_constraints) 01482 buff.write(_struct_I.pack(length)) 01483 for val1 in self.goal_constraints.orientation_constraints: 01484 _v121 = val1.header 01485 buff.write(_struct_I.pack(_v121.seq)) 01486 _v122 = _v121.stamp 01487 _x = _v122 01488 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01489 _x = _v121.frame_id 01490 length = len(_x) 01491 buff.write(struct.pack('<I%ss'%length, length, _x)) 01492 _x = val1.link_name 01493 length = len(_x) 01494 buff.write(struct.pack('<I%ss'%length, length, _x)) 01495 buff.write(_struct_i.pack(val1.type)) 01496 _v123 = val1.orientation 01497 _x = _v123 01498 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01499 _x = val1 01500 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight)) 01501 length = len(self.goal_constraints.visibility_constraints) 01502 buff.write(_struct_I.pack(length)) 01503 for val1 in self.goal_constraints.visibility_constraints: 01504 _v124 = val1.header 01505 buff.write(_struct_I.pack(_v124.seq)) 01506 _v125 = _v124.stamp 01507 _x = _v125 01508 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01509 _x = _v124.frame_id 01510 length = len(_x) 01511 buff.write(struct.pack('<I%ss'%length, length, _x)) 01512 _v126 = val1.target 01513 _v127 = _v126.header 01514 buff.write(_struct_I.pack(_v127.seq)) 01515 _v128 = _v127.stamp 01516 _x = _v128 01517 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01518 _x = _v127.frame_id 01519 length = len(_x) 01520 buff.write(struct.pack('<I%ss'%length, length, _x)) 01521 _v129 = _v126.point 01522 _x = _v129 01523 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01524 _v130 = val1.sensor_pose 01525 _v131 = _v130.header 01526 buff.write(_struct_I.pack(_v131.seq)) 01527 _v132 = _v131.stamp 01528 _x = _v132 01529 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01530 _x = _v131.frame_id 01531 length = len(_x) 01532 buff.write(struct.pack('<I%ss'%length, length, _x)) 01533 _v133 = _v130.pose 01534 _v134 = _v133.position 01535 _x = _v134 01536 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 01537 _v135 = _v133.orientation 01538 _x = _v135 01539 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 01540 buff.write(_struct_d.pack(val1.absolute_tolerance)) 01541 except struct.error as se: self._check_types(se) 01542 except TypeError as te: self._check_types(te) 01543 01544 def deserialize_numpy(self, str, numpy): 01545 """ 01546 unpack serialized message in str into this message instance using numpy for array types 01547 @param str: byte array of serialized message 01548 @type str: str 01549 @param numpy: numpy python module 01550 @type numpy: module 01551 """ 01552 try: 01553 if self.trajectory is None: 01554 self.trajectory = trajectory_msgs.msg.JointTrajectory() 01555 if self.robot_state is None: 01556 self.robot_state = arm_navigation_msgs.msg.RobotState() 01557 if self.path_constraints is None: 01558 self.path_constraints = arm_navigation_msgs.msg.Constraints() 01559 if self.goal_constraints is None: 01560 self.goal_constraints = arm_navigation_msgs.msg.Constraints() 01561 end = 0 01562 _x = self 01563 start = end 01564 end += 12 01565 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 01566 start = end 01567 end += 4 01568 (length,) = _struct_I.unpack(str[start:end]) 01569 start = end 01570 end += length 01571 self.trajectory.header.frame_id = str[start:end] 01572 start = end 01573 end += 4 01574 (length,) = _struct_I.unpack(str[start:end]) 01575 self.trajectory.joint_names = [] 01576 for i in range(0, length): 01577 start = end 01578 end += 4 01579 (length,) = _struct_I.unpack(str[start:end]) 01580 start = end 01581 end += length 01582 val1 = str[start:end] 01583 self.trajectory.joint_names.append(val1) 01584 start = end 01585 end += 4 01586 (length,) = _struct_I.unpack(str[start:end]) 01587 self.trajectory.points = [] 01588 for i in range(0, length): 01589 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 01590 start = end 01591 end += 4 01592 (length,) = _struct_I.unpack(str[start:end]) 01593 pattern = '<%sd'%length 01594 start = end 01595 end += struct.calcsize(pattern) 01596 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01597 start = end 01598 end += 4 01599 (length,) = _struct_I.unpack(str[start:end]) 01600 pattern = '<%sd'%length 01601 start = end 01602 end += struct.calcsize(pattern) 01603 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01604 start = end 01605 end += 4 01606 (length,) = _struct_I.unpack(str[start:end]) 01607 pattern = '<%sd'%length 01608 start = end 01609 end += struct.calcsize(pattern) 01610 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01611 _v136 = val1.time_from_start 01612 _x = _v136 01613 start = end 01614 end += 8 01615 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 01616 self.trajectory.points.append(val1) 01617 _x = self 01618 start = end 01619 end += 12 01620 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 01621 start = end 01622 end += 4 01623 (length,) = _struct_I.unpack(str[start:end]) 01624 start = end 01625 end += length 01626 self.robot_state.joint_state.header.frame_id = str[start:end] 01627 start = end 01628 end += 4 01629 (length,) = _struct_I.unpack(str[start:end]) 01630 self.robot_state.joint_state.name = [] 01631 for i in range(0, length): 01632 start = end 01633 end += 4 01634 (length,) = _struct_I.unpack(str[start:end]) 01635 start = end 01636 end += length 01637 val1 = str[start:end] 01638 self.robot_state.joint_state.name.append(val1) 01639 start = end 01640 end += 4 01641 (length,) = _struct_I.unpack(str[start:end]) 01642 pattern = '<%sd'%length 01643 start = end 01644 end += struct.calcsize(pattern) 01645 self.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01646 start = end 01647 end += 4 01648 (length,) = _struct_I.unpack(str[start:end]) 01649 pattern = '<%sd'%length 01650 start = end 01651 end += struct.calcsize(pattern) 01652 self.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01653 start = end 01654 end += 4 01655 (length,) = _struct_I.unpack(str[start:end]) 01656 pattern = '<%sd'%length 01657 start = end 01658 end += struct.calcsize(pattern) 01659 self.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01660 _x = self 01661 start = end 01662 end += 8 01663 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 01664 start = end 01665 end += 4 01666 (length,) = _struct_I.unpack(str[start:end]) 01667 self.robot_state.multi_dof_joint_state.joint_names = [] 01668 for i in range(0, length): 01669 start = end 01670 end += 4 01671 (length,) = _struct_I.unpack(str[start:end]) 01672 start = end 01673 end += length 01674 val1 = str[start:end] 01675 self.robot_state.multi_dof_joint_state.joint_names.append(val1) 01676 start = end 01677 end += 4 01678 (length,) = _struct_I.unpack(str[start:end]) 01679 self.robot_state.multi_dof_joint_state.frame_ids = [] 01680 for i in range(0, length): 01681 start = end 01682 end += 4 01683 (length,) = _struct_I.unpack(str[start:end]) 01684 start = end 01685 end += length 01686 val1 = str[start:end] 01687 self.robot_state.multi_dof_joint_state.frame_ids.append(val1) 01688 start = end 01689 end += 4 01690 (length,) = _struct_I.unpack(str[start:end]) 01691 self.robot_state.multi_dof_joint_state.child_frame_ids = [] 01692 for i in range(0, length): 01693 start = end 01694 end += 4 01695 (length,) = _struct_I.unpack(str[start:end]) 01696 start = end 01697 end += length 01698 val1 = str[start:end] 01699 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 01700 start = end 01701 end += 4 01702 (length,) = _struct_I.unpack(str[start:end]) 01703 self.robot_state.multi_dof_joint_state.poses = [] 01704 for i in range(0, length): 01705 val1 = geometry_msgs.msg.Pose() 01706 _v137 = val1.position 01707 _x = _v137 01708 start = end 01709 end += 24 01710 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01711 _v138 = val1.orientation 01712 _x = _v138 01713 start = end 01714 end += 32 01715 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01716 self.robot_state.multi_dof_joint_state.poses.append(val1) 01717 _x = self 01718 start = end 01719 end += 5 01720 (_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory,) = _struct_5B.unpack(str[start:end]) 01721 self.check_collisions = bool(self.check_collisions) 01722 self.check_path_constraints = bool(self.check_path_constraints) 01723 self.check_goal_constraints = bool(self.check_goal_constraints) 01724 self.check_joint_limits = bool(self.check_joint_limits) 01725 self.check_full_trajectory = bool(self.check_full_trajectory) 01726 start = end 01727 end += 4 01728 (length,) = _struct_I.unpack(str[start:end]) 01729 self.path_constraints.joint_constraints = [] 01730 for i in range(0, length): 01731 val1 = arm_navigation_msgs.msg.JointConstraint() 01732 start = end 01733 end += 4 01734 (length,) = _struct_I.unpack(str[start:end]) 01735 start = end 01736 end += length 01737 val1.joint_name = str[start:end] 01738 _x = val1 01739 start = end 01740 end += 32 01741 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end]) 01742 self.path_constraints.joint_constraints.append(val1) 01743 start = end 01744 end += 4 01745 (length,) = _struct_I.unpack(str[start:end]) 01746 self.path_constraints.position_constraints = [] 01747 for i in range(0, length): 01748 val1 = arm_navigation_msgs.msg.PositionConstraint() 01749 _v139 = val1.header 01750 start = end 01751 end += 4 01752 (_v139.seq,) = _struct_I.unpack(str[start:end]) 01753 _v140 = _v139.stamp 01754 _x = _v140 01755 start = end 01756 end += 8 01757 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01758 start = end 01759 end += 4 01760 (length,) = _struct_I.unpack(str[start:end]) 01761 start = end 01762 end += length 01763 _v139.frame_id = str[start:end] 01764 start = end 01765 end += 4 01766 (length,) = _struct_I.unpack(str[start:end]) 01767 start = end 01768 end += length 01769 val1.link_name = str[start:end] 01770 _v141 = val1.target_point_offset 01771 _x = _v141 01772 start = end 01773 end += 24 01774 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01775 _v142 = val1.position 01776 _x = _v142 01777 start = end 01778 end += 24 01779 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01780 _v143 = val1.constraint_region_shape 01781 start = end 01782 end += 1 01783 (_v143.type,) = _struct_b.unpack(str[start:end]) 01784 start = end 01785 end += 4 01786 (length,) = _struct_I.unpack(str[start:end]) 01787 pattern = '<%sd'%length 01788 start = end 01789 end += struct.calcsize(pattern) 01790 _v143.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01791 start = end 01792 end += 4 01793 (length,) = _struct_I.unpack(str[start:end]) 01794 pattern = '<%si'%length 01795 start = end 01796 end += struct.calcsize(pattern) 01797 _v143.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 01798 start = end 01799 end += 4 01800 (length,) = _struct_I.unpack(str[start:end]) 01801 _v143.vertices = [] 01802 for i in range(0, length): 01803 val3 = geometry_msgs.msg.Point() 01804 _x = val3 01805 start = end 01806 end += 24 01807 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01808 _v143.vertices.append(val3) 01809 _v144 = val1.constraint_region_orientation 01810 _x = _v144 01811 start = end 01812 end += 32 01813 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01814 start = end 01815 end += 8 01816 (val1.weight,) = _struct_d.unpack(str[start:end]) 01817 self.path_constraints.position_constraints.append(val1) 01818 start = end 01819 end += 4 01820 (length,) = _struct_I.unpack(str[start:end]) 01821 self.path_constraints.orientation_constraints = [] 01822 for i in range(0, length): 01823 val1 = arm_navigation_msgs.msg.OrientationConstraint() 01824 _v145 = val1.header 01825 start = end 01826 end += 4 01827 (_v145.seq,) = _struct_I.unpack(str[start:end]) 01828 _v146 = _v145.stamp 01829 _x = _v146 01830 start = end 01831 end += 8 01832 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01833 start = end 01834 end += 4 01835 (length,) = _struct_I.unpack(str[start:end]) 01836 start = end 01837 end += length 01838 _v145.frame_id = str[start:end] 01839 start = end 01840 end += 4 01841 (length,) = _struct_I.unpack(str[start:end]) 01842 start = end 01843 end += length 01844 val1.link_name = str[start:end] 01845 start = end 01846 end += 4 01847 (val1.type,) = _struct_i.unpack(str[start:end]) 01848 _v147 = val1.orientation 01849 _x = _v147 01850 start = end 01851 end += 32 01852 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01853 _x = val1 01854 start = end 01855 end += 32 01856 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end]) 01857 self.path_constraints.orientation_constraints.append(val1) 01858 start = end 01859 end += 4 01860 (length,) = _struct_I.unpack(str[start:end]) 01861 self.path_constraints.visibility_constraints = [] 01862 for i in range(0, length): 01863 val1 = arm_navigation_msgs.msg.VisibilityConstraint() 01864 _v148 = val1.header 01865 start = end 01866 end += 4 01867 (_v148.seq,) = _struct_I.unpack(str[start:end]) 01868 _v149 = _v148.stamp 01869 _x = _v149 01870 start = end 01871 end += 8 01872 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01873 start = end 01874 end += 4 01875 (length,) = _struct_I.unpack(str[start:end]) 01876 start = end 01877 end += length 01878 _v148.frame_id = str[start:end] 01879 _v150 = val1.target 01880 _v151 = _v150.header 01881 start = end 01882 end += 4 01883 (_v151.seq,) = _struct_I.unpack(str[start:end]) 01884 _v152 = _v151.stamp 01885 _x = _v152 01886 start = end 01887 end += 8 01888 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01889 start = end 01890 end += 4 01891 (length,) = _struct_I.unpack(str[start:end]) 01892 start = end 01893 end += length 01894 _v151.frame_id = str[start:end] 01895 _v153 = _v150.point 01896 _x = _v153 01897 start = end 01898 end += 24 01899 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01900 _v154 = val1.sensor_pose 01901 _v155 = _v154.header 01902 start = end 01903 end += 4 01904 (_v155.seq,) = _struct_I.unpack(str[start:end]) 01905 _v156 = _v155.stamp 01906 _x = _v156 01907 start = end 01908 end += 8 01909 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01910 start = end 01911 end += 4 01912 (length,) = _struct_I.unpack(str[start:end]) 01913 start = end 01914 end += length 01915 _v155.frame_id = str[start:end] 01916 _v157 = _v154.pose 01917 _v158 = _v157.position 01918 _x = _v158 01919 start = end 01920 end += 24 01921 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01922 _v159 = _v157.orientation 01923 _x = _v159 01924 start = end 01925 end += 32 01926 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01927 start = end 01928 end += 8 01929 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end]) 01930 self.path_constraints.visibility_constraints.append(val1) 01931 start = end 01932 end += 4 01933 (length,) = _struct_I.unpack(str[start:end]) 01934 self.goal_constraints.joint_constraints = [] 01935 for i in range(0, length): 01936 val1 = arm_navigation_msgs.msg.JointConstraint() 01937 start = end 01938 end += 4 01939 (length,) = _struct_I.unpack(str[start:end]) 01940 start = end 01941 end += length 01942 val1.joint_name = str[start:end] 01943 _x = val1 01944 start = end 01945 end += 32 01946 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end]) 01947 self.goal_constraints.joint_constraints.append(val1) 01948 start = end 01949 end += 4 01950 (length,) = _struct_I.unpack(str[start:end]) 01951 self.goal_constraints.position_constraints = [] 01952 for i in range(0, length): 01953 val1 = arm_navigation_msgs.msg.PositionConstraint() 01954 _v160 = val1.header 01955 start = end 01956 end += 4 01957 (_v160.seq,) = _struct_I.unpack(str[start:end]) 01958 _v161 = _v160.stamp 01959 _x = _v161 01960 start = end 01961 end += 8 01962 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01963 start = end 01964 end += 4 01965 (length,) = _struct_I.unpack(str[start:end]) 01966 start = end 01967 end += length 01968 _v160.frame_id = str[start:end] 01969 start = end 01970 end += 4 01971 (length,) = _struct_I.unpack(str[start:end]) 01972 start = end 01973 end += length 01974 val1.link_name = str[start:end] 01975 _v162 = val1.target_point_offset 01976 _x = _v162 01977 start = end 01978 end += 24 01979 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01980 _v163 = val1.position 01981 _x = _v163 01982 start = end 01983 end += 24 01984 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01985 _v164 = val1.constraint_region_shape 01986 start = end 01987 end += 1 01988 (_v164.type,) = _struct_b.unpack(str[start:end]) 01989 start = end 01990 end += 4 01991 (length,) = _struct_I.unpack(str[start:end]) 01992 pattern = '<%sd'%length 01993 start = end 01994 end += struct.calcsize(pattern) 01995 _v164.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01996 start = end 01997 end += 4 01998 (length,) = _struct_I.unpack(str[start:end]) 01999 pattern = '<%si'%length 02000 start = end 02001 end += struct.calcsize(pattern) 02002 _v164.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 02003 start = end 02004 end += 4 02005 (length,) = _struct_I.unpack(str[start:end]) 02006 _v164.vertices = [] 02007 for i in range(0, length): 02008 val3 = geometry_msgs.msg.Point() 02009 _x = val3 02010 start = end 02011 end += 24 02012 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02013 _v164.vertices.append(val3) 02014 _v165 = val1.constraint_region_orientation 02015 _x = _v165 02016 start = end 02017 end += 32 02018 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02019 start = end 02020 end += 8 02021 (val1.weight,) = _struct_d.unpack(str[start:end]) 02022 self.goal_constraints.position_constraints.append(val1) 02023 start = end 02024 end += 4 02025 (length,) = _struct_I.unpack(str[start:end]) 02026 self.goal_constraints.orientation_constraints = [] 02027 for i in range(0, length): 02028 val1 = arm_navigation_msgs.msg.OrientationConstraint() 02029 _v166 = val1.header 02030 start = end 02031 end += 4 02032 (_v166.seq,) = _struct_I.unpack(str[start:end]) 02033 _v167 = _v166.stamp 02034 _x = _v167 02035 start = end 02036 end += 8 02037 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02038 start = end 02039 end += 4 02040 (length,) = _struct_I.unpack(str[start:end]) 02041 start = end 02042 end += length 02043 _v166.frame_id = str[start:end] 02044 start = end 02045 end += 4 02046 (length,) = _struct_I.unpack(str[start:end]) 02047 start = end 02048 end += length 02049 val1.link_name = str[start:end] 02050 start = end 02051 end += 4 02052 (val1.type,) = _struct_i.unpack(str[start:end]) 02053 _v168 = val1.orientation 02054 _x = _v168 02055 start = end 02056 end += 32 02057 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02058 _x = val1 02059 start = end 02060 end += 32 02061 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end]) 02062 self.goal_constraints.orientation_constraints.append(val1) 02063 start = end 02064 end += 4 02065 (length,) = _struct_I.unpack(str[start:end]) 02066 self.goal_constraints.visibility_constraints = [] 02067 for i in range(0, length): 02068 val1 = arm_navigation_msgs.msg.VisibilityConstraint() 02069 _v169 = val1.header 02070 start = end 02071 end += 4 02072 (_v169.seq,) = _struct_I.unpack(str[start:end]) 02073 _v170 = _v169.stamp 02074 _x = _v170 02075 start = end 02076 end += 8 02077 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02078 start = end 02079 end += 4 02080 (length,) = _struct_I.unpack(str[start:end]) 02081 start = end 02082 end += length 02083 _v169.frame_id = str[start:end] 02084 _v171 = val1.target 02085 _v172 = _v171.header 02086 start = end 02087 end += 4 02088 (_v172.seq,) = _struct_I.unpack(str[start:end]) 02089 _v173 = _v172.stamp 02090 _x = _v173 02091 start = end 02092 end += 8 02093 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02094 start = end 02095 end += 4 02096 (length,) = _struct_I.unpack(str[start:end]) 02097 start = end 02098 end += length 02099 _v172.frame_id = str[start:end] 02100 _v174 = _v171.point 02101 _x = _v174 02102 start = end 02103 end += 24 02104 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02105 _v175 = val1.sensor_pose 02106 _v176 = _v175.header 02107 start = end 02108 end += 4 02109 (_v176.seq,) = _struct_I.unpack(str[start:end]) 02110 _v177 = _v176.stamp 02111 _x = _v177 02112 start = end 02113 end += 8 02114 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02115 start = end 02116 end += 4 02117 (length,) = _struct_I.unpack(str[start:end]) 02118 start = end 02119 end += length 02120 _v176.frame_id = str[start:end] 02121 _v178 = _v175.pose 02122 _v179 = _v178.position 02123 _x = _v179 02124 start = end 02125 end += 24 02126 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02127 _v180 = _v178.orientation 02128 _x = _v180 02129 start = end 02130 end += 32 02131 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 02132 start = end 02133 end += 8 02134 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end]) 02135 self.goal_constraints.visibility_constraints.append(val1) 02136 return self 02137 except struct.error as e: 02138 raise roslib.message.DeserializationError(e) #most likely buffer underfill 02139 02140 _struct_I = roslib.message.struct_I 02141 _struct_b = struct.Struct("<b") 02142 _struct_d = struct.Struct("<d") 02143 _struct_2I = struct.Struct("<2I") 02144 _struct_i = struct.Struct("<i") 02145 _struct_3I = struct.Struct("<3I") 02146 _struct_4d = struct.Struct("<4d") 02147 _struct_3d = struct.Struct("<3d") 02148 _struct_2i = struct.Struct("<2i") 02149 _struct_5B = struct.Struct("<5B") 02150 """autogenerated by genmsg_py from GetJointTrajectoryValidityResponse.msg. Do not edit.""" 02151 import roslib.message 02152 import struct 02153 02154 import arm_navigation_msgs.msg 02155 import geometry_msgs.msg 02156 import std_msgs.msg 02157 02158 class GetJointTrajectoryValidityResponse(roslib.message.Message): 02159 _md5sum = "a739823e2969bedb7e3343a4d8c097d4" 02160 _type = "arm_navigation_msgs/GetJointTrajectoryValidityResponse" 02161 _has_header = False #flag to mark the presence of a Header object 02162 _full_text = """ 02163 02164 02165 02166 arm_navigation_msgs/ArmNavigationErrorCodes error_code 02167 02168 02169 02170 02171 arm_navigation_msgs/ArmNavigationErrorCodes[] trajectory_error_codes 02172 02173 arm_navigation_msgs/ContactInformation[] contacts 02174 02175 02176 ================================================================================ 02177 MSG: arm_navigation_msgs/ArmNavigationErrorCodes 02178 int32 val 02179 02180 # overall behavior 02181 int32 PLANNING_FAILED=-1 02182 int32 SUCCESS=1 02183 int32 TIMED_OUT=-2 02184 02185 # start state errors 02186 int32 START_STATE_IN_COLLISION=-3 02187 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4 02188 02189 # goal errors 02190 int32 GOAL_IN_COLLISION=-5 02191 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6 02192 02193 # robot state 02194 int32 INVALID_ROBOT_STATE=-7 02195 int32 INCOMPLETE_ROBOT_STATE=-8 02196 02197 # planning request errors 02198 int32 INVALID_PLANNER_ID=-9 02199 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10 02200 int32 INVALID_ALLOWED_PLANNING_TIME=-11 02201 int32 INVALID_GROUP_NAME=-12 02202 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13 02203 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14 02204 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15 02205 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16 02206 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17 02207 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18 02208 02209 # state/trajectory monitor errors 02210 int32 INVALID_TRAJECTORY=-19 02211 int32 INVALID_INDEX=-20 02212 int32 JOINT_LIMITS_VIOLATED=-21 02213 int32 PATH_CONSTRAINTS_VIOLATED=-22 02214 int32 COLLISION_CONSTRAINTS_VIOLATED=-23 02215 int32 GOAL_CONSTRAINTS_VIOLATED=-24 02216 int32 JOINTS_NOT_MOVING=-25 02217 int32 TRAJECTORY_CONTROLLER_FAILED=-26 02218 02219 # system errors 02220 int32 FRAME_TRANSFORM_FAILURE=-27 02221 int32 COLLISION_CHECKING_UNAVAILABLE=-28 02222 int32 ROBOT_STATE_STALE=-29 02223 int32 SENSOR_INFO_STALE=-30 02224 02225 # kinematics errors 02226 int32 NO_IK_SOLUTION=-31 02227 int32 INVALID_LINK_NAME=-32 02228 int32 IK_LINK_IN_COLLISION=-33 02229 int32 NO_FK_SOLUTION=-34 02230 int32 KINEMATICS_STATE_IN_COLLISION=-35 02231 02232 # general errors 02233 int32 INVALID_TIMEOUT=-36 02234 02235 02236 ================================================================================ 02237 MSG: arm_navigation_msgs/ContactInformation 02238 # Standard ROS header contains information 02239 # about the frame in which this 02240 # contact is specified 02241 Header header 02242 02243 # Position of the contact point 02244 geometry_msgs/Point position 02245 02246 # Normal corresponding to the contact point 02247 geometry_msgs/Vector3 normal 02248 02249 # Depth of contact point 02250 float64 depth 02251 02252 # Name of the first body that is in contact 02253 # This could be a link or a namespace that represents a body 02254 string contact_body_1 02255 string attached_body_1 02256 uint32 body_type_1 02257 02258 # Name of the second body that is in contact 02259 # This could be a link or a namespace that represents a body 02260 string contact_body_2 02261 string attached_body_2 02262 uint32 body_type_2 02263 02264 uint32 ROBOT_LINK=0 02265 uint32 OBJECT=1 02266 uint32 ATTACHED_BODY=2 02267 ================================================================================ 02268 MSG: std_msgs/Header 02269 # Standard metadata for higher-level stamped data types. 02270 # This is generally used to communicate timestamped data 02271 # in a particular coordinate frame. 02272 # 02273 # sequence ID: consecutively increasing ID 02274 uint32 seq 02275 #Two-integer timestamp that is expressed as: 02276 # * stamp.secs: seconds (stamp_secs) since epoch 02277 # * stamp.nsecs: nanoseconds since stamp_secs 02278 # time-handling sugar is provided by the client library 02279 time stamp 02280 #Frame this data is associated with 02281 # 0: no frame 02282 # 1: global frame 02283 string frame_id 02284 02285 ================================================================================ 02286 MSG: geometry_msgs/Point 02287 # This contains the position of a point in free space 02288 float64 x 02289 float64 y 02290 float64 z 02291 02292 ================================================================================ 02293 MSG: geometry_msgs/Vector3 02294 # This represents a vector in free space. 02295 02296 float64 x 02297 float64 y 02298 float64 z 02299 """ 02300 __slots__ = ['error_code','trajectory_error_codes','contacts'] 02301 _slot_types = ['arm_navigation_msgs/ArmNavigationErrorCodes','arm_navigation_msgs/ArmNavigationErrorCodes[]','arm_navigation_msgs/ContactInformation[]'] 02302 02303 def __init__(self, *args, **kwds): 02304 """ 02305 Constructor. Any message fields that are implicitly/explicitly 02306 set to None will be assigned a default value. The recommend 02307 use is keyword arguments as this is more robust to future message 02308 changes. You cannot mix in-order arguments and keyword arguments. 02309 02310 The available fields are: 02311 error_code,trajectory_error_codes,contacts 02312 02313 @param args: complete set of field values, in .msg order 02314 @param kwds: use keyword arguments corresponding to message field names 02315 to set specific fields. 02316 """ 02317 if args or kwds: 02318 super(GetJointTrajectoryValidityResponse, self).__init__(*args, **kwds) 02319 #message fields cannot be None, assign default values for those that are 02320 if self.error_code is None: 02321 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02322 if self.trajectory_error_codes is None: 02323 self.trajectory_error_codes = [] 02324 if self.contacts is None: 02325 self.contacts = [] 02326 else: 02327 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02328 self.trajectory_error_codes = [] 02329 self.contacts = [] 02330 02331 def _get_types(self): 02332 """ 02333 internal API method 02334 """ 02335 return self._slot_types 02336 02337 def serialize(self, buff): 02338 """ 02339 serialize message into buffer 02340 @param buff: buffer 02341 @type buff: StringIO 02342 """ 02343 try: 02344 buff.write(_struct_i.pack(self.error_code.val)) 02345 length = len(self.trajectory_error_codes) 02346 buff.write(_struct_I.pack(length)) 02347 for val1 in self.trajectory_error_codes: 02348 buff.write(_struct_i.pack(val1.val)) 02349 length = len(self.contacts) 02350 buff.write(_struct_I.pack(length)) 02351 for val1 in self.contacts: 02352 _v181 = val1.header 02353 buff.write(_struct_I.pack(_v181.seq)) 02354 _v182 = _v181.stamp 02355 _x = _v182 02356 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02357 _x = _v181.frame_id 02358 length = len(_x) 02359 buff.write(struct.pack('<I%ss'%length, length, _x)) 02360 _v183 = val1.position 02361 _x = _v183 02362 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02363 _v184 = val1.normal 02364 _x = _v184 02365 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02366 buff.write(_struct_d.pack(val1.depth)) 02367 _x = val1.contact_body_1 02368 length = len(_x) 02369 buff.write(struct.pack('<I%ss'%length, length, _x)) 02370 _x = val1.attached_body_1 02371 length = len(_x) 02372 buff.write(struct.pack('<I%ss'%length, length, _x)) 02373 buff.write(_struct_I.pack(val1.body_type_1)) 02374 _x = val1.contact_body_2 02375 length = len(_x) 02376 buff.write(struct.pack('<I%ss'%length, length, _x)) 02377 _x = val1.attached_body_2 02378 length = len(_x) 02379 buff.write(struct.pack('<I%ss'%length, length, _x)) 02380 buff.write(_struct_I.pack(val1.body_type_2)) 02381 except struct.error as se: self._check_types(se) 02382 except TypeError as te: self._check_types(te) 02383 02384 def deserialize(self, str): 02385 """ 02386 unpack serialized message in str into this message instance 02387 @param str: byte array of serialized message 02388 @type str: str 02389 """ 02390 try: 02391 if self.error_code is None: 02392 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02393 end = 0 02394 start = end 02395 end += 4 02396 (self.error_code.val,) = _struct_i.unpack(str[start:end]) 02397 start = end 02398 end += 4 02399 (length,) = _struct_I.unpack(str[start:end]) 02400 self.trajectory_error_codes = [] 02401 for i in range(0, length): 02402 val1 = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02403 start = end 02404 end += 4 02405 (val1.val,) = _struct_i.unpack(str[start:end]) 02406 self.trajectory_error_codes.append(val1) 02407 start = end 02408 end += 4 02409 (length,) = _struct_I.unpack(str[start:end]) 02410 self.contacts = [] 02411 for i in range(0, length): 02412 val1 = arm_navigation_msgs.msg.ContactInformation() 02413 _v185 = val1.header 02414 start = end 02415 end += 4 02416 (_v185.seq,) = _struct_I.unpack(str[start:end]) 02417 _v186 = _v185.stamp 02418 _x = _v186 02419 start = end 02420 end += 8 02421 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02422 start = end 02423 end += 4 02424 (length,) = _struct_I.unpack(str[start:end]) 02425 start = end 02426 end += length 02427 _v185.frame_id = str[start:end] 02428 _v187 = val1.position 02429 _x = _v187 02430 start = end 02431 end += 24 02432 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02433 _v188 = val1.normal 02434 _x = _v188 02435 start = end 02436 end += 24 02437 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02438 start = end 02439 end += 8 02440 (val1.depth,) = _struct_d.unpack(str[start:end]) 02441 start = end 02442 end += 4 02443 (length,) = _struct_I.unpack(str[start:end]) 02444 start = end 02445 end += length 02446 val1.contact_body_1 = str[start:end] 02447 start = end 02448 end += 4 02449 (length,) = _struct_I.unpack(str[start:end]) 02450 start = end 02451 end += length 02452 val1.attached_body_1 = str[start:end] 02453 start = end 02454 end += 4 02455 (val1.body_type_1,) = _struct_I.unpack(str[start:end]) 02456 start = end 02457 end += 4 02458 (length,) = _struct_I.unpack(str[start:end]) 02459 start = end 02460 end += length 02461 val1.contact_body_2 = str[start:end] 02462 start = end 02463 end += 4 02464 (length,) = _struct_I.unpack(str[start:end]) 02465 start = end 02466 end += length 02467 val1.attached_body_2 = str[start:end] 02468 start = end 02469 end += 4 02470 (val1.body_type_2,) = _struct_I.unpack(str[start:end]) 02471 self.contacts.append(val1) 02472 return self 02473 except struct.error as e: 02474 raise roslib.message.DeserializationError(e) #most likely buffer underfill 02475 02476 02477 def serialize_numpy(self, buff, numpy): 02478 """ 02479 serialize message with numpy array types into buffer 02480 @param buff: buffer 02481 @type buff: StringIO 02482 @param numpy: numpy python module 02483 @type numpy module 02484 """ 02485 try: 02486 buff.write(_struct_i.pack(self.error_code.val)) 02487 length = len(self.trajectory_error_codes) 02488 buff.write(_struct_I.pack(length)) 02489 for val1 in self.trajectory_error_codes: 02490 buff.write(_struct_i.pack(val1.val)) 02491 length = len(self.contacts) 02492 buff.write(_struct_I.pack(length)) 02493 for val1 in self.contacts: 02494 _v189 = val1.header 02495 buff.write(_struct_I.pack(_v189.seq)) 02496 _v190 = _v189.stamp 02497 _x = _v190 02498 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 02499 _x = _v189.frame_id 02500 length = len(_x) 02501 buff.write(struct.pack('<I%ss'%length, length, _x)) 02502 _v191 = val1.position 02503 _x = _v191 02504 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02505 _v192 = val1.normal 02506 _x = _v192 02507 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 02508 buff.write(_struct_d.pack(val1.depth)) 02509 _x = val1.contact_body_1 02510 length = len(_x) 02511 buff.write(struct.pack('<I%ss'%length, length, _x)) 02512 _x = val1.attached_body_1 02513 length = len(_x) 02514 buff.write(struct.pack('<I%ss'%length, length, _x)) 02515 buff.write(_struct_I.pack(val1.body_type_1)) 02516 _x = val1.contact_body_2 02517 length = len(_x) 02518 buff.write(struct.pack('<I%ss'%length, length, _x)) 02519 _x = val1.attached_body_2 02520 length = len(_x) 02521 buff.write(struct.pack('<I%ss'%length, length, _x)) 02522 buff.write(_struct_I.pack(val1.body_type_2)) 02523 except struct.error as se: self._check_types(se) 02524 except TypeError as te: self._check_types(te) 02525 02526 def deserialize_numpy(self, str, numpy): 02527 """ 02528 unpack serialized message in str into this message instance using numpy for array types 02529 @param str: byte array of serialized message 02530 @type str: str 02531 @param numpy: numpy python module 02532 @type numpy: module 02533 """ 02534 try: 02535 if self.error_code is None: 02536 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02537 end = 0 02538 start = end 02539 end += 4 02540 (self.error_code.val,) = _struct_i.unpack(str[start:end]) 02541 start = end 02542 end += 4 02543 (length,) = _struct_I.unpack(str[start:end]) 02544 self.trajectory_error_codes = [] 02545 for i in range(0, length): 02546 val1 = arm_navigation_msgs.msg.ArmNavigationErrorCodes() 02547 start = end 02548 end += 4 02549 (val1.val,) = _struct_i.unpack(str[start:end]) 02550 self.trajectory_error_codes.append(val1) 02551 start = end 02552 end += 4 02553 (length,) = _struct_I.unpack(str[start:end]) 02554 self.contacts = [] 02555 for i in range(0, length): 02556 val1 = arm_navigation_msgs.msg.ContactInformation() 02557 _v193 = val1.header 02558 start = end 02559 end += 4 02560 (_v193.seq,) = _struct_I.unpack(str[start:end]) 02561 _v194 = _v193.stamp 02562 _x = _v194 02563 start = end 02564 end += 8 02565 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02566 start = end 02567 end += 4 02568 (length,) = _struct_I.unpack(str[start:end]) 02569 start = end 02570 end += length 02571 _v193.frame_id = str[start:end] 02572 _v195 = val1.position 02573 _x = _v195 02574 start = end 02575 end += 24 02576 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02577 _v196 = val1.normal 02578 _x = _v196 02579 start = end 02580 end += 24 02581 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 02582 start = end 02583 end += 8 02584 (val1.depth,) = _struct_d.unpack(str[start:end]) 02585 start = end 02586 end += 4 02587 (length,) = _struct_I.unpack(str[start:end]) 02588 start = end 02589 end += length 02590 val1.contact_body_1 = str[start:end] 02591 start = end 02592 end += 4 02593 (length,) = _struct_I.unpack(str[start:end]) 02594 start = end 02595 end += length 02596 val1.attached_body_1 = str[start:end] 02597 start = end 02598 end += 4 02599 (val1.body_type_1,) = _struct_I.unpack(str[start:end]) 02600 start = end 02601 end += 4 02602 (length,) = _struct_I.unpack(str[start:end]) 02603 start = end 02604 end += length 02605 val1.contact_body_2 = str[start:end] 02606 start = end 02607 end += 4 02608 (length,) = _struct_I.unpack(str[start:end]) 02609 start = end 02610 end += length 02611 val1.attached_body_2 = str[start:end] 02612 start = end 02613 end += 4 02614 (val1.body_type_2,) = _struct_I.unpack(str[start:end]) 02615 self.contacts.append(val1) 02616 return self 02617 except struct.error as e: 02618 raise roslib.message.DeserializationError(e) #most likely buffer underfill 02619 02620 _struct_I = roslib.message.struct_I 02621 _struct_i = struct.Struct("<i") 02622 _struct_2I = struct.Struct("<2I") 02623 _struct_d = struct.Struct("<d") 02624 _struct_3d = struct.Struct("<3d") 02625 class GetJointTrajectoryValidity(roslib.message.ServiceDefinition): 02626 _type = 'arm_navigation_msgs/GetJointTrajectoryValidity' 02627 _md5sum = '4e3f471462093adf968e2e6f6c2b6b2c' 02628 _request_class = GetJointTrajectoryValidityRequest 02629 _response_class = GetJointTrajectoryValidityResponse