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


kinematics_msgs
Author(s): Sachin Chitta
autogenerated on Mon Dec 2 2013 12:32:53