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