From 529e556adadb9d84e53307652d85cbe87d7a5312 Mon Sep 17 00:00:00 2001 From: Burak Aksoy Date: Tue, 6 Aug 2024 11:19:39 -0400 Subject: [PATCH] Add a test case which verifies the fix. --- test/test_general_robotics_toolbox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_general_robotics_toolbox.py b/test/test_general_robotics_toolbox.py index a280621..328603d 100755 --- a/test/test_general_robotics_toolbox.py +++ b/test/test_general_robotics_toolbox.py @@ -329,6 +329,11 @@ def test_subproblems(): r3=np.matmul(rox.rot(z,a3[0][0]),rox.rot(y,a3[0][1]))[:,0] np.testing.assert_allclose(r3, z, atol=1e-4) + a3_2 = rox.subproblem2([0, 0, 0.01851852], [0.01851852, 0, 0], x, y) + assert len(a3_2) == 1 + a3_2_check = [(0.0, 1.5707963267948966)] + np.testing.assert_allclose(a3_2, a3_2_check, atol=1e-4) + #subproblem3 p4=[.5, 0, 0] q4=[0, .75, 0]