Skip to content

Commit 6ce54fe

Browse files
committed
Make the test case style the same as the style of the other subproblem2 test case
1 parent 529e556 commit 6ce54fe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/test_general_robotics_toolbox.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,13 @@ def test_subproblems():
329329
r3=np.matmul(rox.rot(z,a3[0][0]),rox.rot(y,a3[0][1]))[:,0]
330330
np.testing.assert_allclose(r3, z, atol=1e-4)
331331

332-
a3_2 = rox.subproblem2([0, 0, 0.01851852], [0.01851852, 0, 0], x, y)
332+
# subproblem2, another test with a random scale factor
333+
scale = 0.01851852 # scale factor for random test
334+
a3_2 = rox.subproblem2(scale*np.array(z), scale*np.array(x), x, y)
333335
assert len(a3_2) == 1
334-
a3_2_check = [(0.0, 1.5707963267948966)]
335-
np.testing.assert_allclose(a3_2, a3_2_check, atol=1e-4)
336+
337+
r3_2 = np.matmul(rox.rot(x,a3_2[0][0]),rox.rot(y,a3_2[0][1]))[:,1]
338+
np.testing.assert_allclose(r3_2, y, atol=1e-4)
336339

337340
#subproblem3
338341
p4=[.5, 0, 0]

0 commit comments

Comments
 (0)