Skip to content

Commit

Permalink
Loose test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
iory committed Feb 8, 2024
1 parent 02839f6 commit 92910e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ros/kxr_controller/test/test_kxr_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ def test_follow_joint_trajectory(self):
self.ri.wait_interpolation()
rospy.sleep(1.0)
current_angles = self.ri.angle_vector()
testing.assert_array_almost_equal(
np.rad2deg(current_angles), [45, 45],
decimal=0)
expected_angles = 45 * np.ones(len(current_angles))
self.assertTrue(
np.all(np.abs(np.rad2deg(current_angles)
- expected_angles) <= 2.0),
f"The difference in angles exceeds 2 degrees: "
f"Current angles = {current_angles}, "
f"Expected angles = {expected_angles}")
self.ri.angle_vector(self.robot_model.init_pose(), 1.0)
self.ri.wait_interpolation()
self.ri.servo_off()
Expand Down

0 comments on commit 92910e2

Please sign in to comment.