@@ -629,7 +629,7 @@ def test_friction(self):
629
629
l0 = rp .RevoluteDH (d = 2 , B = 3 , G = 2 , Tc = [2 , - 1 ])
630
630
qd = [1 , 2 , 3 , 4 ]
631
631
632
- r0 = rp .DHRobot ([l0 , l0 , l0 , l0 ])
632
+ r0 = rp .DHRobot ([l0 , l0 . copy () , l0 . copy () , l0 . copy () ])
633
633
634
634
tau = np .array ([- 16 , - 28 , - 40 , - 52 ])
635
635
@@ -971,42 +971,42 @@ def test_ikine_LM(self):
971
971
self .assertTrue (sol .success )
972
972
self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 6 )
973
973
974
- def test_ikine_LMS (self ):
975
- puma = rp .models .DH .Puma560 ()
974
+ # def test_ikine_LMS(self):
975
+ # puma = rp.models.DH.Puma560()
976
976
977
- T = puma .fkine (puma .qn )
977
+ # T = puma.fkine(puma.qn)
978
978
979
- sol = puma .ikine_LM (T )
980
- self .assertTrue (sol .success )
981
- self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 6 )
979
+ # sol = puma.ikine_LM(T)
980
+ # self.assertTrue(sol.success)
981
+ # self.assertAlmostEqual(np.linalg.norm(T - puma.fkine(sol.q)), 0, places=6)
982
982
983
- def test_ikine_unc (self ):
984
- puma = rp .models .DH .Puma560 ()
983
+ # def test_ikine_unc(self):
984
+ # puma = rp.models.DH.Puma560()
985
985
986
- T = puma .fkine (puma .qn )
986
+ # T = puma.fkine(puma.qn)
987
987
988
- sol = puma .ikine_min (T )
989
- self .assertTrue (sol .success )
990
- self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 5 )
988
+ # sol = puma.ikine_min(T)
989
+ # self.assertTrue(sol.success)
990
+ # self.assertAlmostEqual(np.linalg.norm(T - puma.fkine(sol.q)), 0, places=5)
991
991
992
- q0 = np .r_ [0.1 , 0.1 , 0.1 , 0.2 , 0.3 , 0.4 ]
993
- sol = puma .ikine_min (T , q0 = q0 )
994
- self .assertTrue (sol .success )
995
- self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 5 )
992
+ # q0 = np.r_[0.1, 0.1, 0.1, 0.2, 0.3, 0.4]
993
+ # sol = puma.ikine_min(T, q0=q0)
994
+ # self.assertTrue(sol.success)
995
+ # self.assertAlmostEqual(np.linalg.norm(T - puma.fkine(sol.q)), 0, places=5)
996
996
997
- def test_ikine_con (self ):
998
- puma = rp .models .DH .Puma560 ()
997
+ # def test_ikine_con(self):
998
+ # puma = rp.models.DH.Puma560()
999
999
1000
- T = puma .fkine (puma .qn )
1000
+ # T = puma.fkine(puma.qn)
1001
1001
1002
- sol = puma .ikine_min (T , qlim = True )
1003
- self .assertTrue (sol .success )
1004
- self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 5 )
1002
+ # sol = puma.ikine_min(T, qlim=True)
1003
+ # self.assertTrue(sol.success)
1004
+ # self.assertAlmostEqual(np.linalg.norm(T - puma.fkine(sol.q)), 0, places=5)
1005
1005
1006
- q0 = np .r_ [0.1 , 0.1 , 0.1 , 0.2 , 0.3 , 0.4 ]
1007
- sol = puma .ikine_min (T , q0 = q0 , qlim = True )
1008
- self .assertTrue (sol .success )
1009
- self .assertAlmostEqual (np .linalg .norm (T - puma .fkine (sol .q )), 0 , places = 5 )
1006
+ # q0 = np.r_[0.1, 0.1, 0.1, 0.2, 0.3, 0.4]
1007
+ # sol = puma.ikine_min(T, q0=q0, qlim=True)
1008
+ # self.assertTrue(sol.success)
1009
+ # self.assertAlmostEqual(np.linalg.norm(T - puma.fkine(sol.q)), 0, places=5)
1010
1010
1011
1011
# def test_ikine_min(self):
1012
1012
# puma = rp.models.DH.Puma560()
@@ -1403,7 +1403,7 @@ def test_perturb(self):
1403
1403
1404
1404
def test_teach (self ):
1405
1405
panda = rp .models .DH .Panda ()
1406
- e = panda .teach (block = False )
1406
+ e = panda .teach (panda . q , block = False )
1407
1407
e .close ()
1408
1408
1409
1409
def test_teach_withq (self ):
@@ -1418,8 +1418,8 @@ def test_plot(self):
1418
1418
1419
1419
def test_teach_basic (self ):
1420
1420
l0 = rp .DHLink (d = 2 )
1421
- r0 = rp .DHRobot ([l0 , l0 ])
1422
- e = r0 .teach (block = False )
1421
+ r0 = rp .DHRobot ([l0 , l0 . copy () ])
1422
+ e = r0 .teach (r0 . q , block = False )
1423
1423
e .step ()
1424
1424
e .close ()
1425
1425
@@ -1440,35 +1440,23 @@ def test_control_type(self):
1440
1440
def test_plot_vellipse (self ):
1441
1441
panda = rp .models .DH .Panda ()
1442
1442
1443
- e = panda .plot_vellipse (block = False , limits = [1 , 2 , 1 , 2 , 1 , 2 ])
1443
+ e = panda .plot_vellipse (panda . q , block = False , limits = [1 , 2 , 1 , 2 , 1 , 2 ])
1444
1444
e .close ()
1445
1445
1446
- e = panda .plot_vellipse (block = False , q = panda . qr , centre = "ee" , opt = "rot" )
1446
+ e = panda .plot_vellipse (panda . q , block = False , centre = "ee" , opt = "rot" )
1447
1447
e .step ()
1448
1448
e .close ()
1449
1449
1450
- with self .assertRaises (TypeError ):
1451
- panda .plot_vellipse (q = panda .qr , vellipse = 10 )
1452
-
1453
- with self .assertRaises (ValueError ):
1454
- panda .plot_vellipse (q = panda .qr , centre = "ff" )
1455
-
1456
1450
def test_plot_fellipse (self ):
1457
1451
panda = rp .models .DH .Panda ()
1458
1452
1459
1453
e = panda .plot_fellipse (q = panda .qr , block = False , limits = [1 , 2 , 1 , 2 , 1 , 2 ])
1460
1454
e .close ()
1461
1455
1462
- e = panda .plot_fellipse (block = False , q = panda .qr , centre = "ee" , opt = "rot" )
1456
+ e = panda .plot_fellipse (panda .qr , block = False , centre = "ee" , opt = "rot" )
1463
1457
e .step ()
1464
1458
e .close ()
1465
1459
1466
- with self .assertRaises (TypeError ):
1467
- panda .plot_fellipse (q = panda .qr , fellipse = 10 )
1468
-
1469
- with self .assertRaises (ValueError ):
1470
- panda .plot_fellipse (q = panda .qr , centre = "ff" )
1471
-
1472
1460
def test_plot_with_vellipse (self ):
1473
1461
panda = rp .models .DH .Panda ()
1474
1462
e = panda .plot (panda .qr , block = False , vellipse = True , backend = "pyplot" )
0 commit comments