Skip to content

Commit 3452bf7

Browse files
Move to nexus_integration_tests instead
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
1 parent 08bc9d2 commit 3452bf7

File tree

15 files changed

+102
-135
lines changed

15 files changed

+102
-135
lines changed

.github/workflows/nexus_integration_tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: vcs
2828
run: |
2929
vcs import . < abb.repos
30+
vcs import . < rmf.repos
3031
- name: rosdep
3132
run: |
3233
apt update

nexus_demos/CMakeLists.txt

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

nexus_demos/package.xml

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

nexus_integration_tests/CMakeLists.txt

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ add_custom_target(generate_zenoh_bridge_configs ALL
115115
COMMAND ros2 run nexus_network_configuration nexus_network_configuration -n ${nexus_network_cfg_path} -o ${zenoh_cfg_output_dir}
116116
)
117117

118-
install(DIRECTORY launch config rviz scripts DESTINATION share/${PROJECT_NAME})
118+
install(DIRECTORY launch config rviz scripts maps/ DESTINATION share/${PROJECT_NAME})
119119
# Install the zenoh config directory containing generated configs.
120120
message("zenoh_cfg_output_dir: " ${zenoh_cfg_output_dir})
121121
install(DIRECTORY ${zenoh_cfg_output_dir} DESTINATION share/${PROJECT_NAME}/config/)
@@ -176,4 +176,79 @@ if(BUILD_TESTING)
176176
endif()
177177
endif()
178178

179+
# Taken from rmf_demos_maps
180+
file(GLOB_RECURSE traffic_editor_paths "maps/*.building.yaml")
181+
182+
foreach(path ${traffic_editor_paths})
183+
184+
# Get the output world name
185+
string(REGEX REPLACE "\\.[^.]*\.[^.]*$" "" no_extension_path ${path})
186+
string(REGEX MATCH "[^\/]+$" world_name ${no_extension_path})
187+
188+
set(map_path ${path})
189+
set(output_world_name ${world_name})
190+
set(output_dir ${CMAKE_CURRENT_BINARY_DIR}/maps/${output_world_name})
191+
set(output_world_path ${output_dir}/${output_world_name}.world)
192+
set(output_model_dir ${output_dir}/models)
193+
194+
##############################################################################
195+
# Generate Gz world and download Models
196+
##############################################################################
197+
198+
message("BUILDING WORLDFILE WITH COMMAND: ros2 run rmf_building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}")
199+
if (NO_DOWNLOAD_MODELS)
200+
add_custom_command(
201+
DEPENDS ${map_path}
202+
COMMAND ros2 run rmf_building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}
203+
OUTPUT ${output_world_path}
204+
)
205+
else()
206+
message("DOWNLOADING MODELS WITH COMMAND: ros2 run rmf_building_map_tools building_map_model_downloader ${map_path}")
207+
add_custom_command(
208+
DEPENDS ${map_path}
209+
COMMAND ros2 run rmf_building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}
210+
COMMAND ros2 run rmf_building_map_tools building_map_model_downloader ${map_path} -e ~/.gazebo/models
211+
OUTPUT ${output_world_path}
212+
)
213+
endif()
214+
215+
##############################################################################
216+
# generate the navmesh and required files for crowd simulation for gz
217+
##############################################################################
218+
set(crowd_sim_config_resource ${output_dir}/config_resource/)
219+
220+
add_custom_command(
221+
OUTPUT ${world_name}_crowdsim
222+
COMMAND ros2 run rmf_building_map_tools building_crowdsim ${map_path} ${crowd_sim_config_resource} ${output_world_path}
223+
DEPENDS ${output_world_path}
224+
)
225+
226+
# This will initiate both custom commands: ${output_world_path} and ${world_name}_crowdsim
227+
add_custom_target(generate_${world_name}_crowdsim ALL
228+
DEPENDS ${world_name}_crowdsim
229+
)
230+
231+
##############################################################################
232+
# Generate the nav graphs
233+
##############################################################################
234+
235+
set(output_nav_graphs_dir ${output_dir}/nav_graphs/)
236+
set(output_nav_graphs_phony ${output_nav_graphs_dir}/phony)
237+
add_custom_command(
238+
OUTPUT ${output_nav_graphs_phony}
239+
COMMAND ros2 run rmf_building_map_tools building_map_generator nav ${map_path} ${output_nav_graphs_dir}
240+
DEPENDS ${map_path}
241+
)
242+
243+
add_custom_target(generate_${output_world_name}_nav_graphs ALL
244+
DEPENDS ${output_nav_graphs_phony}
245+
)
246+
247+
install(
248+
DIRECTORY ${output_dir}
249+
DESTINATION share/${PROJECT_NAME}/maps
250+
)
251+
252+
endforeach()
253+
179254
ament_package()
File renamed without changes.
File renamed without changes.
File renamed without changes.

nexus_demos/launch/office.launch.xml renamed to nexus_integration_tests/launch/office.launch.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,22 @@
99
<include file="$(find-pkg-share rmf_demos)/common.launch.xml">
1010
<arg name="headless" value="$(var headless)" />
1111
<arg name="use_sim_time" value="$(var use_simulator)"/>
12-
<arg name="viz_config_file" value ="$(find-pkg-share nexus_demos)/include/office/office.rviz"/>
13-
<arg name="config_file" value="$(find-pkg-share nexus_demos)/office/office.building.yaml"/>
12+
<arg name="viz_config_file" value ="$(find-pkg-share nexus_integration_tests)/launch/include/office/office.rviz"/>
13+
<arg name="config_file" value="$(find-pkg-share nexus_integration_tests)/office/office.building.yaml"/>
1414
</include>
1515

1616
<!-- Nexus Common launch -->
17-
<include file="$(find-pkg-share nexus_demos)/common.launch.xml">
17+
<include file="$(find-pkg-share nexus_integration_tests)/launch/common.launch.xml">
1818
<arg name="headless" value="$(var headless)" />
1919
<arg name="use_sim_time" value="$(var use_simulator)"/>
2020
</include>
2121

22-
<!-- Bringup from integration tests -->
23-
<!-- TODO(luca) should we move the integration launch here instead? -->
24-
<include file="$(find-pkg-share nexus_integration_tests)/launch/launch.py">
25-
<!-- Set as true to make it auto bringup and remove all the extra rviz launches -->
26-
<arg name="headless" value="true" />
27-
<arg name="use_sim_time" value="$(var use_simulator)"/>
28-
</include>
29-
3022
<!-- TinyRobot fleet adapter -->
3123
<group>
3224
<include file="$(find-pkg-share rmf_demos_fleet_adapter)/launch/fleet_adapter.launch.xml">
3325
<arg name="use_sim_time" value="$(var use_simulator)"/>
34-
<arg name="nav_graph_file" value="$(find-pkg-share nexus_demos)/maps/office/nav_graphs/0.yaml" />
35-
<arg name="config_file" value="$(find-pkg-share nexus_demos)/config/office/tinyRobot_config.yaml"/>
26+
<arg name="nav_graph_file" value="$(find-pkg-share nexus_integration_tests)/maps/office/nav_graphs/0.yaml" />
27+
<arg name="config_file" value="$(find-pkg-share nexus_integration_tests)/config/office/tinyRobot_config.yaml"/>
3628
</include>
3729
</group>
3830

@@ -44,4 +36,12 @@
4436
<arg name="sim_update_rate" value="$(var sim_update_rate)"/>
4537
</include>
4638

39+
<!-- Bringup from integration tests -->
40+
<!-- TODO(luca) should we move the integration launch here instead? -->
41+
<include file="$(find-pkg-share nexus_integration_tests)/launch/launch.py">
42+
<!-- Set as true to make it auto bringup and remove all the extra rviz launches -->
43+
<arg name="headless" value="true" />
44+
<arg name="use_sim_time" value="$(var use_simulator)"/>
45+
</include>
46+
4747
</launch>
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)