From b5525b0f4ed5217075a2056d5c2741267d664116 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Fri, 7 Dec 2018 23:12:35 -0500 Subject: [PATCH] upadte Matrix6Log somehow, in certain cases, I was unable to generate a trajectory without getting an error that the operator / can't work between list (omgmat) and float... so changing that fixed it for me. --- packages/Python/modern_robotics/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Python/modern_robotics/core.py b/packages/Python/modern_robotics/core.py index 925751c..a123d49 100644 --- a/packages/Python/modern_robotics/core.py +++ b/packages/Python/modern_robotics/core.py @@ -401,7 +401,7 @@ def MatrixLog6(T): elif acosinput < -1: acosinput = -1 theta = np.arccos(acosinput) - omgmat = MatrixLog3(R) + omgmat = np.array(MatrixLog3(R), dtype=np.float64) return np.r_[np.c_[omgmat, np.dot(np.eye(3) - omgmat / 2.0 \ + (1.0 / theta - 1.0 / np.tan(theta / 2.0) / 2) \