def test_str(self): r0 = rp.models.DH.Puma560() r1 = rp.models.DH.Panda() str(r0) str(r1) l0 = rp.PrismaticDH(offset=1.0, qlim=[-1, 1]) l1 = rp.RevoluteDH(flip=True, offset=1.0, qlim=[-1, 1]) r2 = rp.DHRobot([l0, l1]) str(r2) l0 = rp.PrismaticMDH(offset=1.0, qlim=[-1, 1]) l1 = rp.RevoluteMDH(flip=True, offset=1.0, qlim=[-1, 1]) r3 = rp.DHRobot([l0, l1]) str(r3) l0 = rp.PrismaticDH(offset=1.0) l1 = rp.RevoluteDH(flip=True, offset=1.0) r4 = rp.DHRobot([l0, l1]) str(r4) l0 = rp.PrismaticMDH(offset=1.0) l1 = rp.RevoluteMDH(flip=True, offset=1.0) r5 = rp.DHRobot([l0, l1], base=sm.SE3.Tx(0.1), tool=sm.SE3.Tx(0.1)) str(r5)
def test_ikine6s_fail(self): l0 = rp.RevoluteDH(alpha=np.pi / 2) l1 = rp.RevoluteDH(d=1.0) l2 = rp.RevoluteDH(alpha=np.pi / 2) l3 = rp.RevoluteDH(alpha=-np.pi / 2) l4a = rp.RevoluteDH(alpha=np.pi / 2) l4b = rp.RevoluteDH() l5 = rp.RevoluteDH() l6 = rp.RevoluteMDH() r0 = rp.DHRobot([l0, l1, l2, l3, l4a, l5]) r1 = rp.DHRobot([l0, l1, l2, l3, l4b, l5]) r2 = rp.DHRobot([l1, l2, l3]) r3 = rp.DHRobot([l6, l6, l6, l6, l6, l6]) puma = rp.models.DH.Puma560() T = sm.SE3(0, 10, 10) puma.ikine6s(T) q = [1, 1, 1, 1, 1, 1] T = r0.fkine(q) with self.assertRaises(ValueError): r0.ikine6s(T) with self.assertRaises(ValueError): r1.ikine6s(T) with self.assertRaises(ValueError): r2.ikine6s(T) with self.assertRaises(ValueError): r3.ikine6s(T)