10 import roslib; roslib.load_manifest(PKG)
20 from hrpsys
import rtm
26 class PA10(HrpsysConfigurator):
29 [
'seq',
"SequencePlayer"],
30 [
'sh',
"StateHolder"],
31 [
'fk',
"ForwardKinematics"],
32 [
'log',
"DataLogger"],
42 h.init(robotname=
"PA10Controller(Robot)0")
47 print >>sys.stderr,
"log=",h.log,
"log_svc=",h.log_svc
48 self.assertTrue(h.log)
49 self.assertTrue(h.log_svc)
54 print >>sys.stderr, h.getJointAngles()
55 self.assertEqual(len(h.getJointAngles()), int(9))
60 self.assertTrue(h.setJointAngles(h.getJointAngles(),1))
61 self.assertEqual(h.waitInterpolation(),
None)
64 a = [(360*random.random()-180)
for i
in xrange(len(h.getJointAngles()))]
65 self.assertTrue(h.setJointAngles(a,2))
66 self.assertEqual(h.waitInterpolation(),
None)
68 a = [0
for i
in xrange(len(h.getJointAngles()))]
69 self.assertTrue(h.setJointAngles(a,2))
70 self.assertEqual(h.waitInterpolation(),
None)
73 if __name__ ==
'__main__':
74 rostest.run(PKG, NAME, TestJointAngle, sys.argv)
def test_set_if_find_log(self)
def test_get_joint_angles(self)
def test_set_joint_angles(self)