00001 """autogenerated by genpy from coverage_3d_tools/ReturnJointStatesRequest.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 ReturnJointStatesRequest(genpy.Message):
00009 _md5sum = "3f2d21c30868b92dc41a0431bacd47b2"
00010 _type = "coverage_3d_tools/ReturnJointStatesRequest"
00011 _has_header = False
00012 _full_text = """string[] name
00013
00014 """
00015 __slots__ = ['name']
00016 _slot_types = ['string[]']
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 name
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(ReturnJointStatesRequest, self).__init__(*args, **kwds)
00034
00035 if self.name is None:
00036 self.name = []
00037 else:
00038 self.name = []
00039
00040 def _get_types(self):
00041 """
00042 internal API method
00043 """
00044 return self._slot_types
00045
00046 def serialize(self, buff):
00047 """
00048 serialize message into buffer
00049 :param buff: buffer, ``StringIO``
00050 """
00051 try:
00052 length = len(self.name)
00053 buff.write(_struct_I.pack(length))
00054 for val1 in self.name:
00055 length = len(val1)
00056 if python3 or type(val1) == unicode:
00057 val1 = val1.encode('utf-8')
00058 length = len(val1)
00059 buff.write(struct.pack('<I%ss'%length, length, val1))
00060 except struct.error as se: self._check_types(se)
00061 except TypeError as te: self._check_types(te)
00062
00063 def deserialize(self, str):
00064 """
00065 unpack serialized message in str into this message instance
00066 :param str: byte array of serialized message, ``str``
00067 """
00068 try:
00069 end = 0
00070 start = end
00071 end += 4
00072 (length,) = _struct_I.unpack(str[start:end])
00073 self.name = []
00074 for i in range(0, length):
00075 start = end
00076 end += 4
00077 (length,) = _struct_I.unpack(str[start:end])
00078 start = end
00079 end += length
00080 if python3:
00081 val1 = str[start:end].decode('utf-8')
00082 else:
00083 val1 = str[start:end]
00084 self.name.append(val1)
00085 return self
00086 except struct.error as e:
00087 raise genpy.DeserializationError(e)
00088
00089
00090 def serialize_numpy(self, buff, numpy):
00091 """
00092 serialize message with numpy array types into buffer
00093 :param buff: buffer, ``StringIO``
00094 :param numpy: numpy python module
00095 """
00096 try:
00097 length = len(self.name)
00098 buff.write(_struct_I.pack(length))
00099 for val1 in self.name:
00100 length = len(val1)
00101 if python3 or type(val1) == unicode:
00102 val1 = val1.encode('utf-8')
00103 length = len(val1)
00104 buff.write(struct.pack('<I%ss'%length, length, val1))
00105 except struct.error as se: self._check_types(se)
00106 except TypeError as te: self._check_types(te)
00107
00108 def deserialize_numpy(self, str, numpy):
00109 """
00110 unpack serialized message in str into this message instance using numpy for array types
00111 :param str: byte array of serialized message, ``str``
00112 :param numpy: numpy python module
00113 """
00114 try:
00115 end = 0
00116 start = end
00117 end += 4
00118 (length,) = _struct_I.unpack(str[start:end])
00119 self.name = []
00120 for i in range(0, length):
00121 start = end
00122 end += 4
00123 (length,) = _struct_I.unpack(str[start:end])
00124 start = end
00125 end += length
00126 if python3:
00127 val1 = str[start:end].decode('utf-8')
00128 else:
00129 val1 = str[start:end]
00130 self.name.append(val1)
00131 return self
00132 except struct.error as e:
00133 raise genpy.DeserializationError(e)
00134
00135 _struct_I = genpy.struct_I
00136 """autogenerated by genpy from coverage_3d_tools/ReturnJointStatesResponse.msg. Do not edit."""
00137 import sys
00138 python3 = True if sys.hexversion > 0x03000000 else False
00139 import genpy
00140 import struct
00141
00142
00143 class ReturnJointStatesResponse(genpy.Message):
00144 _md5sum = "3a36649f5b1439b638a41d18af93e9a4"
00145 _type = "coverage_3d_tools/ReturnJointStatesResponse"
00146 _has_header = False
00147 _full_text = """uint32[] found
00148 float64[] position
00149 float64[] velocity
00150 float64[] effort
00151
00152 """
00153 __slots__ = ['found','position','velocity','effort']
00154 _slot_types = ['uint32[]','float64[]','float64[]','float64[]']
00155
00156 def __init__(self, *args, **kwds):
00157 """
00158 Constructor. Any message fields that are implicitly/explicitly
00159 set to None will be assigned a default value. The recommend
00160 use is keyword arguments as this is more robust to future message
00161 changes. You cannot mix in-order arguments and keyword arguments.
00162
00163 The available fields are:
00164 found,position,velocity,effort
00165
00166 :param args: complete set of field values, in .msg order
00167 :param kwds: use keyword arguments corresponding to message field names
00168 to set specific fields.
00169 """
00170 if args or kwds:
00171 super(ReturnJointStatesResponse, self).__init__(*args, **kwds)
00172
00173 if self.found is None:
00174 self.found = []
00175 if self.position is None:
00176 self.position = []
00177 if self.velocity is None:
00178 self.velocity = []
00179 if self.effort is None:
00180 self.effort = []
00181 else:
00182 self.found = []
00183 self.position = []
00184 self.velocity = []
00185 self.effort = []
00186
00187 def _get_types(self):
00188 """
00189 internal API method
00190 """
00191 return self._slot_types
00192
00193 def serialize(self, buff):
00194 """
00195 serialize message into buffer
00196 :param buff: buffer, ``StringIO``
00197 """
00198 try:
00199 length = len(self.found)
00200 buff.write(_struct_I.pack(length))
00201 pattern = '<%sI'%length
00202 buff.write(struct.pack(pattern, *self.found))
00203 length = len(self.position)
00204 buff.write(_struct_I.pack(length))
00205 pattern = '<%sd'%length
00206 buff.write(struct.pack(pattern, *self.position))
00207 length = len(self.velocity)
00208 buff.write(_struct_I.pack(length))
00209 pattern = '<%sd'%length
00210 buff.write(struct.pack(pattern, *self.velocity))
00211 length = len(self.effort)
00212 buff.write(_struct_I.pack(length))
00213 pattern = '<%sd'%length
00214 buff.write(struct.pack(pattern, *self.effort))
00215 except struct.error as se: self._check_types(se)
00216 except TypeError as te: self._check_types(te)
00217
00218 def deserialize(self, str):
00219 """
00220 unpack serialized message in str into this message instance
00221 :param str: byte array of serialized message, ``str``
00222 """
00223 try:
00224 end = 0
00225 start = end
00226 end += 4
00227 (length,) = _struct_I.unpack(str[start:end])
00228 pattern = '<%sI'%length
00229 start = end
00230 end += struct.calcsize(pattern)
00231 self.found = struct.unpack(pattern, str[start:end])
00232 start = end
00233 end += 4
00234 (length,) = _struct_I.unpack(str[start:end])
00235 pattern = '<%sd'%length
00236 start = end
00237 end += struct.calcsize(pattern)
00238 self.position = struct.unpack(pattern, str[start:end])
00239 start = end
00240 end += 4
00241 (length,) = _struct_I.unpack(str[start:end])
00242 pattern = '<%sd'%length
00243 start = end
00244 end += struct.calcsize(pattern)
00245 self.velocity = struct.unpack(pattern, str[start:end])
00246 start = end
00247 end += 4
00248 (length,) = _struct_I.unpack(str[start:end])
00249 pattern = '<%sd'%length
00250 start = end
00251 end += struct.calcsize(pattern)
00252 self.effort = struct.unpack(pattern, str[start:end])
00253 return self
00254 except struct.error as e:
00255 raise genpy.DeserializationError(e)
00256
00257
00258 def serialize_numpy(self, buff, numpy):
00259 """
00260 serialize message with numpy array types into buffer
00261 :param buff: buffer, ``StringIO``
00262 :param numpy: numpy python module
00263 """
00264 try:
00265 length = len(self.found)
00266 buff.write(_struct_I.pack(length))
00267 pattern = '<%sI'%length
00268 buff.write(self.found.tostring())
00269 length = len(self.position)
00270 buff.write(_struct_I.pack(length))
00271 pattern = '<%sd'%length
00272 buff.write(self.position.tostring())
00273 length = len(self.velocity)
00274 buff.write(_struct_I.pack(length))
00275 pattern = '<%sd'%length
00276 buff.write(self.velocity.tostring())
00277 length = len(self.effort)
00278 buff.write(_struct_I.pack(length))
00279 pattern = '<%sd'%length
00280 buff.write(self.effort.tostring())
00281 except struct.error as se: self._check_types(se)
00282 except TypeError as te: self._check_types(te)
00283
00284 def deserialize_numpy(self, str, numpy):
00285 """
00286 unpack serialized message in str into this message instance using numpy for array types
00287 :param str: byte array of serialized message, ``str``
00288 :param numpy: numpy python module
00289 """
00290 try:
00291 end = 0
00292 start = end
00293 end += 4
00294 (length,) = _struct_I.unpack(str[start:end])
00295 pattern = '<%sI'%length
00296 start = end
00297 end += struct.calcsize(pattern)
00298 self.found = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00299 start = end
00300 end += 4
00301 (length,) = _struct_I.unpack(str[start:end])
00302 pattern = '<%sd'%length
00303 start = end
00304 end += struct.calcsize(pattern)
00305 self.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00306 start = end
00307 end += 4
00308 (length,) = _struct_I.unpack(str[start:end])
00309 pattern = '<%sd'%length
00310 start = end
00311 end += struct.calcsize(pattern)
00312 self.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 pattern = '<%sd'%length
00317 start = end
00318 end += struct.calcsize(pattern)
00319 self.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00320 return self
00321 except struct.error as e:
00322 raise genpy.DeserializationError(e)
00323
00324 _struct_I = genpy.struct_I
00325 class ReturnJointStates(object):
00326 _type = 'coverage_3d_tools/ReturnJointStates'
00327 _md5sum = 'ce9bd2b56c904b190a782a08482fb4e9'
00328 _request_class = ReturnJointStatesRequest
00329 _response_class = ReturnJointStatesResponse