From e12f7b680af7150cd587757aab29bebffa318ace Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 13 Dec 2024 16:27:00 +0800 Subject: [PATCH] Fix integration test Signed-off-by: Luca Della Vedova --- nexus_integration_tests/launch/office.launch.xml | 2 +- nexus_integration_tests/test_parallel_wo.py | 2 +- nexus_integration_tests/test_pick_and_place.py | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nexus_integration_tests/launch/office.launch.xml b/nexus_integration_tests/launch/office.launch.xml index 52cbde6..affb1ab 100644 --- a/nexus_integration_tests/launch/office.launch.xml +++ b/nexus_integration_tests/launch/office.launch.xml @@ -1,7 +1,7 @@ - + diff --git a/nexus_integration_tests/test_parallel_wo.py b/nexus_integration_tests/test_parallel_wo.py index c5e5d41..cad860f 100644 --- a/nexus_integration_tests/test_parallel_wo.py +++ b/nexus_integration_tests/test_parallel_wo.py @@ -38,7 +38,7 @@ async def asyncSetUp(self): subprocess.Popen('pkill -9 -f zenoh', shell=True) self.proc = managed_process( - ("ros2", "launch", "nexus_integration_tests", "office.launch.xml"), + ("ros2", "launch", "nexus_integration_tests", "office.launch.xml", "sim_update_rate:=10000"), ) self.proc.__enter__() print("waiting for nodes to be ready...", file=sys.stderr) diff --git a/nexus_integration_tests/test_pick_and_place.py b/nexus_integration_tests/test_pick_and_place.py index 82fc114..6e51d9c 100644 --- a/nexus_integration_tests/test_pick_and_place.py +++ b/nexus_integration_tests/test_pick_and_place.py @@ -40,7 +40,7 @@ async def asyncSetUp(self): subprocess.Popen('pkill -9 -f zenoh', shell=True) self.proc = managed_process( - ("ros2", "launch", "nexus_integration_tests", "office.launch.xml"), + ("ros2", "launch", "nexus_integration_tests", "office.launch.xml", "sim_update_rate:=10000"), ) self.proc.__enter__() print("waiting for nodes to be ready...", file=sys.stderr) @@ -90,8 +90,9 @@ def on_fb(msg): # high load so we only check the last feedback as a workaround. self.assertGreater(len(feedbacks), 0) for msg in feedbacks: - self.assertEqual(len(msg.task_states), 1) - state: TaskState = msg.task_states[0] # type: ignore + # The first task is transportation + self.assertEqual(len(msg.task_states), 2) + state: TaskState = msg.task_states[1] # type: ignore self.assertEqual(state.workcell_id, "workcell_2") self.assertEqual(state.task_id, "1")