unittest/python/crocoddyl/shooting.py
def calcDiff(self, xs, us):
        """ Compute the cost-and-dynamics derivatives.

        These quantities are computed along a given pair of trajectories xs
        (states) and us (controls).
        :param xs: state trajectory
        :param us: control trajectory
        """
        assert (len(xs) == self.T + 1)
        assert (len(us) == self.T)
        for m, d, x, u in zip(self.runningModels, self.runningDatas, xs[:-1], us):
            m.calcDiff(d, x, u)
        self.terminalModel.calcDiff(self.terminalData, xs[-1])
        return sum([d.cost for d in self.runningDatas + [self.terminalData]])
 Compute the cost-and-dynamics derivatives.

        These quantities are computed along a given pair of trajectories xs
        (states) and us (controls).
        :param xs: state trajectory
        :param us: control trajectory
        
Compute the cost-and-dynamics derivatives.
These quantities are computed along a given pair of trajectories xs
(states) and us (controls).
Compute the cost - and - dynamics derivatives . These quantities are computed along a given pair of trajectories xs ( states ) and us ( controls ) .
def calcDiff(self, xs, us):
        assert (len(xs) == self.T + 1)
        assert (len(us) == self.T)
        for m, d, x, u in zip(self.runningModels, self.runningDatas, xs[:-1], us):
            m.calcDiff(d, x, u)
        self.terminalModel.calcDiff(self.terminalData, xs[-1])
        return sum([d.cost for d in self.runningDatas + [self.terminalData]])
def calcDiff ( self , xs , us ) : assert ( len ( xs ) == self . T + 1 ) assert ( len ( us ) == self . T ) for m , d , x , u in zip ( self . runningModels , self . runningDatas , xs [ : - 1 ] , us ) : m . calcDiff ( d , x , u ) self . terminalModel . calcDiff ( self . terminalData , xs [ - 1 ] ) return sum ( [ d . cost for d in self . runningDatas + [ self . terminalData ] ] )
Compute the cost-and-dynamics derivatives.
Compute the cost - and - dynamics derivatives .
""" Compute the cost-and-dynamics derivatives.

        These quantities are computed along a given pair of trajectories xs
        (states) and us (controls).
        :param xs: state trajectory
        :param us: control trajectory
        """
self
xs
None
us
None