unittest/python/crocoddyl/state.py
def diff(self, x0, x1):
        """ Difference between the robot's states x2 and x1.

        :param x1: current state
        :param x2: next state
        :return x2 [-] x1 value
        """
        nq, nv, nx = self.model.nq, self.model.nv, self.nx
        assert (x0.shape == (nx, ) and x1.shape == (nx, ))
        q0 = x0[:nq]
        q1 = x1[:nq]
        v0 = x0[-nv:]
        v1 = x1[-nv:]
        dq = pinocchio.difference(self.model, a2m(q0), a2m(q1))
        return np.concatenate([dq.flat, v1 - v0])
 Difference between the robot's states x2 and x1.

        :param x1: current state
        :param x2: next state
        :return x2 [-] x1 value
        
Difference between the robot's states x2 and x1.
Difference between the robot ' s states x2 and x1 .
def diff(self, x0, x1):
        nq, nv, nx = self.model.nq, self.model.nv, self.nx
        assert (x0.shape == (nx, ) and x1.shape == (nx, ))
        q0 = x0[:nq]
        q1 = x1[:nq]
        v0 = x0[-nv:]
        v1 = x1[-nv:]
        dq = pinocchio.difference(self.model, a2m(q0), a2m(q1))
        return np.concatenate([dq.flat, v1 - v0])
def diff ( self , x0 , x1 ) : nq , nv , nx = self . model . nq , self . model . nv , self . nx assert ( x0 . shape == ( nx , ) and x1 . shape == ( nx , ) ) q0 = x0 [ : nq ] q1 = x1 [ : nq ] v0 = x0 [ - nv : ] v1 = x1 [ - nv : ] dq = pinocchio . difference ( self . model , a2m ( q0 ) , a2m ( q1 ) ) return np . concatenate ( [ dq . flat , v1 - v0 ] )
Difference between the robot's states x2 and x1.
Difference between the robot ' s states x2 and x1 .
""" Difference between the robot's states x2 and x1.

        :param x1: current state
        :param x2: next state
        :return x2 [-] x1 value
        """
self
x0
x1