mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
* aruco_map: Improve parser * aruco_map: Use marker id for map visualization * aruco_pose: Add parser pass test * aruco_map: Code style * aruco_pose: Add more test cases * aruco_map: Better message handling * aruco_map: Be more informative about bad lines * aruco_map: Add failure mode tests * aruco_map: Be less strict about map contents * aruco_pose: Restructure tests * aruco_map: Don't use marker id in visualization * aruco_map: Check for marker uniqueness * aruco_pose: Use board data to reject duplicate markers * aruco_pose/test: Spelling fixes
28 lines
795 B
Python
Executable File
28 lines
795 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
import unittest
|
|
import json
|
|
import rospy
|
|
import rostest
|
|
|
|
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)
|
|
|
|
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)
|