4 import pinocchio
as pin
5 from numpy.random
import rand
6 from pinocchio
import skew, skewSquare, unSkew
10 from pinocchio
import casadi
as cpin
16 from test_case
import PinocchioTestCase
23 self.assertLess(np.linalg.norm(
skew(v3).dot(v3)), 1e-10)
25 x, y, z = tuple(
rand(3).tolist())
26 M = np.array([[0.0, x, y], [-x, 0.0, z], [-y, -z, 0.0]])
33 x, y, z = tuple(v3.tolist())
48 Rtarget = pin.utils.rotate(
"x", 3.14 / 4)
49 R0 = pin.Quaternion(0.707107, 0.707107, 0, 0).matrix()
53 nu = casadi.SX.sym(
"v", 3, 1)
55 cpin.exp3(nu).T @ Rtarget
58 casadi.Function(
"gradient" + str(i), [nu], [casadi.gradient(D[i], nu)])
64 np.any(np.isnan(d0)),
"NaN detected in the log3 function derivative"
69 M0: pin.SE3 = pin.SE3.Random()
76 print(R, f
":\nlog: {logR}")
84 if __name__ ==
"__main__":