$search
00001 """autogenerated by genmsg_py from KinematicSolverInfo.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import arm_navigation_msgs.msg 00006 00007 class KinematicSolverInfo(roslib.message.Message): 00008 _md5sum = "cc048557c0f9795c392dd80f8bb00489" 00009 _type = "kinematics_msgs/KinematicSolverInfo" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# A list of joints in the kinematic tree 00012 string[] joint_names 00013 # A list of joint limits corresponding to the joint names 00014 arm_navigation_msgs/JointLimits[] limits 00015 # A list of links that the kinematics node provides solutions for 00016 string[] link_names 00017 00018 ================================================================================ 00019 MSG: arm_navigation_msgs/JointLimits 00020 # This message contains information about limits of a particular joint (or control dimension) 00021 string joint_name 00022 00023 # true if the joint has position limits 00024 bool has_position_limits 00025 00026 # min and max position limits 00027 float64 min_position 00028 float64 max_position 00029 00030 # true if joint has velocity limits 00031 bool has_velocity_limits 00032 00033 # max velocity limit 00034 float64 max_velocity 00035 # min_velocity is assumed to be -max_velocity 00036 00037 # true if joint has acceleration limits 00038 bool has_acceleration_limits 00039 # max acceleration limit 00040 float64 max_acceleration 00041 # min_acceleration is assumed to be -max_acceleration 00042 00043 """ 00044 __slots__ = ['joint_names','limits','link_names'] 00045 _slot_types = ['string[]','arm_navigation_msgs/JointLimits[]','string[]'] 00046 00047 def __init__(self, *args, **kwds): 00048 """ 00049 Constructor. Any message fields that are implicitly/explicitly 00050 set to None will be assigned a default value. The recommend 00051 use is keyword arguments as this is more robust to future message 00052 changes. You cannot mix in-order arguments and keyword arguments. 00053 00054 The available fields are: 00055 joint_names,limits,link_names 00056 00057 @param args: complete set of field values, in .msg order 00058 @param kwds: use keyword arguments corresponding to message field names 00059 to set specific fields. 00060 """ 00061 if args or kwds: 00062 super(KinematicSolverInfo, self).__init__(*args, **kwds) 00063 #message fields cannot be None, assign default values for those that are 00064 if self.joint_names is None: 00065 self.joint_names = [] 00066 if self.limits is None: 00067 self.limits = [] 00068 if self.link_names is None: 00069 self.link_names = [] 00070 else: 00071 self.joint_names = [] 00072 self.limits = [] 00073 self.link_names = [] 00074 00075 def _get_types(self): 00076 """ 00077 internal API method 00078 """ 00079 return self._slot_types 00080 00081 def serialize(self, buff): 00082 """ 00083 serialize message into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 """ 00087 try: 00088 length = len(self.joint_names) 00089 buff.write(_struct_I.pack(length)) 00090 for val1 in self.joint_names: 00091 length = len(val1) 00092 buff.write(struct.pack('<I%ss'%length, length, val1)) 00093 length = len(self.limits) 00094 buff.write(_struct_I.pack(length)) 00095 for val1 in self.limits: 00096 _x = val1.joint_name 00097 length = len(_x) 00098 buff.write(struct.pack('<I%ss'%length, length, _x)) 00099 _x = val1 00100 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)) 00101 length = len(self.link_names) 00102 buff.write(_struct_I.pack(length)) 00103 for val1 in self.link_names: 00104 length = len(val1) 00105 buff.write(struct.pack('<I%ss'%length, length, val1)) 00106 except struct.error as se: self._check_types(se) 00107 except TypeError as te: self._check_types(te) 00108 00109 def deserialize(self, str): 00110 """ 00111 unpack serialized message in str into this message instance 00112 @param str: byte array of serialized message 00113 @type str: str 00114 """ 00115 try: 00116 end = 0 00117 start = end 00118 end += 4 00119 (length,) = _struct_I.unpack(str[start:end]) 00120 self.joint_names = [] 00121 for i in range(0, length): 00122 start = end 00123 end += 4 00124 (length,) = _struct_I.unpack(str[start:end]) 00125 start = end 00126 end += length 00127 val1 = str[start:end] 00128 self.joint_names.append(val1) 00129 start = end 00130 end += 4 00131 (length,) = _struct_I.unpack(str[start:end]) 00132 self.limits = [] 00133 for i in range(0, length): 00134 val1 = arm_navigation_msgs.msg.JointLimits() 00135 start = end 00136 end += 4 00137 (length,) = _struct_I.unpack(str[start:end]) 00138 start = end 00139 end += length 00140 val1.joint_name = str[start:end] 00141 _x = val1 00142 start = end 00143 end += 35 00144 (_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]) 00145 val1.has_position_limits = bool(val1.has_position_limits) 00146 val1.has_velocity_limits = bool(val1.has_velocity_limits) 00147 val1.has_acceleration_limits = bool(val1.has_acceleration_limits) 00148 self.limits.append(val1) 00149 start = end 00150 end += 4 00151 (length,) = _struct_I.unpack(str[start:end]) 00152 self.link_names = [] 00153 for i in range(0, length): 00154 start = end 00155 end += 4 00156 (length,) = _struct_I.unpack(str[start:end]) 00157 start = end 00158 end += length 00159 val1 = str[start:end] 00160 self.link_names.append(val1) 00161 return self 00162 except struct.error as e: 00163 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00164 00165 00166 def serialize_numpy(self, buff, numpy): 00167 """ 00168 serialize message with numpy array types into buffer 00169 @param buff: buffer 00170 @type buff: StringIO 00171 @param numpy: numpy python module 00172 @type numpy module 00173 """ 00174 try: 00175 length = len(self.joint_names) 00176 buff.write(_struct_I.pack(length)) 00177 for val1 in self.joint_names: 00178 length = len(val1) 00179 buff.write(struct.pack('<I%ss'%length, length, val1)) 00180 length = len(self.limits) 00181 buff.write(_struct_I.pack(length)) 00182 for val1 in self.limits: 00183 _x = val1.joint_name 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 _x = val1 00187 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)) 00188 length = len(self.link_names) 00189 buff.write(_struct_I.pack(length)) 00190 for val1 in self.link_names: 00191 length = len(val1) 00192 buff.write(struct.pack('<I%ss'%length, length, val1)) 00193 except struct.error as se: self._check_types(se) 00194 except TypeError as te: self._check_types(te) 00195 00196 def deserialize_numpy(self, str, numpy): 00197 """ 00198 unpack serialized message in str into this message instance using numpy for array types 00199 @param str: byte array of serialized message 00200 @type str: str 00201 @param numpy: numpy python module 00202 @type numpy: module 00203 """ 00204 try: 00205 end = 0 00206 start = end 00207 end += 4 00208 (length,) = _struct_I.unpack(str[start:end]) 00209 self.joint_names = [] 00210 for i in range(0, length): 00211 start = end 00212 end += 4 00213 (length,) = _struct_I.unpack(str[start:end]) 00214 start = end 00215 end += length 00216 val1 = str[start:end] 00217 self.joint_names.append(val1) 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 self.limits = [] 00222 for i in range(0, length): 00223 val1 = arm_navigation_msgs.msg.JointLimits() 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 start = end 00228 end += length 00229 val1.joint_name = str[start:end] 00230 _x = val1 00231 start = end 00232 end += 35 00233 (_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]) 00234 val1.has_position_limits = bool(val1.has_position_limits) 00235 val1.has_velocity_limits = bool(val1.has_velocity_limits) 00236 val1.has_acceleration_limits = bool(val1.has_acceleration_limits) 00237 self.limits.append(val1) 00238 start = end 00239 end += 4 00240 (length,) = _struct_I.unpack(str[start:end]) 00241 self.link_names = [] 00242 for i in range(0, length): 00243 start = end 00244 end += 4 00245 (length,) = _struct_I.unpack(str[start:end]) 00246 start = end 00247 end += length 00248 val1 = str[start:end] 00249 self.link_names.append(val1) 00250 return self 00251 except struct.error as e: 00252 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00253 00254 _struct_I = roslib.message.struct_I 00255 _struct_B2dBdBd = struct.Struct("<B2dBdBd")