8 from nose.tools
import assert_false
9 from nose.tools
import assert_true
17 NAME =
'test_cluster_point_indices_decomposer_box' 22 super(TestClusterPointIndicesDecomposerBbox, self).
__init__(*args)
29 msg = rospy.wait_for_message(
"~boxes", BoundingBoxArray)
31 is_boxes_empty =
False 32 assert_false(math.isnan(box.pose.position.x),
33 'pose.position.x is nan')
34 assert_false(math.isnan(box.pose.position.y),
35 'pose.position.y is nan')
36 assert_false(math.isnan(box.pose.position.z),
37 'pose.position.z is nan')
38 assert_false(math.isnan(box.pose.orientation.x),
39 'pose.orientation.x is nan')
40 assert_false(math.isnan(box.pose.orientation.y),
41 'pose.orientation.y is nan')
42 assert_false(math.isnan(box.pose.orientation.z),
43 'pose.orientation.z is nan')
44 assert_false(math.isnan(box.pose.orientation.w),
45 'pose.orientation.w is nan')
46 assert_false(math.isnan(box.dimensions.x),
47 'dimensions.x is nan')
48 assert_false(math.isnan(box.dimensions.y),
49 'dimensions.y is nan')
50 assert_false(math.isnan(box.dimensions.z),
51 'dimensions.z is nan')
52 assert_true(box.dimensions.x != 0,
'dimensions.x is 0')
53 assert_true(box.dimensions.y != 0,
'dimensions.y is 0')
54 assert_true(box.dimensions.z != 0,
'dimensions.z is 0')
57 'Bboxes array is always empty in %d trials' % self.
check_times 61 if __name__ ==
'__main__':
62 rostest.run(PKG, NAME, TestClusterPointIndicesDecomposerBbox, sys.argv)