Skip to content

Commit f9705a7

Browse files
Remove duplicated behavior trees and use remapping
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
1 parent f55bab2 commit f9705a7

5 files changed

Lines changed: 17 additions & 94 deletions

File tree

nexus_integration_tests/config/pick_and_place_rmf.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

nexus_integration_tests/config/workcell_1_bts/place_on_amr.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

nexus_integration_tests/config/workcell_2_bts/pick_from_amr.xml

Lines changed: 0 additions & 34 deletions
This file was deleted.

nexus_integration_tests/launch/control_center.launch.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def launch_setup(context, *args, **kwargs):
113113
activate_system_orchestrator = LaunchConfiguration("activate_system_orchestrator")
114114
headless = LaunchConfiguration("headless")
115115
main_bt_filename = LaunchConfiguration("main_bt_filename")
116+
remap_task_types = LaunchConfiguration("remap_task_types")
116117

117118
nexus_panel_rviz_path = os.path.join(
118119
get_package_share_directory("nexus_integration_tests"), "rviz", "nexus_panel.rviz"
@@ -129,11 +130,7 @@ def launch_setup(context, *args, **kwargs):
129130
FindPackageShare("nexus_integration_tests"),
130131
"/config/system_bts",
131132
),
132-
"remap_task_types":
133-
"""{
134-
pick_and_place: [place_on_conveyor, pick_from_conveyor],
135-
pick_and_place_rmf: [place_on_amr, pick_from_amr],
136-
}""",
133+
"remap_task_types": remap_task_types,
137134
"main_bt_filename": main_bt_filename,
138135
"max_jobs": 2,
139136
}
@@ -251,6 +248,11 @@ def generate_launch_description():
251248
default_value="main.xml",
252249
description="File name of the main system orchestrator behavior tree",
253250
),
251+
DeclareLaunchArgument(
252+
"remap_task_types",
253+
default_value="\"pick_and_place: [place_on_conveyor, pick_from_conveyor]\"",
254+
description="File name of the main system orchestrator behavior tree",
255+
),
254256
OpaqueFunction(function=launch_setup),
255257
]
256258
)

nexus_integration_tests/test_pick_and_place_rmf.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ async def asyncSetUp(self):
4040
subprocess.Popen('pkill -9 -f zenoh', shell=True)
4141

4242
self.proc = managed_process(
43-
("ros2", "launch", "nexus_integration_tests", "depot.launch.xml", "sim_update_rate:=10000", "main_bt_filename:=main_rmf.xml"),
43+
(
44+
"ros2",
45+
"launch",
46+
"nexus_integration_tests",
47+
"depot.launch.xml",
48+
"sim_update_rate:=10000",
49+
"main_bt_filename:=main_rmf.xml",
50+
"remap_task_types:=\"pick_and_place_rmf: [pick_from_conveyor, place_on_conveyor]\""
51+
),
4452
)
4553
self.proc.__enter__()
4654
print("waiting for nodes to be ready...", file=sys.stderr)
@@ -69,7 +77,7 @@ def tearDown(self):
6977
async def test_pick_and_place_wo(self):
7078
self.action_client.wait_for_server()
7179
goal_msg = ExecuteWorkOrder.Goal()
72-
with open(f"{os.path.dirname(__file__)}/config/pick_and_place_rmf.json") as f:
80+
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.json") as f:
7381
goal_msg.order.work_order = f.read()
7482
feedbacks: list[ExecuteWorkOrder.Feedback] = []
7583
fb_fut = Future()

0 commit comments

Comments
 (0)