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