diff --git a/nexus_demos/CMakeLists.txt b/nexus_demos/CMakeLists.txt new file mode 100644 index 0000000..df146a7 --- /dev/null +++ b/nexus_demos/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.16) +set(PROJECT_NAME nexus_demos) +project(${PROJECT_NAME}) + +find_package(ament_cmake REQUIRED) + +set(CMAKE_CXX_FLAGS "-Wall -Wpedantic") + +install(DIRECTORY launch config maps DESTINATION share/${PROJECT_NAME}) + +# Refactored from rmf_demos_maps, we just need to download models +file(GLOB_RECURSE traffic_editor_paths "maps/*.building.yaml") +foreach(building_map_path ${traffic_editor_paths}) + ############################################################################## + # Generate Gz world and download Models + ############################################################################## + if (NOT NO_DOWNLOAD_MODELS) + message("DOWNLOADING MODELS WITH COMMAND: ros2 run rmf_building_map_tools building_map_model_downloader ${building_map_path}") + execute_process( + COMMAND ros2 run rmf_building_map_tools building_map_model_downloader ${building_map_path} -e ~/.gazebo/models + ) + endif() +endforeach() + +ament_package() diff --git a/nexus_demos/README.md b/nexus_demos/README.md new file mode 100644 index 0000000..4a0ddb2 --- /dev/null +++ b/nexus_demos/README.md @@ -0,0 +1,43 @@ +# nexus_demos + +## Regenerating the simulation world file and nav graph + +Source build of `rmf_building_map_tools` is required, at least from commit hash [0d18f59](https://github.com/open-rmf/rmf_traffic_editor/tree/0d18f593356fa2e4de0dbfa297ae1fba66b8e101) onwards. + +Generate world file, + +```bash +# Source the workspace where rmf_building_map_tools is built + +cd ~/ws_nexus/src/nexus/nexus_demos +ros2 run rmf_building_map_tools building_map_generator gazebo \ + maps/depot/depot.building.yaml \ + maps/depot/depot.world \ + maps/depot/models \ + --TEMPLATE_WORLD_FILE maps/depot/template/depot_world.sdf \ + --SKIP_CAMERA_POSE +``` + +Generate navigation graphs, + +```bash +ros2 run rmf_building_map_tools building_map_generator nav \ + maps/depot/depot.building.yaml \ + maps/depot/nav_graphs +``` + +## Build + +Build `nexus_demos`, + +```bash +colcon build --packages-up-to nexus_demos +``` + +## Launch + +Launch the demo, + +```bash +ros2 launch nexus_demos depot.launch.xml headless:=0 +``` diff --git a/nexus_integration_tests/config/depot/deliveryRobot_config.yaml b/nexus_demos/config/depot/deliveryRobot_config.yaml similarity index 100% rename from nexus_integration_tests/config/depot/deliveryRobot_config.yaml rename to nexus_demos/config/depot/deliveryRobot_config.yaml diff --git a/nexus_integration_tests/config/pick_and_place_rmf.json b/nexus_demos/config/pick_and_place_rmf.json similarity index 100% rename from nexus_integration_tests/config/pick_and_place_rmf.json rename to nexus_demos/config/pick_and_place_rmf.json diff --git a/nexus_integration_tests/config/rmf_bts/transportation.xml b/nexus_demos/config/rmf_bts/transportation.xml similarity index 100% rename from nexus_integration_tests/config/rmf_bts/transportation.xml rename to nexus_demos/config/rmf_bts/transportation.xml diff --git a/nexus_integration_tests/config/system_bts/main_rmf.xml b/nexus_demos/config/system_bts/main_rmf.xml similarity index 100% rename from nexus_integration_tests/config/system_bts/main_rmf.xml rename to nexus_demos/config/system_bts/main_rmf.xml diff --git a/nexus_integration_tests/config/system_bts/pick_and_place_rmf.xml b/nexus_demos/config/system_bts/pick_and_place_rmf.xml similarity index 100% rename from nexus_integration_tests/config/system_bts/pick_and_place_rmf.xml rename to nexus_demos/config/system_bts/pick_and_place_rmf.xml diff --git a/nexus_integration_tests/config/workcell_1_bts/place_on_amr.xml b/nexus_demos/config/workcell_1_bts/place_on_amr.xml similarity index 100% rename from nexus_integration_tests/config/workcell_1_bts/place_on_amr.xml rename to nexus_demos/config/workcell_1_bts/place_on_amr.xml diff --git a/nexus_integration_tests/config/workcell_2_bts/pick_from_amr.xml b/nexus_demos/config/workcell_2_bts/pick_from_amr.xml similarity index 100% rename from nexus_integration_tests/config/workcell_2_bts/pick_from_amr.xml rename to nexus_demos/config/workcell_2_bts/pick_from_amr.xml diff --git a/nexus_demos/launch/depot.launch.xml b/nexus_demos/launch/depot.launch.xml new file mode 100644 index 0000000..b931531 --- /dev/null +++ b/nexus_demos/launch/depot.launch.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nexus_integration_tests/launch/include/depot/depot.rviz b/nexus_demos/launch/include/depot/depot.rviz similarity index 100% rename from nexus_integration_tests/launch/include/depot/depot.rviz rename to nexus_demos/launch/include/depot/depot.rviz diff --git a/nexus_integration_tests/maps/depot/depot.building.yaml b/nexus_demos/maps/depot/depot.building.yaml similarity index 100% rename from nexus_integration_tests/maps/depot/depot.building.yaml rename to nexus_demos/maps/depot/depot.building.yaml diff --git a/nexus_demos/maps/depot/depot.world b/nexus_demos/maps/depot/depot.world new file mode 100644 index 0000000..de2dccf --- /dev/null +++ b/nexus_demos/maps/depot/depot.world @@ -0,0 +1,311 @@ + + + + 0.01 + 1.0 + + + + + + + + + + + + + 1 1 1 + 0.8 0.8 0.8 + false + + + + 1000 + 845 +