Skip to content

Commit

Permalink
Make the test case style the same as the style of the other subproble…
Browse files Browse the repository at this point in the history
…m2 test case
  • Loading branch information
burakaksoy committed Aug 6, 2024
1 parent 529e556 commit 6ce54fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_general_robotics_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,13 @@ 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)
# subproblem2, another test with a random scale factor
scale = 0.01851852 # scale factor for random test
a3_2 = rox.subproblem2(scale*np.array(z), scale*np.array(x), 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)

r3_2 = np.matmul(rox.rot(x,a3_2[0][0]),rox.rot(y,a3_2[0][1]))[:,1]
np.testing.assert_allclose(r3_2, y, atol=1e-4)

#subproblem3
p4=[.5, 0, 0]
Expand Down

0 comments on commit 6ce54fe

Please sign in to comment.