From db670067ca0cb706c1cc18383d82c220e05011cc Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 11 Jul 2022 16:18:33 -0700 Subject: [PATCH] Partial source and cmake migrations (#176) Signed-off-by: methylDragon --- .github/ci/packages.apt | 28 ++++++++-------- .github/workflows/ci.yml | 4 +-- .github/workflows/pr-collection-labeler.yml | 2 +- CMakeLists.txt | 8 ++--- Changelog.md | 4 +-- Migration.md | 1 + README.md | 4 +-- api.md.in | 4 +-- examples/CMakeLists.txt | 4 +-- examples/sim_plugins.gzlaunch | 24 +++++++------- include/CMakeLists.txt | 2 +- include/gz/launch/config.hh.in | 2 +- plugins/sim_gui/SimGui.hh | 2 +- plugins/websocket_server/README.md | 2 +- plugins/websocket_server/WebsocketServer.hh | 4 +-- plugins/websocket_server/gz.js | 18 +++++------ plugins/websocket_server/index.html | 16 ++++----- src/Manager.hh | 4 +-- src/Manager_TEST.cc | 14 ++++---- src/cmd/CMakeLists.txt | 36 ++++++++++----------- src/cmd/cmdlaunch.rb.in | 2 +- src/cmd/gz_TEST.cc | 10 +++--- src/cmd/launch.yaml.in | 2 +- src/cmd/launch_main.cc | 2 +- tutorials.md.in | 4 +-- tutorials/install.md | 6 ++-- tutorials/tutorial.md | 12 +++---- 27 files changed, 110 insertions(+), 111 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 0ade14b4..4cd3d9cf 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,19 +1,19 @@ binutils-dev libgflags-dev -libignition-cmake3-dev -libignition-common5-dev -libignition-fuel-tools8-dev -libignition-gazebo7-dev -libignition-gui7-dev -libignition-math7-dev -libignition-math7-eigen3-dev -libignition-msgs9-dev -libignition-physics6-dev -libignition-plugin2-dev -libignition-rendering7-dev -libignition-sensors7-dev -libignition-tools2-dev -libignition-transport12-dev +libgz-cmake3-dev +libgz-common5-dev +libgz-fuel-tools8-dev +libgz-sim7-dev +libgz-gui7-dev +libgz-math7-dev +libgz-math7-eigen3-dev +libgz-msgs9-dev +libgz-physics6-dev +libgz-plugin2-dev +libgz-rendering7-dev +libgz-sensors7-dev +libgz-tools2-dev +libgz-transport12-dev libsdformat13-dev libtinyxml2-dev libwebsockets-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba1eed61..bd14ed68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@focal + uses: gazebo-tooling/action-gz-ci@focal with: codecov-enabled: true cppcheck-enabled: true @@ -24,4 +24,4 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@jammy + uses: gazebo-tooling/action-gz-ci@jammy diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml index 7d7b4e17..38c4fc13 100644 --- a/.github/workflows/pr-collection-labeler.yml +++ b/.github/workflows/pr-collection-labeler.yml @@ -8,6 +8,6 @@ jobs: steps: - name: Add collection labels if: github.event.action == 'opened' - uses: ignition-tooling/pr-collection-labeler@v1 + uses: gazebo-tooling/pr-collection-labeler@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 26fb9a55..04e95cf9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,15 +17,13 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -gz_configure_project( - REPLACE_IGNITION_INCLUDE_PATH gz/launch - VERSION_SUFFIX) +gz_configure_project(VERSION_SUFFIX pre1) #============================================================================ # Set project-specific options #============================================================================ -set(GZ_LAUNCH_PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/") +set(GZ_LAUNCH_PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/") #============================================================================ # Search for project-specific dependencies @@ -112,7 +110,7 @@ add_subdirectory(plugins) gz_configure_build(QUIT_IF_BUILD_ERRORS) #============================================================================ -# install example .ign files +# install example .gzlaunch files #============================================================================ add_subdirectory(examples) diff --git a/Changelog.md b/Changelog.md index eb4d89d9..41aea020 100644 --- a/Changelog.md +++ b/Changelog.md @@ -187,7 +187,7 @@ 1. Add PKGCONFIG information to gz-tools gz_find_package * [Pull Request 44](https://github.com/gazebosim/gz-launch/pull/44) -1. Fix factory.gz launch file +1. Fix factory.gzlaunch launch file * [Pull Request 55](https://github.com/gazebosim/gz-launch/pull/55) 1. Use random name for manager semaphore @@ -254,7 +254,7 @@ ### Gazebo Launch 1.3.0 (2019-11-13) -1. Add filepath to ERB so that constants like `__FILE__` in `.ign` files work as expected +1. Add filepath to ERB so that constants like `__FILE__` in `.gzlaunch` files work as expected * [BitBucket pull request 48](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-launch/pull-requests/48) 1. Add backward support to gz-launch to capture backtraces. diff --git a/Migration.md b/Migration.md index 02e1c496..c30c930e 100644 --- a/Migration.md +++ b/Migration.md @@ -26,6 +26,7 @@ release will remove the deprecated code. - The shared libraries have `gz` where there used to be `ignition`. - Using the un-migrated version is still possible due to tick-tocks, but will be removed in future versions. +- Launch files have been hard-tocked to the `.gzlaunch` extension instead of `.ign`. ## Gazebo Launch 2.2.2 diff --git a/README.md b/README.md index 84b0ba19..ed3cf614 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Sample launch configuration files are in the [examples directory](https://github 1. Run a configuration that launches [Gazebo](https://gazebosim.org/libs/gazebo). ``` - gz launch sim.ign + gz launch sim.gzlaunch ``` ## Known issue of command line tools @@ -108,7 +108,7 @@ Refer to the following table for information about important directories and fil ``` gz-launch ├── examples Example launch configurations. -├── include/ignition/launch Header files. +├── include/gz/launch Header files. ├── plugins Launch plugins, one per subdirectory. ├── src Source files and unit tests. ├── test diff --git a/api.md.in b/api.md.in index 218f6857..bb345ae1 100644 --- a/api.md.in +++ b/api.md.in @@ -1,6 +1,6 @@ -## Gazebo @IGN_DESIGNATION_CAP@ +## Gazebo @GZ_DESIGNATION_CAP@ -Gazebo @IGN_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries +Gazebo @GZ_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries designed to rapidly develop robot and simulation applications. ## License diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c3842587..2d069060 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,3 @@ -file(GLOB files "*.ign") +file(GLOB files "*.gzlaunch") install(FILES ${files} - DESTINATION ${IGN_DATA_INSTALL_DIR}/configs) + DESTINATION ${GZ_DATA_INSTALL_DIR}/configs) diff --git a/examples/sim_plugins.gzlaunch b/examples/sim_plugins.gzlaunch index 08f8dbcd..aae71c0b 100644 --- a/examples/sim_plugins.gzlaunch +++ b/examples/sim_plugins.gzlaunch @@ -1,12 +1,12 @@ - <% # Check if worldName is not defined or is empty/nil @@ -56,8 +56,8 @@ true - /tmp/ign-launch-demo + location of ~/.gz/sim/log --> + /tmp/gz-launch-demo :/qml/images/drawer.png - + 3D View false docked - + ogre2 scene @@ -134,7 +134,7 @@ -6 0 6 0 0.5 0 - + World control false false @@ -147,7 +147,7 @@ - + true true @@ -158,7 +158,7 @@ - + World stats false false @@ -171,7 +171,7 @@ - + true true @@ -182,9 +182,9 @@ - + Entity tree - + diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 4b2bdd7b..992a1312 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,2 +1,2 @@ add_subdirectory(gz) -install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) +install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) diff --git a/include/gz/launch/config.hh.in b/include/gz/launch/config.hh.in index fbd2d814..b0fb1f30 100644 --- a/include/gz/launch/config.hh.in +++ b/include/gz/launch/config.hh.in @@ -30,7 +30,7 @@ #define GZ_LAUNCH_VERSION_HEADER "Gazebo Launch, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2019 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n" -#define GZ_LAUNCH_INITIAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR}/configs" +#define GZ_LAUNCH_INITIAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR}/configs" #define GZ_LAUNCH_PLUGIN_INSTALL_PATH "${GZ_LAUNCH_PLUGIN_INSTALL_PATH}" diff --git a/plugins/sim_gui/SimGui.hh b/plugins/sim_gui/SimGui.hh index 327f05a1..81a214a9 100644 --- a/plugins/sim_gui/SimGui.hh +++ b/plugins/sim_gui/SimGui.hh @@ -41,7 +41,7 @@ namespace gz /// /// - /// + /// /// /// /// Custom window title diff --git a/plugins/websocket_server/README.md b/plugins/websocket_server/README.md index 7888e2a9..c257aab8 100644 --- a/plugins/websocket_server/README.md +++ b/plugins/websocket_server/README.md @@ -24,7 +24,7 @@ gz sim -v 4 source tree. ``` -gz launch -f examples/websocket.ign -v 4 +gz launch -f examples/websocket.gzlaunch -v 4 ``` 5. Open the `plugins/websocket_server/index.html` in a web browser. diff --git a/plugins/websocket_server/WebsocketServer.hh b/plugins/websocket_server/WebsocketServer.hh index 95d462d6..6de79382 100644 --- a/plugins/websocket_server/WebsocketServer.hh +++ b/plugins/websocket_server/WebsocketServer.hh @@ -128,7 +128,7 @@ namespace gz /// ## Websocket Server /// /// 1. Define a launch file by copying the following contents to a file - /// called `websocket.ign`. + /// called `websocket.gzlaunch`. /// /// /// WebSocket Test - +