00001 """autogenerated by genmsg_py from KinematicSolverInfo.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import motion_planning_msgs.msg
00006
00007 class KinematicSolverInfo(roslib.message.Message):
00008 _md5sum = "a90a53667d3b432ff157e1d9f6f2b207"
00009 _type = "kinematics_msgs/KinematicSolverInfo"
00010 _has_header = False
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 motion_planning_msgs/JointLimits[] limits
00015 # A list of links that the kinematics node provides solutions for
00016 string[] link_names
00017
00018 ================================================================================
00019 MSG: motion_planning_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 uint8 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 uint8 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 uint8 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[]','motion_planning_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
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, se: self._check_types(se)
00107 except TypeError, 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 xrange(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 xrange(0, length):
00134 val1 = motion_planning_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 self.limits.append(val1)
00146 start = end
00147 end += 4
00148 (length,) = _struct_I.unpack(str[start:end])
00149 self.link_names = []
00150 for i in xrange(0, length):
00151 start = end
00152 end += 4
00153 (length,) = _struct_I.unpack(str[start:end])
00154 start = end
00155 end += length
00156 val1 = str[start:end]
00157 self.link_names.append(val1)
00158 return self
00159 except struct.error, e:
00160 raise roslib.message.DeserializationError(e)
00161
00162
00163 def serialize_numpy(self, buff, numpy):
00164 """
00165 serialize message with numpy array types into buffer
00166 @param buff: buffer
00167 @type buff: StringIO
00168 @param numpy: numpy python module
00169 @type numpy module
00170 """
00171 try:
00172 length = len(self.joint_names)
00173 buff.write(_struct_I.pack(length))
00174 for val1 in self.joint_names:
00175 length = len(val1)
00176 buff.write(struct.pack('<I%ss'%length, length, val1))
00177 length = len(self.limits)
00178 buff.write(_struct_I.pack(length))
00179 for val1 in self.limits:
00180 _x = val1.joint_name
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 _x = val1
00184 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))
00185 length = len(self.link_names)
00186 buff.write(_struct_I.pack(length))
00187 for val1 in self.link_names:
00188 length = len(val1)
00189 buff.write(struct.pack('<I%ss'%length, length, val1))
00190 except struct.error, se: self._check_types(se)
00191 except TypeError, te: self._check_types(te)
00192
00193 def deserialize_numpy(self, str, numpy):
00194 """
00195 unpack serialized message in str into this message instance using numpy for array types
00196 @param str: byte array of serialized message
00197 @type str: str
00198 @param numpy: numpy python module
00199 @type numpy: module
00200 """
00201 try:
00202 end = 0
00203 start = end
00204 end += 4
00205 (length,) = _struct_I.unpack(str[start:end])
00206 self.joint_names = []
00207 for i in xrange(0, length):
00208 start = end
00209 end += 4
00210 (length,) = _struct_I.unpack(str[start:end])
00211 start = end
00212 end += length
00213 val1 = str[start:end]
00214 self.joint_names.append(val1)
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 self.limits = []
00219 for i in xrange(0, length):
00220 val1 = motion_planning_msgs.msg.JointLimits()
00221 start = end
00222 end += 4
00223 (length,) = _struct_I.unpack(str[start:end])
00224 start = end
00225 end += length
00226 val1.joint_name = str[start:end]
00227 _x = val1
00228 start = end
00229 end += 35
00230 (_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])
00231 self.limits.append(val1)
00232 start = end
00233 end += 4
00234 (length,) = _struct_I.unpack(str[start:end])
00235 self.link_names = []
00236 for i in xrange(0, length):
00237 start = end
00238 end += 4
00239 (length,) = _struct_I.unpack(str[start:end])
00240 start = end
00241 end += length
00242 val1 = str[start:end]
00243 self.link_names.append(val1)
00244 return self
00245 except struct.error, e:
00246 raise roslib.message.DeserializationError(e)
00247
00248 _struct_I = roslib.message.struct_I
00249 _struct_B2dBdBd = struct.Struct("<B2dBdBd")