$search
00001 """autogenerated by genmsg_py from GetJointPropertiesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetJointPropertiesRequest(roslib.message.Message): 00007 _md5sum = "0be1351618e1dc030eb7959d9a4902de" 00008 _type = "gazebo/GetJointPropertiesRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 string joint_name 00013 00014 """ 00015 __slots__ = ['joint_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 joint_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(GetJointPropertiesRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.joint_name is None: 00036 self.joint_name = '' 00037 else: 00038 self.joint_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 00050 @type buff: StringIO 00051 """ 00052 try: 00053 _x = self.joint_name 00054 length = len(_x) 00055 buff.write(struct.pack('<I%ss'%length, length, _x)) 00056 except struct.error as se: self._check_types(se) 00057 except TypeError as te: self._check_types(te) 00058 00059 def deserialize(self, str): 00060 """ 00061 unpack serialized message in str into this message instance 00062 @param str: byte array of serialized message 00063 @type str: str 00064 """ 00065 try: 00066 end = 0 00067 start = end 00068 end += 4 00069 (length,) = _struct_I.unpack(str[start:end]) 00070 start = end 00071 end += length 00072 self.joint_name = str[start:end] 00073 return self 00074 except struct.error as e: 00075 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00076 00077 00078 def serialize_numpy(self, buff, numpy): 00079 """ 00080 serialize message with numpy array types into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 @param numpy: numpy python module 00084 @type numpy module 00085 """ 00086 try: 00087 _x = self.joint_name 00088 length = len(_x) 00089 buff.write(struct.pack('<I%ss'%length, length, _x)) 00090 except struct.error as se: self._check_types(se) 00091 except TypeError as te: self._check_types(te) 00092 00093 def deserialize_numpy(self, str, numpy): 00094 """ 00095 unpack serialized message in str into this message instance using numpy for array types 00096 @param str: byte array of serialized message 00097 @type str: str 00098 @param numpy: numpy python module 00099 @type numpy: module 00100 """ 00101 try: 00102 end = 0 00103 start = end 00104 end += 4 00105 (length,) = _struct_I.unpack(str[start:end]) 00106 start = end 00107 end += length 00108 self.joint_name = str[start:end] 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 _struct_I = roslib.message.struct_I 00114 """autogenerated by genmsg_py from GetJointPropertiesResponse.msg. Do not edit.""" 00115 import roslib.message 00116 import struct 00117 00118 00119 class GetJointPropertiesResponse(roslib.message.Message): 00120 _md5sum = "cd7b30a39faa372283dc94c5f6457f82" 00121 _type = "gazebo/GetJointPropertiesResponse" 00122 _has_header = False #flag to mark the presence of a Header object 00123 _full_text = """ 00124 uint8 type 00125 uint8 REVOLUTE = 0 00126 uint8 CONTINUOUS = 1 00127 uint8 PRISMATIC = 2 00128 uint8 FIXED = 3 00129 uint8 BALL = 4 00130 uint8 UNIVERSAL = 5 00131 00132 float64[] damping 00133 00134 float64[] position 00135 float64[] rate 00136 00137 bool success 00138 string status_message 00139 00140 00141 """ 00142 # Pseudo-constants 00143 REVOLUTE = 0 00144 CONTINUOUS = 1 00145 PRISMATIC = 2 00146 FIXED = 3 00147 BALL = 4 00148 UNIVERSAL = 5 00149 00150 __slots__ = ['type','damping','position','rate','success','status_message'] 00151 _slot_types = ['uint8','float64[]','float64[]','float64[]','bool','string'] 00152 00153 def __init__(self, *args, **kwds): 00154 """ 00155 Constructor. Any message fields that are implicitly/explicitly 00156 set to None will be assigned a default value. The recommend 00157 use is keyword arguments as this is more robust to future message 00158 changes. You cannot mix in-order arguments and keyword arguments. 00159 00160 The available fields are: 00161 type,damping,position,rate,success,status_message 00162 00163 @param args: complete set of field values, in .msg order 00164 @param kwds: use keyword arguments corresponding to message field names 00165 to set specific fields. 00166 """ 00167 if args or kwds: 00168 super(GetJointPropertiesResponse, self).__init__(*args, **kwds) 00169 #message fields cannot be None, assign default values for those that are 00170 if self.type is None: 00171 self.type = 0 00172 if self.damping is None: 00173 self.damping = [] 00174 if self.position is None: 00175 self.position = [] 00176 if self.rate is None: 00177 self.rate = [] 00178 if self.success is None: 00179 self.success = False 00180 if self.status_message is None: 00181 self.status_message = '' 00182 else: 00183 self.type = 0 00184 self.damping = [] 00185 self.position = [] 00186 self.rate = [] 00187 self.success = False 00188 self.status_message = '' 00189 00190 def _get_types(self): 00191 """ 00192 internal API method 00193 """ 00194 return self._slot_types 00195 00196 def serialize(self, buff): 00197 """ 00198 serialize message into buffer 00199 @param buff: buffer 00200 @type buff: StringIO 00201 """ 00202 try: 00203 buff.write(_struct_B.pack(self.type)) 00204 length = len(self.damping) 00205 buff.write(_struct_I.pack(length)) 00206 pattern = '<%sd'%length 00207 buff.write(struct.pack(pattern, *self.damping)) 00208 length = len(self.position) 00209 buff.write(_struct_I.pack(length)) 00210 pattern = '<%sd'%length 00211 buff.write(struct.pack(pattern, *self.position)) 00212 length = len(self.rate) 00213 buff.write(_struct_I.pack(length)) 00214 pattern = '<%sd'%length 00215 buff.write(struct.pack(pattern, *self.rate)) 00216 buff.write(_struct_B.pack(self.success)) 00217 _x = self.status_message 00218 length = len(_x) 00219 buff.write(struct.pack('<I%ss'%length, length, _x)) 00220 except struct.error as se: self._check_types(se) 00221 except TypeError as te: self._check_types(te) 00222 00223 def deserialize(self, str): 00224 """ 00225 unpack serialized message in str into this message instance 00226 @param str: byte array of serialized message 00227 @type str: str 00228 """ 00229 try: 00230 end = 0 00231 start = end 00232 end += 1 00233 (self.type,) = _struct_B.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 pattern = '<%sd'%length 00238 start = end 00239 end += struct.calcsize(pattern) 00240 self.damping = struct.unpack(pattern, str[start:end]) 00241 start = end 00242 end += 4 00243 (length,) = _struct_I.unpack(str[start:end]) 00244 pattern = '<%sd'%length 00245 start = end 00246 end += struct.calcsize(pattern) 00247 self.position = struct.unpack(pattern, str[start:end]) 00248 start = end 00249 end += 4 00250 (length,) = _struct_I.unpack(str[start:end]) 00251 pattern = '<%sd'%length 00252 start = end 00253 end += struct.calcsize(pattern) 00254 self.rate = struct.unpack(pattern, str[start:end]) 00255 start = end 00256 end += 1 00257 (self.success,) = _struct_B.unpack(str[start:end]) 00258 self.success = bool(self.success) 00259 start = end 00260 end += 4 00261 (length,) = _struct_I.unpack(str[start:end]) 00262 start = end 00263 end += length 00264 self.status_message = str[start:end] 00265 return self 00266 except struct.error as e: 00267 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00268 00269 00270 def serialize_numpy(self, buff, numpy): 00271 """ 00272 serialize message with numpy array types into buffer 00273 @param buff: buffer 00274 @type buff: StringIO 00275 @param numpy: numpy python module 00276 @type numpy module 00277 """ 00278 try: 00279 buff.write(_struct_B.pack(self.type)) 00280 length = len(self.damping) 00281 buff.write(_struct_I.pack(length)) 00282 pattern = '<%sd'%length 00283 buff.write(self.damping.tostring()) 00284 length = len(self.position) 00285 buff.write(_struct_I.pack(length)) 00286 pattern = '<%sd'%length 00287 buff.write(self.position.tostring()) 00288 length = len(self.rate) 00289 buff.write(_struct_I.pack(length)) 00290 pattern = '<%sd'%length 00291 buff.write(self.rate.tostring()) 00292 buff.write(_struct_B.pack(self.success)) 00293 _x = self.status_message 00294 length = len(_x) 00295 buff.write(struct.pack('<I%ss'%length, length, _x)) 00296 except struct.error as se: self._check_types(se) 00297 except TypeError as te: self._check_types(te) 00298 00299 def deserialize_numpy(self, str, numpy): 00300 """ 00301 unpack serialized message in str into this message instance using numpy for array types 00302 @param str: byte array of serialized message 00303 @type str: str 00304 @param numpy: numpy python module 00305 @type numpy: module 00306 """ 00307 try: 00308 end = 0 00309 start = end 00310 end += 1 00311 (self.type,) = _struct_B.unpack(str[start:end]) 00312 start = end 00313 end += 4 00314 (length,) = _struct_I.unpack(str[start:end]) 00315 pattern = '<%sd'%length 00316 start = end 00317 end += struct.calcsize(pattern) 00318 self.damping = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00319 start = end 00320 end += 4 00321 (length,) = _struct_I.unpack(str[start:end]) 00322 pattern = '<%sd'%length 00323 start = end 00324 end += struct.calcsize(pattern) 00325 self.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00326 start = end 00327 end += 4 00328 (length,) = _struct_I.unpack(str[start:end]) 00329 pattern = '<%sd'%length 00330 start = end 00331 end += struct.calcsize(pattern) 00332 self.rate = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00333 start = end 00334 end += 1 00335 (self.success,) = _struct_B.unpack(str[start:end]) 00336 self.success = bool(self.success) 00337 start = end 00338 end += 4 00339 (length,) = _struct_I.unpack(str[start:end]) 00340 start = end 00341 end += length 00342 self.status_message = str[start:end] 00343 return self 00344 except struct.error as e: 00345 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00346 00347 _struct_I = roslib.message.struct_I 00348 _struct_B = struct.Struct("<B") 00349 class GetJointProperties(roslib.message.ServiceDefinition): 00350 _type = 'gazebo/GetJointProperties' 00351 _md5sum = '7b30be900f50aa21efec4a0ec92d91c9' 00352 _request_class = GetJointPropertiesRequest 00353 _response_class = GetJointPropertiesResponse