Unify navigation on NavigateToPose and remove legacy proxies
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
"""DR semantic regression tests independent of ROS transport."""
|
||||
import copy
|
||||
import json
|
||||
import math
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
@@ -23,13 +21,6 @@ class DrSemanticsTests(unittest.TestCase):
|
||||
for key in ('shelf_id','column_id','tier_id','station_binding_ref','expected_geometry_epoch'):
|
||||
self.assertEqual(result[key],getattr(goal,key))
|
||||
|
||||
def test_semantic_navigation_accepts_positive_subsecond_budget(self):
|
||||
from navigation_gateway.semantic_proxy import duration_seconds
|
||||
from types import SimpleNamespace
|
||||
self.assertAlmostEqual(duration_seconds(SimpleNamespace(sec=0,nanosec=500000000)),.5)
|
||||
for sec,nanosec in [(0,0),(-1,1),(3600,1),(1,1000000000),(1,-1)]:
|
||||
with self.assertRaises(ValueError):duration_seconds(SimpleNamespace(sec=sec,nanosec=nanosec))
|
||||
|
||||
def test_shelf_tier_can_be_empty_without_guessing(self):
|
||||
# BT p15 and RB02 allow an unknown tier; execution must decide whether
|
||||
# its chosen route can use the observation without that calibration.
|
||||
@@ -48,17 +39,6 @@ class DrSemanticsTests(unittest.TestCase):
|
||||
self.assertEqual(result['status'], 'SUCCEEDED')
|
||||
self.assertEqual(result['tier_id'], '')
|
||||
|
||||
def test_navigation_reports_signed_shortest_yaw_error(self):
|
||||
from navigation_gateway.gateway import pose_errors
|
||||
from test_navigation_gateway import request
|
||||
target = request()['target_pose']
|
||||
current = copy.deepcopy(target)
|
||||
current['orientation'].update(z=math.sin(.2/2), w=math.cos(.2/2))
|
||||
distance, yaw = pose_errors(target, current)
|
||||
self.assertEqual(distance, 0)
|
||||
self.assertAlmostEqual(yaw, -.2)
|
||||
current['orientation'].update(z=math.sin(-.2/2), w=math.cos(-.2/2))
|
||||
self.assertAlmostEqual(pose_errors(target, current)[1], .2)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user