$search
00001 """autogenerated by genmsg_py from GetFreePathRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import arm_navigation_msgs.msg 00006 import geometry_msgs.msg 00007 import std_msgs.msg 00008 import roslib.rostime 00009 import sensor_msgs.msg 00010 00011 class GetFreePathRequest(roslib.message.Message): 00012 _md5sum = "23e0e254ce49bb298446221648a76af8" 00013 _type = "collision_proximity_planner/GetFreePathRequest" 00014 _has_header = False #flag to mark the presence of a Header object 00015 _full_text = """ 00016 arm_navigation_msgs/RobotState robot_state 00017 00018 ================================================================================ 00019 MSG: arm_navigation_msgs/RobotState 00020 # This message contains information about the robot state, i.e. the positions of its joints and links 00021 sensor_msgs/JointState joint_state 00022 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state 00023 00024 ================================================================================ 00025 MSG: sensor_msgs/JointState 00026 # This is a message that holds data to describe the state of a set of torque controlled joints. 00027 # 00028 # The state of each joint (revolute or prismatic) is defined by: 00029 # * the position of the joint (rad or m), 00030 # * the velocity of the joint (rad/s or m/s) and 00031 # * the effort that is applied in the joint (Nm or N). 00032 # 00033 # Each joint is uniquely identified by its name 00034 # The header specifies the time at which the joint states were recorded. All the joint states 00035 # in one message have to be recorded at the same time. 00036 # 00037 # This message consists of a multiple arrays, one for each part of the joint state. 00038 # The goal is to make each of the fields optional. When e.g. your joints have no 00039 # effort associated with them, you can leave the effort array empty. 00040 # 00041 # All arrays in this message should have the same size, or be empty. 00042 # This is the only way to uniquely associate the joint name with the correct 00043 # states. 00044 00045 00046 Header header 00047 00048 string[] name 00049 float64[] position 00050 float64[] velocity 00051 float64[] effort 00052 00053 ================================================================================ 00054 MSG: std_msgs/Header 00055 # Standard metadata for higher-level stamped data types. 00056 # This is generally used to communicate timestamped data 00057 # in a particular coordinate frame. 00058 # 00059 # sequence ID: consecutively increasing ID 00060 uint32 seq 00061 #Two-integer timestamp that is expressed as: 00062 # * stamp.secs: seconds (stamp_secs) since epoch 00063 # * stamp.nsecs: nanoseconds since stamp_secs 00064 # time-handling sugar is provided by the client library 00065 time stamp 00066 #Frame this data is associated with 00067 # 0: no frame 00068 # 1: global frame 00069 string frame_id 00070 00071 ================================================================================ 00072 MSG: arm_navigation_msgs/MultiDOFJointState 00073 #A representation of a multi-dof joint state 00074 time stamp 00075 string[] joint_names 00076 string[] frame_ids 00077 string[] child_frame_ids 00078 geometry_msgs/Pose[] poses 00079 00080 ================================================================================ 00081 MSG: geometry_msgs/Pose 00082 # A representation of pose in free space, composed of postion and orientation. 00083 Point position 00084 Quaternion orientation 00085 00086 ================================================================================ 00087 MSG: geometry_msgs/Point 00088 # This contains the position of a point in free space 00089 float64 x 00090 float64 y 00091 float64 z 00092 00093 ================================================================================ 00094 MSG: geometry_msgs/Quaternion 00095 # This represents an orientation in free space in quaternion form. 00096 00097 float64 x 00098 float64 y 00099 float64 z 00100 float64 w 00101 00102 """ 00103 __slots__ = ['robot_state'] 00104 _slot_types = ['arm_navigation_msgs/RobotState'] 00105 00106 def __init__(self, *args, **kwds): 00107 """ 00108 Constructor. Any message fields that are implicitly/explicitly 00109 set to None will be assigned a default value. The recommend 00110 use is keyword arguments as this is more robust to future message 00111 changes. You cannot mix in-order arguments and keyword arguments. 00112 00113 The available fields are: 00114 robot_state 00115 00116 @param args: complete set of field values, in .msg order 00117 @param kwds: use keyword arguments corresponding to message field names 00118 to set specific fields. 00119 """ 00120 if args or kwds: 00121 super(GetFreePathRequest, self).__init__(*args, **kwds) 00122 #message fields cannot be None, assign default values for those that are 00123 if self.robot_state is None: 00124 self.robot_state = arm_navigation_msgs.msg.RobotState() 00125 else: 00126 self.robot_state = arm_navigation_msgs.msg.RobotState() 00127 00128 def _get_types(self): 00129 """ 00130 internal API method 00131 """ 00132 return self._slot_types 00133 00134 def serialize(self, buff): 00135 """ 00136 serialize message into buffer 00137 @param buff: buffer 00138 @type buff: StringIO 00139 """ 00140 try: 00141 _x = self 00142 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)) 00143 _x = self.robot_state.joint_state.header.frame_id 00144 length = len(_x) 00145 buff.write(struct.pack('<I%ss'%length, length, _x)) 00146 length = len(self.robot_state.joint_state.name) 00147 buff.write(_struct_I.pack(length)) 00148 for val1 in self.robot_state.joint_state.name: 00149 length = len(val1) 00150 buff.write(struct.pack('<I%ss'%length, length, val1)) 00151 length = len(self.robot_state.joint_state.position) 00152 buff.write(_struct_I.pack(length)) 00153 pattern = '<%sd'%length 00154 buff.write(struct.pack(pattern, *self.robot_state.joint_state.position)) 00155 length = len(self.robot_state.joint_state.velocity) 00156 buff.write(_struct_I.pack(length)) 00157 pattern = '<%sd'%length 00158 buff.write(struct.pack(pattern, *self.robot_state.joint_state.velocity)) 00159 length = len(self.robot_state.joint_state.effort) 00160 buff.write(_struct_I.pack(length)) 00161 pattern = '<%sd'%length 00162 buff.write(struct.pack(pattern, *self.robot_state.joint_state.effort)) 00163 _x = self 00164 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs)) 00165 length = len(self.robot_state.multi_dof_joint_state.joint_names) 00166 buff.write(_struct_I.pack(length)) 00167 for val1 in self.robot_state.multi_dof_joint_state.joint_names: 00168 length = len(val1) 00169 buff.write(struct.pack('<I%ss'%length, length, val1)) 00170 length = len(self.robot_state.multi_dof_joint_state.frame_ids) 00171 buff.write(_struct_I.pack(length)) 00172 for val1 in self.robot_state.multi_dof_joint_state.frame_ids: 00173 length = len(val1) 00174 buff.write(struct.pack('<I%ss'%length, length, val1)) 00175 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids) 00176 buff.write(_struct_I.pack(length)) 00177 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids: 00178 length = len(val1) 00179 buff.write(struct.pack('<I%ss'%length, length, val1)) 00180 length = len(self.robot_state.multi_dof_joint_state.poses) 00181 buff.write(_struct_I.pack(length)) 00182 for val1 in self.robot_state.multi_dof_joint_state.poses: 00183 _v1 = val1.position 00184 _x = _v1 00185 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00186 _v2 = val1.orientation 00187 _x = _v2 00188 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00189 except struct.error as se: self._check_types(se) 00190 except TypeError as te: self._check_types(te) 00191 00192 def deserialize(self, str): 00193 """ 00194 unpack serialized message in str into this message instance 00195 @param str: byte array of serialized message 00196 @type str: str 00197 """ 00198 try: 00199 if self.robot_state is None: 00200 self.robot_state = arm_navigation_msgs.msg.RobotState() 00201 end = 0 00202 _x = self 00203 start = end 00204 end += 12 00205 (_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]) 00206 start = end 00207 end += 4 00208 (length,) = _struct_I.unpack(str[start:end]) 00209 start = end 00210 end += length 00211 self.robot_state.joint_state.header.frame_id = str[start:end] 00212 start = end 00213 end += 4 00214 (length,) = _struct_I.unpack(str[start:end]) 00215 self.robot_state.joint_state.name = [] 00216 for i in range(0, length): 00217 start = end 00218 end += 4 00219 (length,) = _struct_I.unpack(str[start:end]) 00220 start = end 00221 end += length 00222 val1 = str[start:end] 00223 self.robot_state.joint_state.name.append(val1) 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 pattern = '<%sd'%length 00228 start = end 00229 end += struct.calcsize(pattern) 00230 self.robot_state.joint_state.position = struct.unpack(pattern, str[start:end]) 00231 start = end 00232 end += 4 00233 (length,) = _struct_I.unpack(str[start:end]) 00234 pattern = '<%sd'%length 00235 start = end 00236 end += struct.calcsize(pattern) 00237 self.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) 00238 start = end 00239 end += 4 00240 (length,) = _struct_I.unpack(str[start:end]) 00241 pattern = '<%sd'%length 00242 start = end 00243 end += struct.calcsize(pattern) 00244 self.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end]) 00245 _x = self 00246 start = end 00247 end += 8 00248 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 self.robot_state.multi_dof_joint_state.joint_names = [] 00253 for i in range(0, length): 00254 start = end 00255 end += 4 00256 (length,) = _struct_I.unpack(str[start:end]) 00257 start = end 00258 end += length 00259 val1 = str[start:end] 00260 self.robot_state.multi_dof_joint_state.joint_names.append(val1) 00261 start = end 00262 end += 4 00263 (length,) = _struct_I.unpack(str[start:end]) 00264 self.robot_state.multi_dof_joint_state.frame_ids = [] 00265 for i in range(0, length): 00266 start = end 00267 end += 4 00268 (length,) = _struct_I.unpack(str[start:end]) 00269 start = end 00270 end += length 00271 val1 = str[start:end] 00272 self.robot_state.multi_dof_joint_state.frame_ids.append(val1) 00273 start = end 00274 end += 4 00275 (length,) = _struct_I.unpack(str[start:end]) 00276 self.robot_state.multi_dof_joint_state.child_frame_ids = [] 00277 for i in range(0, length): 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 val1 = str[start:end] 00284 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 00285 start = end 00286 end += 4 00287 (length,) = _struct_I.unpack(str[start:end]) 00288 self.robot_state.multi_dof_joint_state.poses = [] 00289 for i in range(0, length): 00290 val1 = geometry_msgs.msg.Pose() 00291 _v3 = val1.position 00292 _x = _v3 00293 start = end 00294 end += 24 00295 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00296 _v4 = val1.orientation 00297 _x = _v4 00298 start = end 00299 end += 32 00300 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00301 self.robot_state.multi_dof_joint_state.poses.append(val1) 00302 return self 00303 except struct.error as e: 00304 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00305 00306 00307 def serialize_numpy(self, buff, numpy): 00308 """ 00309 serialize message with numpy array types into buffer 00310 @param buff: buffer 00311 @type buff: StringIO 00312 @param numpy: numpy python module 00313 @type numpy module 00314 """ 00315 try: 00316 _x = self 00317 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)) 00318 _x = self.robot_state.joint_state.header.frame_id 00319 length = len(_x) 00320 buff.write(struct.pack('<I%ss'%length, length, _x)) 00321 length = len(self.robot_state.joint_state.name) 00322 buff.write(_struct_I.pack(length)) 00323 for val1 in self.robot_state.joint_state.name: 00324 length = len(val1) 00325 buff.write(struct.pack('<I%ss'%length, length, val1)) 00326 length = len(self.robot_state.joint_state.position) 00327 buff.write(_struct_I.pack(length)) 00328 pattern = '<%sd'%length 00329 buff.write(self.robot_state.joint_state.position.tostring()) 00330 length = len(self.robot_state.joint_state.velocity) 00331 buff.write(_struct_I.pack(length)) 00332 pattern = '<%sd'%length 00333 buff.write(self.robot_state.joint_state.velocity.tostring()) 00334 length = len(self.robot_state.joint_state.effort) 00335 buff.write(_struct_I.pack(length)) 00336 pattern = '<%sd'%length 00337 buff.write(self.robot_state.joint_state.effort.tostring()) 00338 _x = self 00339 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs)) 00340 length = len(self.robot_state.multi_dof_joint_state.joint_names) 00341 buff.write(_struct_I.pack(length)) 00342 for val1 in self.robot_state.multi_dof_joint_state.joint_names: 00343 length = len(val1) 00344 buff.write(struct.pack('<I%ss'%length, length, val1)) 00345 length = len(self.robot_state.multi_dof_joint_state.frame_ids) 00346 buff.write(_struct_I.pack(length)) 00347 for val1 in self.robot_state.multi_dof_joint_state.frame_ids: 00348 length = len(val1) 00349 buff.write(struct.pack('<I%ss'%length, length, val1)) 00350 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids) 00351 buff.write(_struct_I.pack(length)) 00352 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids: 00353 length = len(val1) 00354 buff.write(struct.pack('<I%ss'%length, length, val1)) 00355 length = len(self.robot_state.multi_dof_joint_state.poses) 00356 buff.write(_struct_I.pack(length)) 00357 for val1 in self.robot_state.multi_dof_joint_state.poses: 00358 _v5 = val1.position 00359 _x = _v5 00360 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00361 _v6 = val1.orientation 00362 _x = _v6 00363 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00364 except struct.error as se: self._check_types(se) 00365 except TypeError as te: self._check_types(te) 00366 00367 def deserialize_numpy(self, str, numpy): 00368 """ 00369 unpack serialized message in str into this message instance using numpy for array types 00370 @param str: byte array of serialized message 00371 @type str: str 00372 @param numpy: numpy python module 00373 @type numpy: module 00374 """ 00375 try: 00376 if self.robot_state is None: 00377 self.robot_state = arm_navigation_msgs.msg.RobotState() 00378 end = 0 00379 _x = self 00380 start = end 00381 end += 12 00382 (_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]) 00383 start = end 00384 end += 4 00385 (length,) = _struct_I.unpack(str[start:end]) 00386 start = end 00387 end += length 00388 self.robot_state.joint_state.header.frame_id = str[start:end] 00389 start = end 00390 end += 4 00391 (length,) = _struct_I.unpack(str[start:end]) 00392 self.robot_state.joint_state.name = [] 00393 for i in range(0, length): 00394 start = end 00395 end += 4 00396 (length,) = _struct_I.unpack(str[start:end]) 00397 start = end 00398 end += length 00399 val1 = str[start:end] 00400 self.robot_state.joint_state.name.append(val1) 00401 start = end 00402 end += 4 00403 (length,) = _struct_I.unpack(str[start:end]) 00404 pattern = '<%sd'%length 00405 start = end 00406 end += struct.calcsize(pattern) 00407 self.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00408 start = end 00409 end += 4 00410 (length,) = _struct_I.unpack(str[start:end]) 00411 pattern = '<%sd'%length 00412 start = end 00413 end += struct.calcsize(pattern) 00414 self.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00415 start = end 00416 end += 4 00417 (length,) = _struct_I.unpack(str[start:end]) 00418 pattern = '<%sd'%length 00419 start = end 00420 end += struct.calcsize(pattern) 00421 self.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00422 _x = self 00423 start = end 00424 end += 8 00425 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00426 start = end 00427 end += 4 00428 (length,) = _struct_I.unpack(str[start:end]) 00429 self.robot_state.multi_dof_joint_state.joint_names = [] 00430 for i in range(0, length): 00431 start = end 00432 end += 4 00433 (length,) = _struct_I.unpack(str[start:end]) 00434 start = end 00435 end += length 00436 val1 = str[start:end] 00437 self.robot_state.multi_dof_joint_state.joint_names.append(val1) 00438 start = end 00439 end += 4 00440 (length,) = _struct_I.unpack(str[start:end]) 00441 self.robot_state.multi_dof_joint_state.frame_ids = [] 00442 for i in range(0, length): 00443 start = end 00444 end += 4 00445 (length,) = _struct_I.unpack(str[start:end]) 00446 start = end 00447 end += length 00448 val1 = str[start:end] 00449 self.robot_state.multi_dof_joint_state.frame_ids.append(val1) 00450 start = end 00451 end += 4 00452 (length,) = _struct_I.unpack(str[start:end]) 00453 self.robot_state.multi_dof_joint_state.child_frame_ids = [] 00454 for i in range(0, length): 00455 start = end 00456 end += 4 00457 (length,) = _struct_I.unpack(str[start:end]) 00458 start = end 00459 end += length 00460 val1 = str[start:end] 00461 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1) 00462 start = end 00463 end += 4 00464 (length,) = _struct_I.unpack(str[start:end]) 00465 self.robot_state.multi_dof_joint_state.poses = [] 00466 for i in range(0, length): 00467 val1 = geometry_msgs.msg.Pose() 00468 _v7 = val1.position 00469 _x = _v7 00470 start = end 00471 end += 24 00472 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00473 _v8 = val1.orientation 00474 _x = _v8 00475 start = end 00476 end += 32 00477 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00478 self.robot_state.multi_dof_joint_state.poses.append(val1) 00479 return self 00480 except struct.error as e: 00481 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00482 00483 _struct_I = roslib.message.struct_I 00484 _struct_4d = struct.Struct("<4d") 00485 _struct_3I = struct.Struct("<3I") 00486 _struct_2I = struct.Struct("<2I") 00487 _struct_3d = struct.Struct("<3d") 00488 """autogenerated by genmsg_py from GetFreePathResponse.msg. Do not edit.""" 00489 import roslib.message 00490 import struct 00491 00492 import arm_navigation_msgs.msg 00493 import trajectory_msgs.msg 00494 import geometry_msgs.msg 00495 import roslib.rostime 00496 import std_msgs.msg 00497 00498 class GetFreePathResponse(roslib.message.Message): 00499 _md5sum = "6366bd72f32fa5d9429f90aac9082227" 00500 _type = "collision_proximity_planner/GetFreePathResponse" 00501 _has_header = False #flag to mark the presence of a Header object 00502 _full_text = """arm_navigation_msgs/RobotTrajectory robot_trajectory 00503 00504 00505 ================================================================================ 00506 MSG: arm_navigation_msgs/RobotTrajectory 00507 trajectory_msgs/JointTrajectory joint_trajectory 00508 arm_navigation_msgs/MultiDOFJointTrajectory multi_dof_joint_trajectory 00509 00510 ================================================================================ 00511 MSG: trajectory_msgs/JointTrajectory 00512 Header header 00513 string[] joint_names 00514 JointTrajectoryPoint[] points 00515 ================================================================================ 00516 MSG: std_msgs/Header 00517 # Standard metadata for higher-level stamped data types. 00518 # This is generally used to communicate timestamped data 00519 # in a particular coordinate frame. 00520 # 00521 # sequence ID: consecutively increasing ID 00522 uint32 seq 00523 #Two-integer timestamp that is expressed as: 00524 # * stamp.secs: seconds (stamp_secs) since epoch 00525 # * stamp.nsecs: nanoseconds since stamp_secs 00526 # time-handling sugar is provided by the client library 00527 time stamp 00528 #Frame this data is associated with 00529 # 0: no frame 00530 # 1: global frame 00531 string frame_id 00532 00533 ================================================================================ 00534 MSG: trajectory_msgs/JointTrajectoryPoint 00535 float64[] positions 00536 float64[] velocities 00537 float64[] accelerations 00538 duration time_from_start 00539 ================================================================================ 00540 MSG: arm_navigation_msgs/MultiDOFJointTrajectory 00541 #A representation of a multi-dof joint trajectory 00542 duration stamp 00543 string[] joint_names 00544 string[] frame_ids 00545 string[] child_frame_ids 00546 MultiDOFJointTrajectoryPoint[] points 00547 00548 ================================================================================ 00549 MSG: arm_navigation_msgs/MultiDOFJointTrajectoryPoint 00550 geometry_msgs/Pose[] poses 00551 duration time_from_start 00552 ================================================================================ 00553 MSG: geometry_msgs/Pose 00554 # A representation of pose in free space, composed of postion and orientation. 00555 Point position 00556 Quaternion orientation 00557 00558 ================================================================================ 00559 MSG: geometry_msgs/Point 00560 # This contains the position of a point in free space 00561 float64 x 00562 float64 y 00563 float64 z 00564 00565 ================================================================================ 00566 MSG: geometry_msgs/Quaternion 00567 # This represents an orientation in free space in quaternion form. 00568 00569 float64 x 00570 float64 y 00571 float64 z 00572 float64 w 00573 00574 """ 00575 __slots__ = ['robot_trajectory'] 00576 _slot_types = ['arm_navigation_msgs/RobotTrajectory'] 00577 00578 def __init__(self, *args, **kwds): 00579 """ 00580 Constructor. Any message fields that are implicitly/explicitly 00581 set to None will be assigned a default value. The recommend 00582 use is keyword arguments as this is more robust to future message 00583 changes. You cannot mix in-order arguments and keyword arguments. 00584 00585 The available fields are: 00586 robot_trajectory 00587 00588 @param args: complete set of field values, in .msg order 00589 @param kwds: use keyword arguments corresponding to message field names 00590 to set specific fields. 00591 """ 00592 if args or kwds: 00593 super(GetFreePathResponse, self).__init__(*args, **kwds) 00594 #message fields cannot be None, assign default values for those that are 00595 if self.robot_trajectory is None: 00596 self.robot_trajectory = arm_navigation_msgs.msg.RobotTrajectory() 00597 else: 00598 self.robot_trajectory = arm_navigation_msgs.msg.RobotTrajectory() 00599 00600 def _get_types(self): 00601 """ 00602 internal API method 00603 """ 00604 return self._slot_types 00605 00606 def serialize(self, buff): 00607 """ 00608 serialize message into buffer 00609 @param buff: buffer 00610 @type buff: StringIO 00611 """ 00612 try: 00613 _x = self 00614 buff.write(_struct_3I.pack(_x.robot_trajectory.joint_trajectory.header.seq, _x.robot_trajectory.joint_trajectory.header.stamp.secs, _x.robot_trajectory.joint_trajectory.header.stamp.nsecs)) 00615 _x = self.robot_trajectory.joint_trajectory.header.frame_id 00616 length = len(_x) 00617 buff.write(struct.pack('<I%ss'%length, length, _x)) 00618 length = len(self.robot_trajectory.joint_trajectory.joint_names) 00619 buff.write(_struct_I.pack(length)) 00620 for val1 in self.robot_trajectory.joint_trajectory.joint_names: 00621 length = len(val1) 00622 buff.write(struct.pack('<I%ss'%length, length, val1)) 00623 length = len(self.robot_trajectory.joint_trajectory.points) 00624 buff.write(_struct_I.pack(length)) 00625 for val1 in self.robot_trajectory.joint_trajectory.points: 00626 length = len(val1.positions) 00627 buff.write(_struct_I.pack(length)) 00628 pattern = '<%sd'%length 00629 buff.write(struct.pack(pattern, *val1.positions)) 00630 length = len(val1.velocities) 00631 buff.write(_struct_I.pack(length)) 00632 pattern = '<%sd'%length 00633 buff.write(struct.pack(pattern, *val1.velocities)) 00634 length = len(val1.accelerations) 00635 buff.write(_struct_I.pack(length)) 00636 pattern = '<%sd'%length 00637 buff.write(struct.pack(pattern, *val1.accelerations)) 00638 _v9 = val1.time_from_start 00639 _x = _v9 00640 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00641 _x = self 00642 buff.write(_struct_2i.pack(_x.robot_trajectory.multi_dof_joint_trajectory.stamp.secs, _x.robot_trajectory.multi_dof_joint_trajectory.stamp.nsecs)) 00643 length = len(self.robot_trajectory.multi_dof_joint_trajectory.joint_names) 00644 buff.write(_struct_I.pack(length)) 00645 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.joint_names: 00646 length = len(val1) 00647 buff.write(struct.pack('<I%ss'%length, length, val1)) 00648 length = len(self.robot_trajectory.multi_dof_joint_trajectory.frame_ids) 00649 buff.write(_struct_I.pack(length)) 00650 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.frame_ids: 00651 length = len(val1) 00652 buff.write(struct.pack('<I%ss'%length, length, val1)) 00653 length = len(self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids) 00654 buff.write(_struct_I.pack(length)) 00655 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids: 00656 length = len(val1) 00657 buff.write(struct.pack('<I%ss'%length, length, val1)) 00658 length = len(self.robot_trajectory.multi_dof_joint_trajectory.points) 00659 buff.write(_struct_I.pack(length)) 00660 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.points: 00661 length = len(val1.poses) 00662 buff.write(_struct_I.pack(length)) 00663 for val2 in val1.poses: 00664 _v10 = val2.position 00665 _x = _v10 00666 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00667 _v11 = val2.orientation 00668 _x = _v11 00669 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00670 _v12 = val1.time_from_start 00671 _x = _v12 00672 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00673 except struct.error as se: self._check_types(se) 00674 except TypeError as te: self._check_types(te) 00675 00676 def deserialize(self, str): 00677 """ 00678 unpack serialized message in str into this message instance 00679 @param str: byte array of serialized message 00680 @type str: str 00681 """ 00682 try: 00683 if self.robot_trajectory is None: 00684 self.robot_trajectory = arm_navigation_msgs.msg.RobotTrajectory() 00685 end = 0 00686 _x = self 00687 start = end 00688 end += 12 00689 (_x.robot_trajectory.joint_trajectory.header.seq, _x.robot_trajectory.joint_trajectory.header.stamp.secs, _x.robot_trajectory.joint_trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00690 start = end 00691 end += 4 00692 (length,) = _struct_I.unpack(str[start:end]) 00693 start = end 00694 end += length 00695 self.robot_trajectory.joint_trajectory.header.frame_id = str[start:end] 00696 start = end 00697 end += 4 00698 (length,) = _struct_I.unpack(str[start:end]) 00699 self.robot_trajectory.joint_trajectory.joint_names = [] 00700 for i in range(0, length): 00701 start = end 00702 end += 4 00703 (length,) = _struct_I.unpack(str[start:end]) 00704 start = end 00705 end += length 00706 val1 = str[start:end] 00707 self.robot_trajectory.joint_trajectory.joint_names.append(val1) 00708 start = end 00709 end += 4 00710 (length,) = _struct_I.unpack(str[start:end]) 00711 self.robot_trajectory.joint_trajectory.points = [] 00712 for i in range(0, length): 00713 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 00714 start = end 00715 end += 4 00716 (length,) = _struct_I.unpack(str[start:end]) 00717 pattern = '<%sd'%length 00718 start = end 00719 end += struct.calcsize(pattern) 00720 val1.positions = struct.unpack(pattern, str[start:end]) 00721 start = end 00722 end += 4 00723 (length,) = _struct_I.unpack(str[start:end]) 00724 pattern = '<%sd'%length 00725 start = end 00726 end += struct.calcsize(pattern) 00727 val1.velocities = struct.unpack(pattern, str[start:end]) 00728 start = end 00729 end += 4 00730 (length,) = _struct_I.unpack(str[start:end]) 00731 pattern = '<%sd'%length 00732 start = end 00733 end += struct.calcsize(pattern) 00734 val1.accelerations = struct.unpack(pattern, str[start:end]) 00735 _v13 = val1.time_from_start 00736 _x = _v13 00737 start = end 00738 end += 8 00739 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00740 self.robot_trajectory.joint_trajectory.points.append(val1) 00741 _x = self 00742 start = end 00743 end += 8 00744 (_x.robot_trajectory.multi_dof_joint_trajectory.stamp.secs, _x.robot_trajectory.multi_dof_joint_trajectory.stamp.nsecs,) = _struct_2i.unpack(str[start:end]) 00745 start = end 00746 end += 4 00747 (length,) = _struct_I.unpack(str[start:end]) 00748 self.robot_trajectory.multi_dof_joint_trajectory.joint_names = [] 00749 for i in range(0, length): 00750 start = end 00751 end += 4 00752 (length,) = _struct_I.unpack(str[start:end]) 00753 start = end 00754 end += length 00755 val1 = str[start:end] 00756 self.robot_trajectory.multi_dof_joint_trajectory.joint_names.append(val1) 00757 start = end 00758 end += 4 00759 (length,) = _struct_I.unpack(str[start:end]) 00760 self.robot_trajectory.multi_dof_joint_trajectory.frame_ids = [] 00761 for i in range(0, length): 00762 start = end 00763 end += 4 00764 (length,) = _struct_I.unpack(str[start:end]) 00765 start = end 00766 end += length 00767 val1 = str[start:end] 00768 self.robot_trajectory.multi_dof_joint_trajectory.frame_ids.append(val1) 00769 start = end 00770 end += 4 00771 (length,) = _struct_I.unpack(str[start:end]) 00772 self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids = [] 00773 for i in range(0, length): 00774 start = end 00775 end += 4 00776 (length,) = _struct_I.unpack(str[start:end]) 00777 start = end 00778 end += length 00779 val1 = str[start:end] 00780 self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids.append(val1) 00781 start = end 00782 end += 4 00783 (length,) = _struct_I.unpack(str[start:end]) 00784 self.robot_trajectory.multi_dof_joint_trajectory.points = [] 00785 for i in range(0, length): 00786 val1 = arm_navigation_msgs.msg.MultiDOFJointTrajectoryPoint() 00787 start = end 00788 end += 4 00789 (length,) = _struct_I.unpack(str[start:end]) 00790 val1.poses = [] 00791 for i in range(0, length): 00792 val2 = geometry_msgs.msg.Pose() 00793 _v14 = val2.position 00794 _x = _v14 00795 start = end 00796 end += 24 00797 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00798 _v15 = val2.orientation 00799 _x = _v15 00800 start = end 00801 end += 32 00802 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00803 val1.poses.append(val2) 00804 _v16 = val1.time_from_start 00805 _x = _v16 00806 start = end 00807 end += 8 00808 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00809 self.robot_trajectory.multi_dof_joint_trajectory.points.append(val1) 00810 return self 00811 except struct.error as e: 00812 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00813 00814 00815 def serialize_numpy(self, buff, numpy): 00816 """ 00817 serialize message with numpy array types into buffer 00818 @param buff: buffer 00819 @type buff: StringIO 00820 @param numpy: numpy python module 00821 @type numpy module 00822 """ 00823 try: 00824 _x = self 00825 buff.write(_struct_3I.pack(_x.robot_trajectory.joint_trajectory.header.seq, _x.robot_trajectory.joint_trajectory.header.stamp.secs, _x.robot_trajectory.joint_trajectory.header.stamp.nsecs)) 00826 _x = self.robot_trajectory.joint_trajectory.header.frame_id 00827 length = len(_x) 00828 buff.write(struct.pack('<I%ss'%length, length, _x)) 00829 length = len(self.robot_trajectory.joint_trajectory.joint_names) 00830 buff.write(_struct_I.pack(length)) 00831 for val1 in self.robot_trajectory.joint_trajectory.joint_names: 00832 length = len(val1) 00833 buff.write(struct.pack('<I%ss'%length, length, val1)) 00834 length = len(self.robot_trajectory.joint_trajectory.points) 00835 buff.write(_struct_I.pack(length)) 00836 for val1 in self.robot_trajectory.joint_trajectory.points: 00837 length = len(val1.positions) 00838 buff.write(_struct_I.pack(length)) 00839 pattern = '<%sd'%length 00840 buff.write(val1.positions.tostring()) 00841 length = len(val1.velocities) 00842 buff.write(_struct_I.pack(length)) 00843 pattern = '<%sd'%length 00844 buff.write(val1.velocities.tostring()) 00845 length = len(val1.accelerations) 00846 buff.write(_struct_I.pack(length)) 00847 pattern = '<%sd'%length 00848 buff.write(val1.accelerations.tostring()) 00849 _v17 = val1.time_from_start 00850 _x = _v17 00851 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00852 _x = self 00853 buff.write(_struct_2i.pack(_x.robot_trajectory.multi_dof_joint_trajectory.stamp.secs, _x.robot_trajectory.multi_dof_joint_trajectory.stamp.nsecs)) 00854 length = len(self.robot_trajectory.multi_dof_joint_trajectory.joint_names) 00855 buff.write(_struct_I.pack(length)) 00856 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.joint_names: 00857 length = len(val1) 00858 buff.write(struct.pack('<I%ss'%length, length, val1)) 00859 length = len(self.robot_trajectory.multi_dof_joint_trajectory.frame_ids) 00860 buff.write(_struct_I.pack(length)) 00861 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.frame_ids: 00862 length = len(val1) 00863 buff.write(struct.pack('<I%ss'%length, length, val1)) 00864 length = len(self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids) 00865 buff.write(_struct_I.pack(length)) 00866 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids: 00867 length = len(val1) 00868 buff.write(struct.pack('<I%ss'%length, length, val1)) 00869 length = len(self.robot_trajectory.multi_dof_joint_trajectory.points) 00870 buff.write(_struct_I.pack(length)) 00871 for val1 in self.robot_trajectory.multi_dof_joint_trajectory.points: 00872 length = len(val1.poses) 00873 buff.write(_struct_I.pack(length)) 00874 for val2 in val1.poses: 00875 _v18 = val2.position 00876 _x = _v18 00877 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00878 _v19 = val2.orientation 00879 _x = _v19 00880 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00881 _v20 = val1.time_from_start 00882 _x = _v20 00883 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00884 except struct.error as se: self._check_types(se) 00885 except TypeError as te: self._check_types(te) 00886 00887 def deserialize_numpy(self, str, numpy): 00888 """ 00889 unpack serialized message in str into this message instance using numpy for array types 00890 @param str: byte array of serialized message 00891 @type str: str 00892 @param numpy: numpy python module 00893 @type numpy: module 00894 """ 00895 try: 00896 if self.robot_trajectory is None: 00897 self.robot_trajectory = arm_navigation_msgs.msg.RobotTrajectory() 00898 end = 0 00899 _x = self 00900 start = end 00901 end += 12 00902 (_x.robot_trajectory.joint_trajectory.header.seq, _x.robot_trajectory.joint_trajectory.header.stamp.secs, _x.robot_trajectory.joint_trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00903 start = end 00904 end += 4 00905 (length,) = _struct_I.unpack(str[start:end]) 00906 start = end 00907 end += length 00908 self.robot_trajectory.joint_trajectory.header.frame_id = str[start:end] 00909 start = end 00910 end += 4 00911 (length,) = _struct_I.unpack(str[start:end]) 00912 self.robot_trajectory.joint_trajectory.joint_names = [] 00913 for i in range(0, length): 00914 start = end 00915 end += 4 00916 (length,) = _struct_I.unpack(str[start:end]) 00917 start = end 00918 end += length 00919 val1 = str[start:end] 00920 self.robot_trajectory.joint_trajectory.joint_names.append(val1) 00921 start = end 00922 end += 4 00923 (length,) = _struct_I.unpack(str[start:end]) 00924 self.robot_trajectory.joint_trajectory.points = [] 00925 for i in range(0, length): 00926 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 00927 start = end 00928 end += 4 00929 (length,) = _struct_I.unpack(str[start:end]) 00930 pattern = '<%sd'%length 00931 start = end 00932 end += struct.calcsize(pattern) 00933 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00934 start = end 00935 end += 4 00936 (length,) = _struct_I.unpack(str[start:end]) 00937 pattern = '<%sd'%length 00938 start = end 00939 end += struct.calcsize(pattern) 00940 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00941 start = end 00942 end += 4 00943 (length,) = _struct_I.unpack(str[start:end]) 00944 pattern = '<%sd'%length 00945 start = end 00946 end += struct.calcsize(pattern) 00947 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00948 _v21 = val1.time_from_start 00949 _x = _v21 00950 start = end 00951 end += 8 00952 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00953 self.robot_trajectory.joint_trajectory.points.append(val1) 00954 _x = self 00955 start = end 00956 end += 8 00957 (_x.robot_trajectory.multi_dof_joint_trajectory.stamp.secs, _x.robot_trajectory.multi_dof_joint_trajectory.stamp.nsecs,) = _struct_2i.unpack(str[start:end]) 00958 start = end 00959 end += 4 00960 (length,) = _struct_I.unpack(str[start:end]) 00961 self.robot_trajectory.multi_dof_joint_trajectory.joint_names = [] 00962 for i in range(0, length): 00963 start = end 00964 end += 4 00965 (length,) = _struct_I.unpack(str[start:end]) 00966 start = end 00967 end += length 00968 val1 = str[start:end] 00969 self.robot_trajectory.multi_dof_joint_trajectory.joint_names.append(val1) 00970 start = end 00971 end += 4 00972 (length,) = _struct_I.unpack(str[start:end]) 00973 self.robot_trajectory.multi_dof_joint_trajectory.frame_ids = [] 00974 for i in range(0, length): 00975 start = end 00976 end += 4 00977 (length,) = _struct_I.unpack(str[start:end]) 00978 start = end 00979 end += length 00980 val1 = str[start:end] 00981 self.robot_trajectory.multi_dof_joint_trajectory.frame_ids.append(val1) 00982 start = end 00983 end += 4 00984 (length,) = _struct_I.unpack(str[start:end]) 00985 self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids = [] 00986 for i in range(0, length): 00987 start = end 00988 end += 4 00989 (length,) = _struct_I.unpack(str[start:end]) 00990 start = end 00991 end += length 00992 val1 = str[start:end] 00993 self.robot_trajectory.multi_dof_joint_trajectory.child_frame_ids.append(val1) 00994 start = end 00995 end += 4 00996 (length,) = _struct_I.unpack(str[start:end]) 00997 self.robot_trajectory.multi_dof_joint_trajectory.points = [] 00998 for i in range(0, length): 00999 val1 = arm_navigation_msgs.msg.MultiDOFJointTrajectoryPoint() 01000 start = end 01001 end += 4 01002 (length,) = _struct_I.unpack(str[start:end]) 01003 val1.poses = [] 01004 for i in range(0, length): 01005 val2 = geometry_msgs.msg.Pose() 01006 _v22 = val2.position 01007 _x = _v22 01008 start = end 01009 end += 24 01010 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01011 _v23 = val2.orientation 01012 _x = _v23 01013 start = end 01014 end += 32 01015 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01016 val1.poses.append(val2) 01017 _v24 = val1.time_from_start 01018 _x = _v24 01019 start = end 01020 end += 8 01021 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 01022 self.robot_trajectory.multi_dof_joint_trajectory.points.append(val1) 01023 return self 01024 except struct.error as e: 01025 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01026 01027 _struct_I = roslib.message.struct_I 01028 _struct_4d = struct.Struct("<4d") 01029 _struct_3I = struct.Struct("<3I") 01030 _struct_2i = struct.Struct("<2i") 01031 _struct_3d = struct.Struct("<3d") 01032 class GetFreePath(roslib.message.ServiceDefinition): 01033 _type = 'collision_proximity_planner/GetFreePath' 01034 _md5sum = 'e5d8e6731173ba0b633eb5320faf8538' 01035 _request_class = GetFreePathRequest 01036 _response_class = GetFreePathResponse