7 from localizer_dwm1001.msg
import Anchor
28 rospy.init_node(
'test_anchor_3')
29 rospy.Subscriber(
"/dwm1001/anchor3", Anchor, self.
callback)
32 while not rospy.is_shutdown()
and counter < 5
and (
not self.
anchorData_ok):
35 rospy.loginfo(
"looping")
41 if isinstance(self.anchor3.id, str):
44 self.assertTrue(
False)
49 if isinstance(self.anchor3.x, float):
52 self.assertTrue(
False)
57 if isinstance(self.anchor3.y, float):
60 self.assertTrue(
False)
65 if isinstance(self.anchor3.z, float):
68 self.assertTrue(
False)
73 if isinstance(self.anchor3.distanceFromTag, float):
76 self.assertTrue(
False)
80 if __name__ ==
'__main__':
81 rosunit.unitrun(
'localizer_dwm1001',
'test_Anchor_3_Publisher', Anchor3TestCase)
def test_if_anchor_3_distanceFromTag_is_float(self)
def test_if_anchor_3_y_is_float(self)
def test_if_anchor_3_z_is_float(self)
def test_if_anchor_3_x_is_float(self)
def test_if_anchor_3_id_is_string(self)
def test_if_anchor_3_is_published(self)