$search
00001 """autogenerated by genmsg_py from GetKinematicSolverInfoRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetKinematicSolverInfoRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "kinematics_msgs/GetKinematicSolverInfoRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 """ 00013 __slots__ = [] 00014 _slot_types = [] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(GetKinematicSolverInfoRequest, self).__init__(*args, **kwds) 00032 00033 def _get_types(self): 00034 """ 00035 internal API method 00036 """ 00037 return self._slot_types 00038 00039 def serialize(self, buff): 00040 """ 00041 serialize message into buffer 00042 @param buff: buffer 00043 @type buff: StringIO 00044 """ 00045 try: 00046 pass 00047 except struct.error as se: self._check_types(se) 00048 except TypeError as te: self._check_types(te) 00049 00050 def deserialize(self, str): 00051 """ 00052 unpack serialized message in str into this message instance 00053 @param str: byte array of serialized message 00054 @type str: str 00055 """ 00056 try: 00057 end = 0 00058 return self 00059 except struct.error as e: 00060 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00061 00062 00063 def serialize_numpy(self, buff, numpy): 00064 """ 00065 serialize message with numpy array types into buffer 00066 @param buff: buffer 00067 @type buff: StringIO 00068 @param numpy: numpy python module 00069 @type numpy module 00070 """ 00071 try: 00072 pass 00073 except struct.error as se: self._check_types(se) 00074 except TypeError as te: self._check_types(te) 00075 00076 def deserialize_numpy(self, str, numpy): 00077 """ 00078 unpack serialized message in str into this message instance using numpy for array types 00079 @param str: byte array of serialized message 00080 @type str: str 00081 @param numpy: numpy python module 00082 @type numpy: module 00083 """ 00084 try: 00085 end = 0 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 _struct_I = roslib.message.struct_I 00091 """autogenerated by genmsg_py from GetKinematicSolverInfoResponse.msg. Do not edit.""" 00092 import roslib.message 00093 import struct 00094 00095 import arm_navigation_msgs.msg 00096 import kinematics_msgs.msg 00097 00098 class GetKinematicSolverInfoResponse(roslib.message.Message): 00099 _md5sum = "9b591d98efeb66095c1b33a70221cab5" 00100 _type = "kinematics_msgs/GetKinematicSolverInfoResponse" 00101 _has_header = False #flag to mark the presence of a Header object 00102 _full_text = """kinematics_msgs/KinematicSolverInfo kinematic_solver_info 00103 00104 ================================================================================ 00105 MSG: kinematics_msgs/KinematicSolverInfo 00106 # A list of joints in the kinematic tree 00107 string[] joint_names 00108 # A list of joint limits corresponding to the joint names 00109 arm_navigation_msgs/JointLimits[] limits 00110 # A list of links that the kinematics node provides solutions for 00111 string[] link_names 00112 00113 ================================================================================ 00114 MSG: arm_navigation_msgs/JointLimits 00115 # This message contains information about limits of a particular joint (or control dimension) 00116 string joint_name 00117 00118 # true if the joint has position limits 00119 bool has_position_limits 00120 00121 # min and max position limits 00122 float64 min_position 00123 float64 max_position 00124 00125 # true if joint has velocity limits 00126 bool has_velocity_limits 00127 00128 # max velocity limit 00129 float64 max_velocity 00130 # min_velocity is assumed to be -max_velocity 00131 00132 # true if joint has acceleration limits 00133 bool has_acceleration_limits 00134 # max acceleration limit 00135 float64 max_acceleration 00136 # min_acceleration is assumed to be -max_acceleration 00137 00138 """ 00139 __slots__ = ['kinematic_solver_info'] 00140 _slot_types = ['kinematics_msgs/KinematicSolverInfo'] 00141 00142 def __init__(self, *args, **kwds): 00143 """ 00144 Constructor. Any message fields that are implicitly/explicitly 00145 set to None will be assigned a default value. The recommend 00146 use is keyword arguments as this is more robust to future message 00147 changes. You cannot mix in-order arguments and keyword arguments. 00148 00149 The available fields are: 00150 kinematic_solver_info 00151 00152 @param args: complete set of field values, in .msg order 00153 @param kwds: use keyword arguments corresponding to message field names 00154 to set specific fields. 00155 """ 00156 if args or kwds: 00157 super(GetKinematicSolverInfoResponse, self).__init__(*args, **kwds) 00158 #message fields cannot be None, assign default values for those that are 00159 if self.kinematic_solver_info is None: 00160 self.kinematic_solver_info = kinematics_msgs.msg.KinematicSolverInfo() 00161 else: 00162 self.kinematic_solver_info = kinematics_msgs.msg.KinematicSolverInfo() 00163 00164 def _get_types(self): 00165 """ 00166 internal API method 00167 """ 00168 return self._slot_types 00169 00170 def serialize(self, buff): 00171 """ 00172 serialize message into buffer 00173 @param buff: buffer 00174 @type buff: StringIO 00175 """ 00176 try: 00177 length = len(self.kinematic_solver_info.joint_names) 00178 buff.write(_struct_I.pack(length)) 00179 for val1 in self.kinematic_solver_info.joint_names: 00180 length = len(val1) 00181 buff.write(struct.pack('<I%ss'%length, length, val1)) 00182 length = len(self.kinematic_solver_info.limits) 00183 buff.write(_struct_I.pack(length)) 00184 for val1 in self.kinematic_solver_info.limits: 00185 _x = val1.joint_name 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 _x = val1 00189 buff.write(_struct_B2dBdBd.pack(_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration)) 00190 length = len(self.kinematic_solver_info.link_names) 00191 buff.write(_struct_I.pack(length)) 00192 for val1 in self.kinematic_solver_info.link_names: 00193 length = len(val1) 00194 buff.write(struct.pack('<I%ss'%length, length, val1)) 00195 except struct.error as se: self._check_types(se) 00196 except TypeError as te: self._check_types(te) 00197 00198 def deserialize(self, str): 00199 """ 00200 unpack serialized message in str into this message instance 00201 @param str: byte array of serialized message 00202 @type str: str 00203 """ 00204 try: 00205 if self.kinematic_solver_info is None: 00206 self.kinematic_solver_info = kinematics_msgs.msg.KinematicSolverInfo() 00207 end = 0 00208 start = end 00209 end += 4 00210 (length,) = _struct_I.unpack(str[start:end]) 00211 self.kinematic_solver_info.joint_names = [] 00212 for i in range(0, length): 00213 start = end 00214 end += 4 00215 (length,) = _struct_I.unpack(str[start:end]) 00216 start = end 00217 end += length 00218 val1 = str[start:end] 00219 self.kinematic_solver_info.joint_names.append(val1) 00220 start = end 00221 end += 4 00222 (length,) = _struct_I.unpack(str[start:end]) 00223 self.kinematic_solver_info.limits = [] 00224 for i in range(0, length): 00225 val1 = arm_navigation_msgs.msg.JointLimits() 00226 start = end 00227 end += 4 00228 (length,) = _struct_I.unpack(str[start:end]) 00229 start = end 00230 end += length 00231 val1.joint_name = str[start:end] 00232 _x = val1 00233 start = end 00234 end += 35 00235 (_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration,) = _struct_B2dBdBd.unpack(str[start:end]) 00236 val1.has_position_limits = bool(val1.has_position_limits) 00237 val1.has_velocity_limits = bool(val1.has_velocity_limits) 00238 val1.has_acceleration_limits = bool(val1.has_acceleration_limits) 00239 self.kinematic_solver_info.limits.append(val1) 00240 start = end 00241 end += 4 00242 (length,) = _struct_I.unpack(str[start:end]) 00243 self.kinematic_solver_info.link_names = [] 00244 for i in range(0, length): 00245 start = end 00246 end += 4 00247 (length,) = _struct_I.unpack(str[start:end]) 00248 start = end 00249 end += length 00250 val1 = str[start:end] 00251 self.kinematic_solver_info.link_names.append(val1) 00252 return self 00253 except struct.error as e: 00254 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00255 00256 00257 def serialize_numpy(self, buff, numpy): 00258 """ 00259 serialize message with numpy array types into buffer 00260 @param buff: buffer 00261 @type buff: StringIO 00262 @param numpy: numpy python module 00263 @type numpy module 00264 """ 00265 try: 00266 length = len(self.kinematic_solver_info.joint_names) 00267 buff.write(_struct_I.pack(length)) 00268 for val1 in self.kinematic_solver_info.joint_names: 00269 length = len(val1) 00270 buff.write(struct.pack('<I%ss'%length, length, val1)) 00271 length = len(self.kinematic_solver_info.limits) 00272 buff.write(_struct_I.pack(length)) 00273 for val1 in self.kinematic_solver_info.limits: 00274 _x = val1.joint_name 00275 length = len(_x) 00276 buff.write(struct.pack('<I%ss'%length, length, _x)) 00277 _x = val1 00278 buff.write(_struct_B2dBdBd.pack(_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration)) 00279 length = len(self.kinematic_solver_info.link_names) 00280 buff.write(_struct_I.pack(length)) 00281 for val1 in self.kinematic_solver_info.link_names: 00282 length = len(val1) 00283 buff.write(struct.pack('<I%ss'%length, length, val1)) 00284 except struct.error as se: self._check_types(se) 00285 except TypeError as te: self._check_types(te) 00286 00287 def deserialize_numpy(self, str, numpy): 00288 """ 00289 unpack serialized message in str into this message instance using numpy for array types 00290 @param str: byte array of serialized message 00291 @type str: str 00292 @param numpy: numpy python module 00293 @type numpy: module 00294 """ 00295 try: 00296 if self.kinematic_solver_info is None: 00297 self.kinematic_solver_info = kinematics_msgs.msg.KinematicSolverInfo() 00298 end = 0 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 self.kinematic_solver_info.joint_names = [] 00303 for i in range(0, length): 00304 start = end 00305 end += 4 00306 (length,) = _struct_I.unpack(str[start:end]) 00307 start = end 00308 end += length 00309 val1 = str[start:end] 00310 self.kinematic_solver_info.joint_names.append(val1) 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 self.kinematic_solver_info.limits = [] 00315 for i in range(0, length): 00316 val1 = arm_navigation_msgs.msg.JointLimits() 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 val1.joint_name = str[start:end] 00323 _x = val1 00324 start = end 00325 end += 35 00326 (_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration,) = _struct_B2dBdBd.unpack(str[start:end]) 00327 val1.has_position_limits = bool(val1.has_position_limits) 00328 val1.has_velocity_limits = bool(val1.has_velocity_limits) 00329 val1.has_acceleration_limits = bool(val1.has_acceleration_limits) 00330 self.kinematic_solver_info.limits.append(val1) 00331 start = end 00332 end += 4 00333 (length,) = _struct_I.unpack(str[start:end]) 00334 self.kinematic_solver_info.link_names = [] 00335 for i in range(0, length): 00336 start = end 00337 end += 4 00338 (length,) = _struct_I.unpack(str[start:end]) 00339 start = end 00340 end += length 00341 val1 = str[start:end] 00342 self.kinematic_solver_info.link_names.append(val1) 00343 return self 00344 except struct.error as e: 00345 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00346 00347 _struct_I = roslib.message.struct_I 00348 _struct_B2dBdBd = struct.Struct("<B2dBdBd") 00349 class GetKinematicSolverInfo(roslib.message.ServiceDefinition): 00350 _type = 'kinematics_msgs/GetKinematicSolverInfo' 00351 _md5sum = '9b591d98efeb66095c1b33a70221cab5' 00352 _request_class = GetKinematicSolverInfoRequest 00353 _response_class = GetKinematicSolverInfoResponse