7 from localizer_dwm1001.msg
import Anchor
28 rospy.init_node(
'test_anchor_1')
29 rospy.Subscriber(
"/dwm1001/anchor1", 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.anchor1.id, str):
44 self.assertTrue(
False)
49 if isinstance(self.anchor1.x, float):
52 self.assertTrue(
False)
57 if isinstance(self.anchor1.y, float):
60 self.assertTrue(
False)
65 if isinstance(self.anchor1.z, float):
68 self.assertTrue(
False)
73 if isinstance(self.anchor1.distanceFromTag, float):
76 self.assertTrue(
False)
80 if __name__ ==
'__main__':
81 rosunit.unitrun(
'localizer_dwm1001',
'test_Anchor_1_Publisher', Anchor1TestCase)
def test_if_anchor_1_y_is_float(self)
def test_if_anchor_1_z_is_float(self)
def test_if_anchor_1_is_published(self)
def test_if_anchor_1_id_is_string(self)
def test_if_anchor_1_distanceFromTag_is_float(self)
def test_if_anchor_1_x_is_float(self)