File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3434# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3535# POSSIBILITY OF SUCH DAMAGE.
3636
37+ import numpy
3738import math
3839import unittest
3940
@@ -91,10 +92,13 @@ def test_markers(self):
9192 continue
9293 # Compare each translation element (x, y, z)
9394 for v_ret , v_expected in zip (trans , tf_expected [i ][0 ]):
94- self .assertAlmostEqual (v_ret , v_expected , 2 )
95+ # Given that sigfig ignores the leading zero, we only compare the first sigfig.
96+ numpy .testing .assert_approx_equal (
97+ v_ret , v_expected , significant = 1 )
9598 # Compare each orientation element (x, y, z, w)
9699 for v_ret , v_expected in zip (rot , tf_expected [i ][1 ]):
97- self .assertAlmostEqual (v_ret , v_expected , 2 )
100+ numpy .testing .assert_approx_equal (
101+ v_ret , v_expected , significant = 1 )
98102
99103if __name__ == '__main__' :
100104 import rostest
You can’t perform that action at this time.
0 commit comments