aruco_pose: implement test for TF_REPEATED_DATA when multiple markers with the same ID

This commit is contained in:
Oleg Kalachev
2022-09-14 12:35:16 +03:00
parent 1efe10c9dd
commit d06b0a0cd2
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import pytest
import subprocess
def test_no_tf_repeated_data():
# `/rosout` acts weirdly inside rostest, so using a subprocess
cmd = """python -c 'import rospy, tf; rospy.init_node("foo"); listener = tf.TransformListener(); rospy.sleep(2)'"""
output = str(subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT))
assert 'TF_REPEATED_DATA' not in output, 'TF_REPEATED_DATA was logged on duplicate markers'