unittest/python/crocoddyl/action.py
def calcDiff(model, data, x, u=None, recalc=True):
        """ Update the derivatives of the dynamics and cost.

        :param model: action model
        :params data: action data
        :params x: time-discrete state vector
        :params u: time-discrete control vector
        :returns the next state and cost value
        """
        if u is None:
            u = model.unone
        if recalc:
            xnext, cost = model.calc(data, x, u)
        data.Lx[:] = model.lx + np.dot(model.Lxx, x) + np.dot(model.Lxu, u)
        data.Lu[:] = model.lu + np.dot(model.Lxu.T, x) + np.dot(model.Luu, u)
        data.Fx[:, :] = model.Fx
        data.Fu[:, :] = model.Fu
        data.Lxx[:, :] = model.Lxx
        data.Luu[:, :] = model.Luu
        data.Lxu[:, :] = model.Lxu
        return xnext, cost
 Update the derivatives of the dynamics and cost.

        :param model: action model
        :params data: action data
        :params x: time-discrete state vector
        :params u: time-discrete control vector
        :returns the next state and cost value
        
Update the derivatives of the dynamics and cost.
Update the derivatives of the dynamics and cost .
def calcDiff(model, data, x, u=None, recalc=True):
        if u is None:
            u = model.unone
        if recalc:
            xnext, cost = model.calc(data, x, u)
        data.Lx[:] = model.lx + np.dot(model.Lxx, x) + np.dot(model.Lxu, u)
        data.Lu[:] = model.lu + np.dot(model.Lxu.T, x) + np.dot(model.Luu, u)
        data.Fx[:, :] = model.Fx
        data.Fu[:, :] = model.Fu
        data.Lxx[:, :] = model.Lxx
        data.Luu[:, :] = model.Luu
        data.Lxu[:, :] = model.Lxu
        return xnext, cost
def calcDiff ( model , data , x , u = None , recalc = True ) : if u is None : u = model . unone if recalc : xnext , cost = model . calc ( data , x , u ) data . Lx [ : ] = model . lx + np . dot ( model . Lxx , x ) + np . dot ( model . Lxu , u ) data . Lu [ : ] = model . lu + np . dot ( model . Lxu . T , x ) + np . dot ( model . Luu , u ) data . Fx [ : , : ] = model . Fx data . Fu [ : , : ] = model . Fu data . Lxx [ : , : ] = model . Lxx data . Luu [ : , : ] = model . Luu data . Lxu [ : , : ] = model . Lxu return xnext , cost
Update the derivatives of the dynamics and cost.
Update the derivatives of the dynamics and cost .
""" Update the derivatives of the dynamics and cost.

        :param model: action model
        :params data: action data
        :params x: time-discrete state vector
        :params u: time-discrete control vector
        :returns the next state and cost value
        """
model
data
x
u
recalc