Skip to content

Commit 9c2786b

Browse files
author
David Butterworth
committed
Add Unit Test CheckJointLimits_MaxLimitOneJoint to test.
1 parent 25cdf18 commit 9c2786b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_util.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ def test_CheckJointLimits_MinLimitAll(self):
209209
else:
210210
self.fail('Expected exception not thrown')
211211

212+
def test_CheckJointLimits_MaxLimitOneJoint(self):
213+
# Individually check for when one joint is beyond the max limit
214+
for i in xrange(0,7):
215+
q = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
216+
q[i] = +4.5
217+
with self.assertRaises(JointLimitError):
218+
prpy.util.CheckJointLimits(self.robot, q)
219+
212220
def test_CheckJointLimits_MaxLimitAll(self):
213221
# This configuration is beyond the max limits
214222
q0 = [2.7, 2.0, 2.8, 0.9, 4.9, 1.6, 3.1]

0 commit comments

Comments
 (0)