Skip to content

Commit

Permalink
add test for getJointAnglesOfGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Jul 24, 2018
1 parent 8d5c2ce commit 49696ab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hironx_ros_bridge/test/test_hironx_limb.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ def test_rarm_setJointAnglesOfGroup_minus(self):

self.robot.el_svc.setServoErrorLimit("all", 0.18) # default is 0.18

def test_getJointAnglesOfGroup(self):
self.robot.setJointAnglesOfGroup("torso", [-1.234], 3, wait=False)
self.robot.setJointAnglesOfGroup("head", [5.6789, -10.1112], 3, wait=False)
self.robot.setJointAnglesOfGroup("rarm", [-1.6, 0, -100, 15.2, 9.4,-3.2], 3, wait=False)
self.robot.setJointAnglesOfGroup("larm", [ 1.6, 0, -100,-15.2, 9.4, 3.2], 3, wait=True)
numpy.testing.assert_array_almost_equal([-1.234], self.robot.getJointAnglesOfGroup("torso"))
numpy.testing.assert_array_almost_equal([5.6789, -10.1112], self.robot.getJointAnglesOfGroup("head"))
numpy.testing.assert_array_almost_equal([-1.6, 0, -100, 15.2, 9.4,-3.2], self.robot.getJointAnglesOfGroup("rarm"))
numpy.testing.assert_array_almost_equal([ 1.6, 0, -100,-15.2, 9.4, 3.2], self.robot.getJointAnglesOfGroup("larm"))

def test_movejoints_neck_waist(self):
'''
Move neck and waist joints to the positional limit defined in
Expand Down

0 comments on commit 49696ab

Please sign in to comment.