$search
00001 """autogenerated by genmsg_py from ODEJointProperties.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ODEJointProperties(roslib.message.Message): 00007 _md5sum = "1b744c32a920af979f53afe2f9c3511f" 00008 _type = "gazebo_msgs/ODEJointProperties" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# access to low level joint properties, change these at your own risk 00011 float64[] damping # joint damping 00012 float64[] hiStop # joint limit 00013 float64[] loStop # joint limit 00014 float64[] erp # set joint erp 00015 float64[] cfm # set joint cfm 00016 float64[] stop_erp # set joint erp for joint limit "contact" joint 00017 float64[] stop_cfm # set joint cfm for joint limit "contact" joint 00018 float64[] fudge_factor # joint fudge_factor applied at limits, see ODE manual for info. 00019 float64[] fmax # ode joint param fmax 00020 float64[] vel # ode joint param vel 00021 00022 """ 00023 __slots__ = ['damping','hiStop','loStop','erp','cfm','stop_erp','stop_cfm','fudge_factor','fmax','vel'] 00024 _slot_types = ['float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]'] 00025 00026 def __init__(self, *args, **kwds): 00027 """ 00028 Constructor. Any message fields that are implicitly/explicitly 00029 set to None will be assigned a default value. The recommend 00030 use is keyword arguments as this is more robust to future message 00031 changes. You cannot mix in-order arguments and keyword arguments. 00032 00033 The available fields are: 00034 damping,hiStop,loStop,erp,cfm,stop_erp,stop_cfm,fudge_factor,fmax,vel 00035 00036 @param args: complete set of field values, in .msg order 00037 @param kwds: use keyword arguments corresponding to message field names 00038 to set specific fields. 00039 """ 00040 if args or kwds: 00041 super(ODEJointProperties, self).__init__(*args, **kwds) 00042 #message fields cannot be None, assign default values for those that are 00043 if self.damping is None: 00044 self.damping = [] 00045 if self.hiStop is None: 00046 self.hiStop = [] 00047 if self.loStop is None: 00048 self.loStop = [] 00049 if self.erp is None: 00050 self.erp = [] 00051 if self.cfm is None: 00052 self.cfm = [] 00053 if self.stop_erp is None: 00054 self.stop_erp = [] 00055 if self.stop_cfm is None: 00056 self.stop_cfm = [] 00057 if self.fudge_factor is None: 00058 self.fudge_factor = [] 00059 if self.fmax is None: 00060 self.fmax = [] 00061 if self.vel is None: 00062 self.vel = [] 00063 else: 00064 self.damping = [] 00065 self.hiStop = [] 00066 self.loStop = [] 00067 self.erp = [] 00068 self.cfm = [] 00069 self.stop_erp = [] 00070 self.stop_cfm = [] 00071 self.fudge_factor = [] 00072 self.fmax = [] 00073 self.vel = [] 00074 00075 def _get_types(self): 00076 """ 00077 internal API method 00078 """ 00079 return self._slot_types 00080 00081 def serialize(self, buff): 00082 """ 00083 serialize message into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 """ 00087 try: 00088 length = len(self.damping) 00089 buff.write(_struct_I.pack(length)) 00090 pattern = '<%sd'%length 00091 buff.write(struct.pack(pattern, *self.damping)) 00092 length = len(self.hiStop) 00093 buff.write(_struct_I.pack(length)) 00094 pattern = '<%sd'%length 00095 buff.write(struct.pack(pattern, *self.hiStop)) 00096 length = len(self.loStop) 00097 buff.write(_struct_I.pack(length)) 00098 pattern = '<%sd'%length 00099 buff.write(struct.pack(pattern, *self.loStop)) 00100 length = len(self.erp) 00101 buff.write(_struct_I.pack(length)) 00102 pattern = '<%sd'%length 00103 buff.write(struct.pack(pattern, *self.erp)) 00104 length = len(self.cfm) 00105 buff.write(_struct_I.pack(length)) 00106 pattern = '<%sd'%length 00107 buff.write(struct.pack(pattern, *self.cfm)) 00108 length = len(self.stop_erp) 00109 buff.write(_struct_I.pack(length)) 00110 pattern = '<%sd'%length 00111 buff.write(struct.pack(pattern, *self.stop_erp)) 00112 length = len(self.stop_cfm) 00113 buff.write(_struct_I.pack(length)) 00114 pattern = '<%sd'%length 00115 buff.write(struct.pack(pattern, *self.stop_cfm)) 00116 length = len(self.fudge_factor) 00117 buff.write(_struct_I.pack(length)) 00118 pattern = '<%sd'%length 00119 buff.write(struct.pack(pattern, *self.fudge_factor)) 00120 length = len(self.fmax) 00121 buff.write(_struct_I.pack(length)) 00122 pattern = '<%sd'%length 00123 buff.write(struct.pack(pattern, *self.fmax)) 00124 length = len(self.vel) 00125 buff.write(_struct_I.pack(length)) 00126 pattern = '<%sd'%length 00127 buff.write(struct.pack(pattern, *self.vel)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize(self, str): 00132 """ 00133 unpack serialized message in str into this message instance 00134 @param str: byte array of serialized message 00135 @type str: str 00136 """ 00137 try: 00138 end = 0 00139 start = end 00140 end += 4 00141 (length,) = _struct_I.unpack(str[start:end]) 00142 pattern = '<%sd'%length 00143 start = end 00144 end += struct.calcsize(pattern) 00145 self.damping = struct.unpack(pattern, str[start:end]) 00146 start = end 00147 end += 4 00148 (length,) = _struct_I.unpack(str[start:end]) 00149 pattern = '<%sd'%length 00150 start = end 00151 end += struct.calcsize(pattern) 00152 self.hiStop = struct.unpack(pattern, str[start:end]) 00153 start = end 00154 end += 4 00155 (length,) = _struct_I.unpack(str[start:end]) 00156 pattern = '<%sd'%length 00157 start = end 00158 end += struct.calcsize(pattern) 00159 self.loStop = struct.unpack(pattern, str[start:end]) 00160 start = end 00161 end += 4 00162 (length,) = _struct_I.unpack(str[start:end]) 00163 pattern = '<%sd'%length 00164 start = end 00165 end += struct.calcsize(pattern) 00166 self.erp = struct.unpack(pattern, str[start:end]) 00167 start = end 00168 end += 4 00169 (length,) = _struct_I.unpack(str[start:end]) 00170 pattern = '<%sd'%length 00171 start = end 00172 end += struct.calcsize(pattern) 00173 self.cfm = struct.unpack(pattern, str[start:end]) 00174 start = end 00175 end += 4 00176 (length,) = _struct_I.unpack(str[start:end]) 00177 pattern = '<%sd'%length 00178 start = end 00179 end += struct.calcsize(pattern) 00180 self.stop_erp = struct.unpack(pattern, str[start:end]) 00181 start = end 00182 end += 4 00183 (length,) = _struct_I.unpack(str[start:end]) 00184 pattern = '<%sd'%length 00185 start = end 00186 end += struct.calcsize(pattern) 00187 self.stop_cfm = struct.unpack(pattern, str[start:end]) 00188 start = end 00189 end += 4 00190 (length,) = _struct_I.unpack(str[start:end]) 00191 pattern = '<%sd'%length 00192 start = end 00193 end += struct.calcsize(pattern) 00194 self.fudge_factor = struct.unpack(pattern, str[start:end]) 00195 start = end 00196 end += 4 00197 (length,) = _struct_I.unpack(str[start:end]) 00198 pattern = '<%sd'%length 00199 start = end 00200 end += struct.calcsize(pattern) 00201 self.fmax = struct.unpack(pattern, str[start:end]) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 pattern = '<%sd'%length 00206 start = end 00207 end += struct.calcsize(pattern) 00208 self.vel = struct.unpack(pattern, str[start:end]) 00209 return self 00210 except struct.error as e: 00211 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00212 00213 00214 def serialize_numpy(self, buff, numpy): 00215 """ 00216 serialize message with numpy array types into buffer 00217 @param buff: buffer 00218 @type buff: StringIO 00219 @param numpy: numpy python module 00220 @type numpy module 00221 """ 00222 try: 00223 length = len(self.damping) 00224 buff.write(_struct_I.pack(length)) 00225 pattern = '<%sd'%length 00226 buff.write(self.damping.tostring()) 00227 length = len(self.hiStop) 00228 buff.write(_struct_I.pack(length)) 00229 pattern = '<%sd'%length 00230 buff.write(self.hiStop.tostring()) 00231 length = len(self.loStop) 00232 buff.write(_struct_I.pack(length)) 00233 pattern = '<%sd'%length 00234 buff.write(self.loStop.tostring()) 00235 length = len(self.erp) 00236 buff.write(_struct_I.pack(length)) 00237 pattern = '<%sd'%length 00238 buff.write(self.erp.tostring()) 00239 length = len(self.cfm) 00240 buff.write(_struct_I.pack(length)) 00241 pattern = '<%sd'%length 00242 buff.write(self.cfm.tostring()) 00243 length = len(self.stop_erp) 00244 buff.write(_struct_I.pack(length)) 00245 pattern = '<%sd'%length 00246 buff.write(self.stop_erp.tostring()) 00247 length = len(self.stop_cfm) 00248 buff.write(_struct_I.pack(length)) 00249 pattern = '<%sd'%length 00250 buff.write(self.stop_cfm.tostring()) 00251 length = len(self.fudge_factor) 00252 buff.write(_struct_I.pack(length)) 00253 pattern = '<%sd'%length 00254 buff.write(self.fudge_factor.tostring()) 00255 length = len(self.fmax) 00256 buff.write(_struct_I.pack(length)) 00257 pattern = '<%sd'%length 00258 buff.write(self.fmax.tostring()) 00259 length = len(self.vel) 00260 buff.write(_struct_I.pack(length)) 00261 pattern = '<%sd'%length 00262 buff.write(self.vel.tostring()) 00263 except struct.error as se: self._check_types(se) 00264 except TypeError as te: self._check_types(te) 00265 00266 def deserialize_numpy(self, str, numpy): 00267 """ 00268 unpack serialized message in str into this message instance using numpy for array types 00269 @param str: byte array of serialized message 00270 @type str: str 00271 @param numpy: numpy python module 00272 @type numpy: module 00273 """ 00274 try: 00275 end = 0 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.damping = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 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.hiStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 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.loStop = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00297 start = end 00298 end += 4 00299 (length,) = _struct_I.unpack(str[start:end]) 00300 pattern = '<%sd'%length 00301 start = end 00302 end += struct.calcsize(pattern) 00303 self.erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00304 start = end 00305 end += 4 00306 (length,) = _struct_I.unpack(str[start:end]) 00307 pattern = '<%sd'%length 00308 start = end 00309 end += struct.calcsize(pattern) 00310 self.cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 pattern = '<%sd'%length 00315 start = end 00316 end += struct.calcsize(pattern) 00317 self.stop_erp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00318 start = end 00319 end += 4 00320 (length,) = _struct_I.unpack(str[start:end]) 00321 pattern = '<%sd'%length 00322 start = end 00323 end += struct.calcsize(pattern) 00324 self.stop_cfm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00325 start = end 00326 end += 4 00327 (length,) = _struct_I.unpack(str[start:end]) 00328 pattern = '<%sd'%length 00329 start = end 00330 end += struct.calcsize(pattern) 00331 self.fudge_factor = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00332 start = end 00333 end += 4 00334 (length,) = _struct_I.unpack(str[start:end]) 00335 pattern = '<%sd'%length 00336 start = end 00337 end += struct.calcsize(pattern) 00338 self.fmax = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00339 start = end 00340 end += 4 00341 (length,) = _struct_I.unpack(str[start:end]) 00342 pattern = '<%sd'%length 00343 start = end 00344 end += struct.calcsize(pattern) 00345 self.vel = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00346 return self 00347 except struct.error as e: 00348 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00349 00350 _struct_I = roslib.message.struct_I