mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
Use pytest for tests (#133)
* aruco_pose: use pytest * Use ros_pytest * Add ros_pytest to rosdep * aruco_pose: compare floats more roughly in pytest * aruco_pose: rewrite all the rest tests in pytest
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
<depend>rostest</depend>
|
||||
|
||||
<test_depend>image_publisher</test_depend>
|
||||
<test_depend>ros_pytest</test_depend>
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import unittest
|
||||
import json
|
||||
import rospy
|
||||
import rostest
|
||||
import pytest
|
||||
|
||||
from geometry_msgs.msg import PoseWithCovarianceStamped
|
||||
from sensor_msgs.msg import Image
|
||||
@@ -11,91 +7,88 @@ from aruco_pose.msg import MarkerArray
|
||||
from visualization_msgs.msg import MarkerArray as VisMarkerArray
|
||||
|
||||
|
||||
class TestArucoPose(unittest.TestCase):
|
||||
def setUp(self):
|
||||
rospy.init_node('test_aruco_detect', anonymous=True)
|
||||
@pytest.fixture
|
||||
def node():
|
||||
return rospy.init_node('aruco_pose_test', anonymous=True)
|
||||
|
||||
def test_markers(self):
|
||||
markers = rospy.wait_for_message('aruco_detect/markers', MarkerArray, timeout=5)
|
||||
self.assertEqual(len(markers.markers), 4)
|
||||
self.assertEqual(markers.header.frame_id, 'main_camera_optical')
|
||||
def approx(expected):
|
||||
return pytest.approx(expected, abs=1e-4) # compare floats more roughly
|
||||
|
||||
self.assertEqual(markers.markers[0].id, 2)
|
||||
self.assertAlmostEqual(markers.markers[0].length, 0.33, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.x, 0.36706567854, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.y, 0.290484516644, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.z, 2.18787602301, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.orientation.x, 0.993997406299, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.orientation.y, -0.00532003481626, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.orientation.z, -0.107390951553, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.orientation.w, 0.0201999263402, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c1.x, 415.557739258, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c1.y, 335.557739258, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c2.x, 509.442260742, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c2.y, 335.557739258, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c3.x, 509.442260742, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c3.y, 429.442260742, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c4.x, 415.557739258, places=4)
|
||||
self.assertAlmostEqual(markers.markers[0].c4.y, 429.442260742, places=4)
|
||||
def test_markers(node):
|
||||
markers = rospy.wait_for_message('aruco_detect/markers', MarkerArray, timeout=5)
|
||||
assert len(markers.markers) == 4
|
||||
assert markers.header.frame_id == 'main_camera_optical'
|
||||
|
||||
self.assertEqual(markers.markers[3].id, 3)
|
||||
self.assertAlmostEqual(markers.markers[3].length, 0.1, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.x, -0.1805169666, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.y, -0.200697302327, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.z, 0.585767514823, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.orientation.x, -0.961738074009, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.orientation.y, -0.0375180244707, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.orientation.z, -0.0115387773672, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.orientation.w, 0.271144115664, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c1.x, 129.557723999, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c1.y, 49.557723999, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c2.x, 223.442276001, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c2.y, 49.557723999, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c3.x, 223.442276001, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c3.y, 143.442276001, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c4.x, 129.557723999, places=4)
|
||||
self.assertAlmostEqual(markers.markers[3].c4.y, 143.442276001, places=4)
|
||||
assert markers.markers[0].id == 2
|
||||
assert markers.markers[0].length == approx(0.33)
|
||||
assert markers.markers[0].pose.position.x == approx(0.36706567854)
|
||||
assert markers.markers[0].pose.position.y == approx(0.290484516644)
|
||||
assert markers.markers[0].pose.position.z == approx(2.18787602301)
|
||||
assert markers.markers[0].pose.orientation.x == approx(0.993997406299)
|
||||
assert markers.markers[0].pose.orientation.y == approx(-0.00532003481626)
|
||||
assert markers.markers[0].pose.orientation.z == approx(-0.107390951553)
|
||||
assert markers.markers[0].pose.orientation.w == approx(0.0201999263402)
|
||||
assert markers.markers[0].c1.x == approx(415.557739258)
|
||||
assert markers.markers[0].c1.y == approx(335.557739258)
|
||||
assert markers.markers[0].c2.x == approx(509.442260742)
|
||||
assert markers.markers[0].c2.y == approx(335.557739258)
|
||||
assert markers.markers[0].c3.x == approx(509.442260742)
|
||||
assert markers.markers[0].c3.y == approx(429.442260742)
|
||||
assert markers.markers[0].c4.x == approx(415.557739258)
|
||||
assert markers.markers[0].c4.y == approx(429.442260742)
|
||||
|
||||
self.assertEqual(markers.markers[1].id, 1)
|
||||
self.assertAlmostEqual(markers.markers[1].length, 0.33, places=4)
|
||||
self.assertEqual(markers.markers[2].id, 4)
|
||||
self.assertAlmostEqual(markers.markers[2].length, 0.33, places=4)
|
||||
assert markers.markers[3].id == 3
|
||||
assert markers.markers[3].length == approx(0.1)
|
||||
assert markers.markers[3].pose.position.x == approx(-0.1805169666)
|
||||
assert markers.markers[3].pose.position.y == approx(-0.200697302327)
|
||||
assert markers.markers[3].pose.position.z == approx(0.585767514823)
|
||||
assert markers.markers[3].pose.orientation.x == approx(-0.961738074009)
|
||||
assert markers.markers[3].pose.orientation.y == approx(-0.0375180244707)
|
||||
assert markers.markers[3].pose.orientation.z == approx(-0.0115387773672)
|
||||
assert markers.markers[3].pose.orientation.w == approx(0.271144115664)
|
||||
assert markers.markers[3].c1.x == approx(129.557723999)
|
||||
assert markers.markers[3].c1.y == approx(49.557723999)
|
||||
assert markers.markers[3].c2.x == approx(223.442276001)
|
||||
assert markers.markers[3].c2.y == approx(49.557723999)
|
||||
assert markers.markers[3].c3.x == approx(223.442276001)
|
||||
assert markers.markers[3].c3.y == approx(143.442276001)
|
||||
assert markers.markers[3].c4.x == approx(129.557723999)
|
||||
assert markers.markers[3].c4.y == approx(143.442276001)
|
||||
|
||||
def test_visualization(self):
|
||||
vis = rospy.wait_for_message('aruco_detect/visualization', VisMarkerArray, timeout=5)
|
||||
self.assertEqual(len(vis.markers), 9)
|
||||
assert markers.markers[1].id == 1
|
||||
assert markers.markers[1].length == approx(0.33)
|
||||
assert markers.markers[2].id == 4
|
||||
assert markers.markers[2].length == approx(0.33)
|
||||
|
||||
def test_debug(self):
|
||||
img = rospy.wait_for_message('aruco_detect/debug', Image, timeout=5)
|
||||
self.assertEqual(img.width, 640)
|
||||
self.assertEqual(img.height, 480)
|
||||
self.assertEqual(img.header.frame_id, 'main_camera_optical')
|
||||
def test_visualization(node):
|
||||
vis = rospy.wait_for_message('aruco_detect/visualization', VisMarkerArray, timeout=5)
|
||||
assert len(vis.markers) == 9
|
||||
|
||||
def test_map(self):
|
||||
pose = rospy.wait_for_message('aruco_map/pose', PoseWithCovarianceStamped, timeout=5)
|
||||
self.assertEqual(pose.header.frame_id, 'main_camera_optical')
|
||||
self.assertAlmostEqual(pose.pose.pose.position.x, -0.629167753342, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.position.y, 0.293822650809, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.position.z, 2.12641343155, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.orientation.x, -0.998383794799, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.orientation.y, -5.20919098575e-06, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.orientation.z, -0.0300861070302, places=4)
|
||||
self.assertAlmostEqual(pose.pose.pose.orientation.w, 0.0482143590507, places=4)
|
||||
def test_debug(node):
|
||||
img = rospy.wait_for_message('aruco_detect/debug', Image, timeout=5)
|
||||
assert img.width == 640
|
||||
assert img.height == 480
|
||||
assert img.header.frame_id == 'main_camera_optical'
|
||||
|
||||
def test_map_image(self):
|
||||
img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
|
||||
self.assertEqual(img.width, 2000)
|
||||
self.assertEqual(img.height, 2000)
|
||||
self.assertEqual(img.encoding, 'mono8')
|
||||
def test_map(node):
|
||||
pose = rospy.wait_for_message('aruco_map/pose', PoseWithCovarianceStamped, timeout=5)
|
||||
assert pose.header.frame_id == 'main_camera_optical'
|
||||
assert pose.pose.pose.position.x == approx(-0.629167753342)
|
||||
assert pose.pose.pose.position.y == approx(0.293822650809)
|
||||
assert pose.pose.pose.position.z == approx(2.12641343155)
|
||||
assert pose.pose.pose.orientation.x == approx(-0.998383794799)
|
||||
assert pose.pose.pose.orientation.y == approx(-5.20919098575e-06)
|
||||
assert pose.pose.pose.orientation.z == approx(-0.0300861070302)
|
||||
assert pose.pose.pose.orientation.w == approx(0.0482143590507)
|
||||
|
||||
def test_map_visualization(self):
|
||||
vis = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
def test_map_image(node):
|
||||
img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
|
||||
assert img.width == 2000
|
||||
assert img.height == 2000
|
||||
assert img.encoding == 'mono8'
|
||||
|
||||
def test_map_debug(self):
|
||||
img = rospy.wait_for_message('aruco_map/debug', Image, timeout=5)
|
||||
def test_map_visualization(node):
|
||||
vis = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
|
||||
# def test_transforms(self):
|
||||
# pass
|
||||
|
||||
|
||||
rostest.rosrun('aruco_pose', 'test_aruco_detect', TestArucoPose, sys.argv)
|
||||
def test_map_debug(node):
|
||||
img = rospy.wait_for_message('aruco_map/debug', Image, timeout=5)
|
||||
|
||||
@@ -23,5 +23,6 @@
|
||||
<param name="map" value="$(find aruco_pose)/test/basic.txt"/>
|
||||
</node>
|
||||
|
||||
<test test-name="test_aruco_pose" pkg="aruco_pose" type="basic.py"/>
|
||||
<param name="test_module" value="$(find aruco_pose)/test/basic.py"/>
|
||||
<test test-name="aruco_pose_test" pkg="ros_pytest" type="ros_pytest_runner"/>
|
||||
</launch>
|
||||
|
||||
@@ -1,27 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import unittest
|
||||
import json
|
||||
import rospy
|
||||
import rostest
|
||||
import pytest
|
||||
|
||||
from geometry_msgs.msg import PoseWithCovarianceStamped
|
||||
from sensor_msgs.msg import Image
|
||||
from aruco_pose.msg import MarkerArray
|
||||
from visualization_msgs.msg import MarkerArray as VisMarkerArray
|
||||
|
||||
|
||||
class TestArucoMapPass(unittest.TestCase):
|
||||
def setUp(self):
|
||||
rospy.init_node('test_parser_fail', anonymous=True)
|
||||
@pytest.fixture
|
||||
def node():
|
||||
return rospy.init_node('aruco_pose_test', anonymous=True)
|
||||
|
||||
def test_node_failure(self):
|
||||
try:
|
||||
markers = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
did_post_message = True
|
||||
except rospy.exceptions.ROSException:
|
||||
did_post_message = False
|
||||
self.assertFalse(did_post_message)
|
||||
|
||||
|
||||
rostest.rosrun('aruco_pose', 'test_aruco_map', TestArucoMapPass, sys.argv)
|
||||
def test_node_failure(node):
|
||||
with pytest.raises(rospy.exceptions.ROSException):
|
||||
rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
<param name="map" value="$(find aruco_pose)/test/test_node_failure.txt"/>
|
||||
</node>
|
||||
|
||||
<test test-name="test_aruco_map_fail_dict" pkg="aruco_pose" type="test_node_failure.py"/>
|
||||
<param name="test_module" value="$(find aruco_pose)/test/test_node_failure.py"/>
|
||||
<test test-name="test_node_failure" pkg="ros_pytest" type="ros_pytest_runner"/>
|
||||
</launch>
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import unittest
|
||||
import json
|
||||
import rospy
|
||||
import rostest
|
||||
import pytest
|
||||
|
||||
from geometry_msgs.msg import PoseWithCovarianceStamped
|
||||
from sensor_msgs.msg import Image
|
||||
from aruco_pose.msg import MarkerArray
|
||||
from visualization_msgs.msg import MarkerArray as VisMarkerArray
|
||||
|
||||
|
||||
class TestArucoMapPass(unittest.TestCase):
|
||||
def setUp(self):
|
||||
rospy.init_node('test_parser_fail', anonymous=True)
|
||||
@pytest.fixture
|
||||
def node():
|
||||
return rospy.init_node('aruco_pose_test_empty_map', anonymous=True)
|
||||
|
||||
|
||||
def test_node_failure(self):
|
||||
markers = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
self.assertEquals(len(markers.markers), 0)
|
||||
|
||||
|
||||
rostest.rosrun('aruco_pose', 'test_aruco_map', TestArucoMapPass, sys.argv)
|
||||
def test_empty_map(node):
|
||||
markers = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
assert len(markers.markers) == 0
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
<param name="map" value="$(find aruco_pose)/test/test_parser_empty_map.txt"/>
|
||||
</node>
|
||||
|
||||
<test test-name="test_aruco_map_incomplete" pkg="aruco_pose" type="test_parser_empty_map.py"/>
|
||||
<param name="test_module" value="$(find aruco_pose)/test/test_parser_empty_map.py"/>
|
||||
<test test-name="test_node_empty_map" pkg="ros_pytest" type="ros_pytest_runner"/>
|
||||
</launch>
|
||||
|
||||
@@ -1,75 +1,61 @@
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import unittest
|
||||
import json
|
||||
import rospy
|
||||
import rostest
|
||||
import pytest
|
||||
|
||||
from geometry_msgs.msg import PoseWithCovarianceStamped
|
||||
from sensor_msgs.msg import Image
|
||||
from aruco_pose.msg import MarkerArray
|
||||
from visualization_msgs.msg import MarkerArray as VisMarkerArray
|
||||
|
||||
|
||||
class TestArucoMapPass(unittest.TestCase):
|
||||
def setUp(self):
|
||||
rospy.init_node('test_parser_pass', anonymous=True)
|
||||
@pytest.fixture
|
||||
def node():
|
||||
return rospy.init_node('aruco_pose_test', anonymous=True)
|
||||
|
||||
def test_markers(self):
|
||||
markers = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
|
||||
self.assertEqual(len(markers.markers), 6)
|
||||
# FIXME: visual marker id is not ArUco marker id
|
||||
# self.assertEqual(markers.markers[0].id, 1)
|
||||
# self.assertEqual(markers.markers[1].id, 2)
|
||||
# self.assertEqual(markers.markers[2].id, 3)
|
||||
# self.assertEqual(markers.markers[3].id, 4)
|
||||
def approx(expected):
|
||||
return pytest.approx(expected, abs=1e-4) # compare floats more roughly
|
||||
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.x, 0, places=7)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.y, 0, places=7)
|
||||
self.assertAlmostEqual(markers.markers[0].pose.position.z, 0, places=7)
|
||||
|
||||
self.assertAlmostEqual(markers.markers[1].pose.position.x, 1, places=7)
|
||||
self.assertAlmostEqual(markers.markers[1].pose.position.y, 1, places=7)
|
||||
self.assertAlmostEqual(markers.markers[1].pose.position.z, 1, places=7)
|
||||
|
||||
self.assertAlmostEqual(markers.markers[2].pose.position.x, 1, places=7)
|
||||
self.assertAlmostEqual(markers.markers[2].pose.position.y, 0, places=7)
|
||||
self.assertAlmostEqual(markers.markers[2].pose.position.z, 0.5, places=7)
|
||||
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.x, 0, places=7)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.y, 1, places=7)
|
||||
self.assertAlmostEqual(markers.markers[3].pose.position.z, 0, places=7)
|
||||
|
||||
self.assertAlmostEqual(markers.markers[4].pose.position.x, 1, places=7)
|
||||
self.assertAlmostEqual(markers.markers[4].pose.position.y, 0.5, places=7)
|
||||
self.assertAlmostEqual(markers.markers[4].pose.position.z, 0, places=7)
|
||||
|
||||
self.assertAlmostEqual(markers.markers[5].pose.position.x, 2.2, places=7)
|
||||
self.assertAlmostEqual(markers.markers[5].pose.position.y, 0.2, places=7)
|
||||
self.assertAlmostEqual(markers.markers[5].pose.position.z, 0, places=7)
|
||||
def test_markers(node):
|
||||
markers = rospy.wait_for_message('aruco_map/visualization', VisMarkerArray, timeout=5)
|
||||
assert len(markers.markers) == 6
|
||||
|
||||
self.assertAlmostEqual(markers.markers[0].scale.x, 0.33, places=7)
|
||||
self.assertAlmostEqual(markers.markers[0].scale.y, 0.33, places=7)
|
||||
self.assertAlmostEqual(markers.markers[1].scale.x, 0.225, places=7)
|
||||
self.assertAlmostEqual(markers.markers[1].scale.y, 0.225, places=7)
|
||||
self.assertAlmostEqual(markers.markers[2].scale.x, 0.45, places=7)
|
||||
self.assertAlmostEqual(markers.markers[2].scale.y, 0.45, places=7)
|
||||
self.assertAlmostEqual(markers.markers[3].scale.x, 0.15, places=7)
|
||||
self.assertAlmostEqual(markers.markers[3].scale.y, 0.15, places=7)
|
||||
self.assertAlmostEqual(markers.markers[4].scale.x, 0.25, places=7)
|
||||
self.assertAlmostEqual(markers.markers[4].scale.y, 0.25, places=7)
|
||||
self.assertAlmostEqual(markers.markers[5].scale.x, 0.35, places=7)
|
||||
self.assertAlmostEqual(markers.markers[5].scale.y, 0.35, places=7)
|
||||
assert markers.markers[0].pose.position.x == approx(0)
|
||||
assert markers.markers[0].pose.position.y == approx(0)
|
||||
assert markers.markers[0].pose.position.z == approx(0)
|
||||
|
||||
def test_map_image(self):
|
||||
img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
|
||||
self.assertEqual(img.width, 2000)
|
||||
self.assertEqual(img.height, 2000)
|
||||
self.assertEqual(img.encoding, 'mono8')
|
||||
assert markers.markers[1].pose.position.x == approx(1)
|
||||
assert markers.markers[1].pose.position.y == approx(1)
|
||||
assert markers.markers[1].pose.position.z == approx(1)
|
||||
|
||||
# def test_transforms(self):
|
||||
# pass
|
||||
assert markers.markers[2].pose.position.x == approx(1)
|
||||
assert markers.markers[2].pose.position.y == approx(0)
|
||||
assert markers.markers[2].pose.position.z == approx(0.5)
|
||||
|
||||
assert markers.markers[3].pose.position.x == approx(0)
|
||||
assert markers.markers[3].pose.position.y == approx(1)
|
||||
assert markers.markers[3].pose.position.z == approx(0)
|
||||
|
||||
rostest.rosrun('aruco_pose', 'test_aruco_map', TestArucoMapPass, sys.argv)
|
||||
assert markers.markers[4].pose.position.x == approx(1)
|
||||
assert markers.markers[4].pose.position.y == approx(0.5)
|
||||
assert markers.markers[4].pose.position.z == approx(0)
|
||||
|
||||
assert markers.markers[5].pose.position.x == approx(2.2)
|
||||
assert markers.markers[5].pose.position.y == approx(0.2)
|
||||
assert markers.markers[5].pose.position.z == approx(0)
|
||||
|
||||
assert markers.markers[0].scale.x == approx(0.33)
|
||||
assert markers.markers[0].scale.y == approx(0.33)
|
||||
assert markers.markers[1].scale.x == approx(0.225)
|
||||
assert markers.markers[1].scale.y == approx(0.225)
|
||||
assert markers.markers[2].scale.x == approx(0.45)
|
||||
assert markers.markers[2].scale.y == approx(0.45)
|
||||
assert markers.markers[3].scale.x == approx(0.15)
|
||||
assert markers.markers[3].scale.y == approx(0.15)
|
||||
assert markers.markers[4].scale.x == approx(0.25)
|
||||
assert markers.markers[4].scale.y == approx(0.25)
|
||||
assert markers.markers[5].scale.x == approx(0.35)
|
||||
assert markers.markers[5].scale.y == approx(0.35)
|
||||
|
||||
def test_map_image(node):
|
||||
img = rospy.wait_for_message('aruco_map/image', Image, timeout=5)
|
||||
assert img.width == 2000
|
||||
assert img.height == 2000
|
||||
assert img.encoding == 'mono8'
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
<param name="map" value="$(find aruco_pose)/test/test_parser_pass.txt"/>
|
||||
</node>
|
||||
|
||||
<test test-name="test_aruco_map" pkg="aruco_pose" type="test_parser_pass.py"/>
|
||||
<param name="test_module" value="$(find aruco_pose)/test/test_parser_pass.py"/>
|
||||
<test test-name="test_node_pass" pkg="ros_pytest" type="ros_pytest_runner"/>
|
||||
</launch>
|
||||
|
||||
@@ -550,3 +550,6 @@ ddynamic_reconfigure:
|
||||
realsense2_camera:
|
||||
debian:
|
||||
stretch: [ros-kinetic-realsense2-camera]
|
||||
ros_pytest:
|
||||
debian:
|
||||
stretch: [ros-kinetic-ros-pytest]
|
||||
|
||||
Reference in New Issue
Block a user