8 from localizer_dwm1001.msg
import Anchor
9 from localizer_dwm1001.msg
import Tag
30 rospy.init_node(
'test_anchor_0')
31 rospy.Subscriber(
"/dwm1001/anchor0", Anchor, self.
callback)
34 while not rospy.is_shutdown()
and counter < 5
and (
not self.
anchorData_ok):
37 rospy.loginfo(
"looping")
43 if isinstance(self.anchor0.id, str):
46 self.assertTrue(
False)
51 if isinstance(self.anchor0.x, float):
54 self.assertTrue(
False)
59 if isinstance(self.anchor0.y, float):
62 self.assertTrue(
False)
67 if isinstance(self.anchor0.z, float):
70 self.assertTrue(
False)
75 if isinstance(self.anchor0.distanceFromTag, float):
78 self.assertTrue(
False)
84 if __name__ ==
'__main__':
85 rosunit.unitrun(
'localizer_dwm1001',
'test_Anchor_0_Publisher', Anchor0TestCase)
def test_if_anchor_0_distanceFromTag_is_float(self)
def test_if_anchor_0_id_is_string(self)
def test_if_anchor_0_is_published(self)
def test_if_anchor_0_y_is_float(self)
def test_if_anchor_0_x_is_float(self)
def test_if_anchor_0_z_is_float(self)