5 from nose.tools
import assert_false
6 from nose.tools
import assert_true
12 NAME =
'test_rearrange_bounding_box_rotation'
16 super(TestRearrangeBoundingBoxRotation, self).
__init__(*args)
19 rotated_boxes_sub = rospy.Subscriber(
"/rearrange_bounding_box_check/output",
20 BoundingBoxArray, self.
_cb)
23 while not rospy.is_shutdown():
25 rospy.loginfo(
"Test rotated bounding box")
26 assert_false((abs(self.
msg.boxes[0].pose.orientation.w - 1.0) < 1e-7
and
27 abs(self.
msg.boxes[0].pose.orientation.x) < 1e-7
and
28 abs(self.
msg.boxes[0].pose.orientation.y) < 1e-7
and
29 abs(self.
msg.boxes[0].pose.orientation.z) < 1e-7),
30 "The rotation calculations are not correct.")
36 if __name__ ==
'__main__':
38 rostest.run(PKG, NAME, TestRearrangeBoundingBoxRotation, sys.argv)