aruco_pose: improve tests

This commit is contained in:
Oleg Kalachev
2019-03-02 23:59:13 +03:00
parent 7a56a7b231
commit 394af64553
3 changed files with 18 additions and 1 deletions

View File

@@ -65,6 +65,9 @@ class TestArucoPose(unittest.TestCase):
def test_visualization(self):
vis = rospy.wait_for_message('aruco_detect/visualization', VisMarkerArray, timeout=5)
def test_debug(self):
img = rospy.wait_for_message('aruco_detect/debug', Image, timeout=5)
def test_map(self):
pose = rospy.wait_for_message('aruco_map/pose', PoseWithCovarianceStamped, timeout=5)
assert pose.header.frame_id == 'main_camera_optical'
@@ -76,6 +79,15 @@ class TestArucoPose(unittest.TestCase):
assert pose.pose.pose.orientation.z == approx(-0.0300861070302)
assert pose.pose.pose.orientation.w == approx(0.0482143590507)
def test_map_image(self):
img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
def test_map_visualization(self):
vis = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
def test_map_debug(self):
img = rospy.wait_for_message('aruco_map/debug', Image, timeout=5)
# def test_transforms(self):
# pass

View File

@@ -20,7 +20,7 @@
<remap from="camera_info" to="main_camera/camera_info"/>
<remap from="markers" to="aruco_detect/markers"/>
<param name="type" value="map"/>
<param name="map" value="$(find aruco_pose)/map/map.txt"/>
<param name="map" value="$(find aruco_pose)/test/basic.txt"/>
</node>
<test test-name="test_aruco_pose" pkg="aruco_pose" type="basic.py"/>

View File

@@ -0,0 +1,5 @@
1 0.33 0 0 0 0 0 0
2 0.33 1 0 0 0 0 0
3 0.33 0 1 0 0 0 0
4 0.33 1 1 0 0 0 0
10 0.5 0.5 2 0 1.2 0 0