parameters: (self, q, dq, dt)
return_statement: return
docstring: Updates internal state: accumulates iterm and updates x_last
docstring_summary: Updates internal state: accumulates iterm and updates x_last
docstring_tokens: Updates internal state : accumulates iterm and updates x_last
function: def advance(self, q, dq, dt):
  		""" Updates internal state: accumulates iterm and updates x_last
  		"""
  		if self.weight > 0:
  			eP = self.getSensedError(q)
  			# update iterm
  			if self.eI == None:
  				self.eI = vectorops.mul(eP,dt)
  			else:
  				self.eI = vectorops.madd(self.eI, eP, dt)
  			einorm = vectorops.norm(self.eI)
  			if einorm > self.eImax:
  				self.eI = vectorops.mul(self.eI,self.eImax/einorm)
  
  		#update qLast
  		self.qLast = q
  		return
function_tokens: def advance ( self , q , dq , dt ) : if self . weight > 0 : eP = self . getSensedError ( q ) # update iterm if self . eI == None : self . eI = vectorops . mul ( eP , dt ) else : self . eI = vectorops . madd ( self . eI , eP , dt ) einorm = vectorops . norm ( self . eI ) if einorm > self . eImax : self . eI = vectorops . mul ( self . eI , self . eImax / einorm ) #update qLast self . qLast = q return