00001 """autogenerated by genpy from vrep_common/simRosGetJointStateRequest.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 simRosGetJointStateRequest(genpy.Message):
00009 _md5sum = "92535b678299d2bdda959704e78c275e"
00010 _type = "vrep_common/simRosGetJointStateRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 int32 handle
00017
00018 """
00019 __slots__ = ['handle']
00020 _slot_types = ['int32']
00021
00022 def __init__(self, *args, **kwds):
00023 """
00024 Constructor. Any message fields that are implicitly/explicitly
00025 set to None will be assigned a default value. The recommend
00026 use is keyword arguments as this is more robust to future message
00027 changes. You cannot mix in-order arguments and keyword arguments.
00028
00029 The available fields are:
00030 handle
00031
00032 :param args: complete set of field values, in .msg order
00033 :param kwds: use keyword arguments corresponding to message field names
00034 to set specific fields.
00035 """
00036 if args or kwds:
00037 super(simRosGetJointStateRequest, self).__init__(*args, **kwds)
00038
00039 if self.handle is None:
00040 self.handle = 0
00041 else:
00042 self.handle = 0
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 buff.write(_struct_i.pack(self.handle))
00057 except struct.error as se: self._check_types(se)
00058 except TypeError as te: self._check_types(te)
00059
00060 def deserialize(self, str):
00061 """
00062 unpack serialized message in str into this message instance
00063 :param str: byte array of serialized message, ``str``
00064 """
00065 try:
00066 end = 0
00067 start = end
00068 end += 4
00069 (self.handle,) = _struct_i.unpack(str[start:end])
00070 return self
00071 except struct.error as e:
00072 raise genpy.DeserializationError(e)
00073
00074
00075 def serialize_numpy(self, buff, numpy):
00076 """
00077 serialize message with numpy array types into buffer
00078 :param buff: buffer, ``StringIO``
00079 :param numpy: numpy python module
00080 """
00081 try:
00082 buff.write(_struct_i.pack(self.handle))
00083 except struct.error as se: self._check_types(se)
00084 except TypeError as te: self._check_types(te)
00085
00086 def deserialize_numpy(self, str, numpy):
00087 """
00088 unpack serialized message in str into this message instance using numpy for array types
00089 :param str: byte array of serialized message, ``str``
00090 :param numpy: numpy python module
00091 """
00092 try:
00093 end = 0
00094 start = end
00095 end += 4
00096 (self.handle,) = _struct_i.unpack(str[start:end])
00097 return self
00098 except struct.error as e:
00099 raise genpy.DeserializationError(e)
00100
00101 _struct_I = genpy.struct_I
00102 _struct_i = struct.Struct("<i")
00103 """autogenerated by genpy from vrep_common/simRosGetJointStateResponse.msg. Do not edit."""
00104 import sys
00105 python3 = True if sys.hexversion > 0x03000000 else False
00106 import genpy
00107 import struct
00108
00109 import std_msgs.msg
00110 import sensor_msgs.msg
00111
00112 class simRosGetJointStateResponse(genpy.Message):
00113 _md5sum = "1d460a330c4107107a50f227d148b7d3"
00114 _type = "vrep_common/simRosGetJointStateResponse"
00115 _has_header = False
00116 _full_text = """int32 result
00117 sensor_msgs/JointState state
00118
00119
00120 ================================================================================
00121 MSG: sensor_msgs/JointState
00122 # This is a message that holds data to describe the state of a set of torque controlled joints.
00123 #
00124 # The state of each joint (revolute or prismatic) is defined by:
00125 # * the position of the joint (rad or m),
00126 # * the velocity of the joint (rad/s or m/s) and
00127 # * the effort that is applied in the joint (Nm or N).
00128 #
00129 # Each joint is uniquely identified by its name
00130 # The header specifies the time at which the joint states were recorded. All the joint states
00131 # in one message have to be recorded at the same time.
00132 #
00133 # This message consists of a multiple arrays, one for each part of the joint state.
00134 # The goal is to make each of the fields optional. When e.g. your joints have no
00135 # effort associated with them, you can leave the effort array empty.
00136 #
00137 # All arrays in this message should have the same size, or be empty.
00138 # This is the only way to uniquely associate the joint name with the correct
00139 # states.
00140
00141
00142 Header header
00143
00144 string[] name
00145 float64[] position
00146 float64[] velocity
00147 float64[] effort
00148
00149 ================================================================================
00150 MSG: std_msgs/Header
00151 # Standard metadata for higher-level stamped data types.
00152 # This is generally used to communicate timestamped data
00153 # in a particular coordinate frame.
00154 #
00155 # sequence ID: consecutively increasing ID
00156 uint32 seq
00157 #Two-integer timestamp that is expressed as:
00158 # * stamp.secs: seconds (stamp_secs) since epoch
00159 # * stamp.nsecs: nanoseconds since stamp_secs
00160 # time-handling sugar is provided by the client library
00161 time stamp
00162 #Frame this data is associated with
00163 # 0: no frame
00164 # 1: global frame
00165 string frame_id
00166
00167 """
00168 __slots__ = ['result','state']
00169 _slot_types = ['int32','sensor_msgs/JointState']
00170
00171 def __init__(self, *args, **kwds):
00172 """
00173 Constructor. Any message fields that are implicitly/explicitly
00174 set to None will be assigned a default value. The recommend
00175 use is keyword arguments as this is more robust to future message
00176 changes. You cannot mix in-order arguments and keyword arguments.
00177
00178 The available fields are:
00179 result,state
00180
00181 :param args: complete set of field values, in .msg order
00182 :param kwds: use keyword arguments corresponding to message field names
00183 to set specific fields.
00184 """
00185 if args or kwds:
00186 super(simRosGetJointStateResponse, self).__init__(*args, **kwds)
00187
00188 if self.result is None:
00189 self.result = 0
00190 if self.state is None:
00191 self.state = sensor_msgs.msg.JointState()
00192 else:
00193 self.result = 0
00194 self.state = sensor_msgs.msg.JointState()
00195
00196 def _get_types(self):
00197 """
00198 internal API method
00199 """
00200 return self._slot_types
00201
00202 def serialize(self, buff):
00203 """
00204 serialize message into buffer
00205 :param buff: buffer, ``StringIO``
00206 """
00207 try:
00208 _x = self
00209 buff.write(_struct_i3I.pack(_x.result, _x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs))
00210 _x = self.state.header.frame_id
00211 length = len(_x)
00212 if python3 or type(_x) == unicode:
00213 _x = _x.encode('utf-8')
00214 length = len(_x)
00215 buff.write(struct.pack('<I%ss'%length, length, _x))
00216 length = len(self.state.name)
00217 buff.write(_struct_I.pack(length))
00218 for val1 in self.state.name:
00219 length = len(val1)
00220 if python3 or type(val1) == unicode:
00221 val1 = val1.encode('utf-8')
00222 length = len(val1)
00223 buff.write(struct.pack('<I%ss'%length, length, val1))
00224 length = len(self.state.position)
00225 buff.write(_struct_I.pack(length))
00226 pattern = '<%sd'%length
00227 buff.write(struct.pack(pattern, *self.state.position))
00228 length = len(self.state.velocity)
00229 buff.write(_struct_I.pack(length))
00230 pattern = '<%sd'%length
00231 buff.write(struct.pack(pattern, *self.state.velocity))
00232 length = len(self.state.effort)
00233 buff.write(_struct_I.pack(length))
00234 pattern = '<%sd'%length
00235 buff.write(struct.pack(pattern, *self.state.effort))
00236 except struct.error as se: self._check_types(se)
00237 except TypeError as te: self._check_types(te)
00238
00239 def deserialize(self, str):
00240 """
00241 unpack serialized message in str into this message instance
00242 :param str: byte array of serialized message, ``str``
00243 """
00244 try:
00245 if self.state is None:
00246 self.state = sensor_msgs.msg.JointState()
00247 end = 0
00248 _x = self
00249 start = end
00250 end += 16
00251 (_x.result, _x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00252 start = end
00253 end += 4
00254 (length,) = _struct_I.unpack(str[start:end])
00255 start = end
00256 end += length
00257 if python3:
00258 self.state.header.frame_id = str[start:end].decode('utf-8')
00259 else:
00260 self.state.header.frame_id = str[start:end]
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 self.state.name = []
00265 for i in range(0, length):
00266 start = end
00267 end += 4
00268 (length,) = _struct_I.unpack(str[start:end])
00269 start = end
00270 end += length
00271 if python3:
00272 val1 = str[start:end].decode('utf-8')
00273 else:
00274 val1 = str[start:end]
00275 self.state.name.append(val1)
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 pattern = '<%sd'%length
00280 start = end
00281 end += struct.calcsize(pattern)
00282 self.state.position = struct.unpack(pattern, str[start:end])
00283 start = end
00284 end += 4
00285 (length,) = _struct_I.unpack(str[start:end])
00286 pattern = '<%sd'%length
00287 start = end
00288 end += struct.calcsize(pattern)
00289 self.state.velocity = struct.unpack(pattern, str[start:end])
00290 start = end
00291 end += 4
00292 (length,) = _struct_I.unpack(str[start:end])
00293 pattern = '<%sd'%length
00294 start = end
00295 end += struct.calcsize(pattern)
00296 self.state.effort = struct.unpack(pattern, str[start:end])
00297 return self
00298 except struct.error as e:
00299 raise genpy.DeserializationError(e)
00300
00301
00302 def serialize_numpy(self, buff, numpy):
00303 """
00304 serialize message with numpy array types into buffer
00305 :param buff: buffer, ``StringIO``
00306 :param numpy: numpy python module
00307 """
00308 try:
00309 _x = self
00310 buff.write(_struct_i3I.pack(_x.result, _x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs))
00311 _x = self.state.header.frame_id
00312 length = len(_x)
00313 if python3 or type(_x) == unicode:
00314 _x = _x.encode('utf-8')
00315 length = len(_x)
00316 buff.write(struct.pack('<I%ss'%length, length, _x))
00317 length = len(self.state.name)
00318 buff.write(_struct_I.pack(length))
00319 for val1 in self.state.name:
00320 length = len(val1)
00321 if python3 or type(val1) == unicode:
00322 val1 = val1.encode('utf-8')
00323 length = len(val1)
00324 buff.write(struct.pack('<I%ss'%length, length, val1))
00325 length = len(self.state.position)
00326 buff.write(_struct_I.pack(length))
00327 pattern = '<%sd'%length
00328 buff.write(self.state.position.tostring())
00329 length = len(self.state.velocity)
00330 buff.write(_struct_I.pack(length))
00331 pattern = '<%sd'%length
00332 buff.write(self.state.velocity.tostring())
00333 length = len(self.state.effort)
00334 buff.write(_struct_I.pack(length))
00335 pattern = '<%sd'%length
00336 buff.write(self.state.effort.tostring())
00337 except struct.error as se: self._check_types(se)
00338 except TypeError as te: self._check_types(te)
00339
00340 def deserialize_numpy(self, str, numpy):
00341 """
00342 unpack serialized message in str into this message instance using numpy for array types
00343 :param str: byte array of serialized message, ``str``
00344 :param numpy: numpy python module
00345 """
00346 try:
00347 if self.state is None:
00348 self.state = sensor_msgs.msg.JointState()
00349 end = 0
00350 _x = self
00351 start = end
00352 end += 16
00353 (_x.result, _x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00354 start = end
00355 end += 4
00356 (length,) = _struct_I.unpack(str[start:end])
00357 start = end
00358 end += length
00359 if python3:
00360 self.state.header.frame_id = str[start:end].decode('utf-8')
00361 else:
00362 self.state.header.frame_id = str[start:end]
00363 start = end
00364 end += 4
00365 (length,) = _struct_I.unpack(str[start:end])
00366 self.state.name = []
00367 for i in range(0, length):
00368 start = end
00369 end += 4
00370 (length,) = _struct_I.unpack(str[start:end])
00371 start = end
00372 end += length
00373 if python3:
00374 val1 = str[start:end].decode('utf-8')
00375 else:
00376 val1 = str[start:end]
00377 self.state.name.append(val1)
00378 start = end
00379 end += 4
00380 (length,) = _struct_I.unpack(str[start:end])
00381 pattern = '<%sd'%length
00382 start = end
00383 end += struct.calcsize(pattern)
00384 self.state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00385 start = end
00386 end += 4
00387 (length,) = _struct_I.unpack(str[start:end])
00388 pattern = '<%sd'%length
00389 start = end
00390 end += struct.calcsize(pattern)
00391 self.state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00392 start = end
00393 end += 4
00394 (length,) = _struct_I.unpack(str[start:end])
00395 pattern = '<%sd'%length
00396 start = end
00397 end += struct.calcsize(pattern)
00398 self.state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00399 return self
00400 except struct.error as e:
00401 raise genpy.DeserializationError(e)
00402
00403 _struct_I = genpy.struct_I
00404 _struct_i3I = struct.Struct("<i3I")
00405 class simRosGetJointState(object):
00406 _type = 'vrep_common/simRosGetJointState'
00407 _md5sum = 'e3e87944e85555d62f7a59817ea5aee6'
00408 _request_class = simRosGetJointStateRequest
00409 _response_class = simRosGetJointStateResponse