@@ -106,6 +106,8 @@ def activate_node(target_node: LifecycleNode, depend_node: LifecycleNode = None)
106106
107107def launch_setup (context , * args , ** kwargs ):
108108 ros_domain_id = LaunchConfiguration ("ros_domain_id" )
109+ use_fake_hardware = LaunchConfiguration ("use_fake_hardware" )
110+ use_rmf_transporter = LaunchConfiguration ("use_rmf_transporter" )
109111 use_zenoh_bridge = LaunchConfiguration ("use_zenoh_bridge" )
110112 zenoh_config_package = LaunchConfiguration ("zenoh_config_package" )
111113 zenoh_config_filename = LaunchConfiguration ("zenoh_config_filename" )
@@ -115,8 +117,11 @@ def launch_setup(context, *args, **kwargs):
115117 main_bt_filename = LaunchConfiguration ("main_bt_filename" )
116118 remap_task_types = LaunchConfiguration ("remap_task_types" )
117119
120+ rviz_config_filename = "nexus_panel.rviz"
121+ if (use_rmf_transporter .perform (context ).lower () == "true" ):
122+ rviz_config_filename = "nexus_panel_rmf.rviz"
118123 nexus_panel_rviz_path = os .path .join (
119- get_package_share_directory ("nexus_integration_tests" ), "rviz" , "nexus_panel.rviz"
124+ get_package_share_directory ("nexus_integration_tests" ), "rviz" , rviz_config_filename
120125 )
121126
122127 system_orchestrator_node = LifecycleNode (
@@ -137,6 +142,27 @@ def launch_setup(context, *args, **kwargs):
137142 ],
138143 )
139144
145+ rmf_transporter = GroupAction (
146+ actions = [
147+ IncludeLaunchDescription (
148+ [
149+ PathJoinSubstitution (
150+ [
151+ FindPackageShare ("nexus_integration_tests" ),
152+ "launch" ,
153+ "rmf_transporter.launch.xml" ,
154+ ]
155+ )
156+ ],
157+ launch_arguments = {
158+ "use_simulator" : use_fake_hardware ,
159+ "headless" : headless ,
160+ }.items (),
161+ condition = IfCondition (use_rmf_transporter ),
162+ )
163+ ],
164+ )
165+
140166 transporter_node = LifecycleNode (
141167 namespace = "" ,
142168 package = "nexus_transporter" ,
@@ -149,6 +175,14 @@ def launch_setup(context, *args, **kwargs):
149175 {"speed" : 1.0 },
150176 {"unloading_station" : "unloading" },
151177 ],
178+ condition = UnlessCondition (use_rmf_transporter ),
179+ )
180+
181+ activate_transporter_node = GroupAction (
182+ [
183+ activate_node (transporter_node ),
184+ ],
185+ condition = UnlessCondition (use_rmf_transporter ),
152186 )
153187
154188 mock_emergency_alarm_node = LifecycleNode (
@@ -166,40 +200,45 @@ def launch_setup(context, *args, **kwargs):
166200 condition = UnlessCondition (headless ),
167201 )
168202
203+ zenoh_bridge = GroupAction (
204+ [
205+ IncludeLaunchDescription (
206+ [
207+ PathJoinSubstitution (
208+ [
209+ FindPackageShare ("nexus_integration_tests" ),
210+ "launch" ,
211+ "zenoh_bridge.launch.py" ,
212+ ]
213+ )
214+ ],
215+ launch_arguments = {
216+ "zenoh_config_package" : zenoh_config_package ,
217+ "zenoh_config_filename" : zenoh_config_filename ,
218+ "ros_domain_id" : ros_domain_id .perform (context ),
219+ }.items (),
220+ )
221+ ],
222+ condition = IfCondition (use_zenoh_bridge ),
223+ )
224+
225+ activate_system_orchestrator = GroupAction (
226+ [
227+ activate_node (system_orchestrator_node ),
228+ ],
229+ condition = IfCondition (activate_system_orchestrator ),
230+ )
231+
169232 return [
170233 SetEnvironmentVariable ("ROS_DOMAIN_ID" , ros_domain_id ),
171234 system_orchestrator_node ,
235+ rmf_transporter ,
172236 transporter_node ,
173237 mock_emergency_alarm_node ,
174238 nexus_panel ,
175- GroupAction (
176- [
177- IncludeLaunchDescription (
178- [
179- PathJoinSubstitution (
180- [
181- FindPackageShare ("nexus_integration_tests" ),
182- "launch" ,
183- "zenoh_bridge.launch.py" ,
184- ]
185- )
186- ],
187- launch_arguments = {
188- "zenoh_config_package" : zenoh_config_package ,
189- "zenoh_config_filename" : zenoh_config_filename ,
190- "ros_domain_id" : ros_domain_id .perform (context ),
191- }.items (),
192- )
193- ],
194- condition = IfCondition (use_zenoh_bridge ),
195- ),
196- GroupAction (
197- [
198- activate_node (system_orchestrator_node ),
199- ],
200- condition = IfCondition (activate_system_orchestrator ),
201- ),
202- activate_node (transporter_node ),
239+ zenoh_bridge ,
240+ activate_system_orchestrator ,
241+ activate_transporter_node ,
203242 activate_node (mock_emergency_alarm_node ),
204243 ]
205244
@@ -213,6 +252,17 @@ def generate_launch_description():
213252 default_value = "0" ,
214253 description = "ROS_DOMAIN_ID environment variable" ,
215254 ),
255+ DeclareLaunchArgument (
256+ "use_fake_hardware" ,
257+ default_value = "true" ,
258+ description = "Set True if running with real hardware." ,
259+ ),
260+ DeclareLaunchArgument (
261+ "use_rmf_transporter" ,
262+ default_value = "false" ,
263+ description = "Set true to rely on an Open-RMF managed fleet to transport material\
264+ between workcells." ,
265+ ),
216266 DeclareLaunchArgument (
217267 "use_zenoh_bridge" ,
218268 default_value = "true" ,
0 commit comments