mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-28 14:09:33 +00:00
aruco_pose: improve tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
5
aruco_pose/test/basic.txt
Normal file
5
aruco_pose/test/basic.txt
Normal 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
|
||||
Reference in New Issue
Block a user