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