From ba0385abeaec270e681cd0bbb8d13fb53c7b8abb Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Wed, 26 Jul 2023 05:39:06 -0700 Subject: [PATCH 1/3] Removed Ignition Signed-off-by: Nate Koenig --- Migration.md | 6 ++++ examples/factory.gzlaunch | 2 +- examples/multi_factory.gzlaunch | 4 +-- include/CMakeLists.txt | 1 - include/ignition/launch.hh | 19 ------------ include/ignition/launch/Export.hh | 19 ------------ include/ignition/launch/Plugin.hh | 19 ------------ include/ignition/launch/config.hh | 48 ----------------------------- plugins/sim_factory/SimFactory.hh | 2 +- src/Manager.cc | 30 ++---------------- src/Manager_TEST.cc | 2 +- test/integration/deprecated_TEST.cc | 32 ------------------- tutorials/install.md | 4 +-- 13 files changed, 15 insertions(+), 173 deletions(-) delete mode 100644 include/ignition/launch.hh delete mode 100644 include/ignition/launch/Export.hh delete mode 100644 include/ignition/launch/Plugin.hh delete mode 100644 include/ignition/launch/config.hh delete mode 100644 test/integration/deprecated_TEST.cc diff --git a/Migration.md b/Migration.md index c30c930e..d09b26dd 100644 --- a/Migration.md +++ b/Migration.md @@ -5,6 +5,12 @@ Deprecated code produces compile-time warnings. These warning serve as notification to users that their code should be upgraded. The next major release will remove the deprecated code. +## Gazebo Launch 6.X to 7.X + +- Removed Ignition + - Removed the ignition include directory. + - Launch scripts must use the `` element. + ## Gazebo Launch 5.X to 6.X - The `ignition` namespace is deprecated and will be removed in future versions. diff --git a/examples/factory.gzlaunch b/examples/factory.gzlaunch index d6194b63..1d12cb54 100644 --- a/examples/factory.gzlaunch +++ b/examples/factory.gzlaunch @@ -9,7 +9,7 @@ - https://fuel.ignitionrobotics.org/1.0/openrobotics/models/X2 UGV/1 + https://fuel.gazeosim.org/1.0/openrobotics/models/X2 UGV/1 front_left_wheel_joint diff --git a/examples/multi_factory.gzlaunch b/examples/multi_factory.gzlaunch index 7a077ccb..3c331b03 100644 --- a/examples/multi_factory.gzlaunch +++ b/examples/multi_factory.gzlaunch @@ -9,7 +9,7 @@ - https://fuel.ignitionrobotics.org/1.0/openrobotics/models/X3 UAV Config 1 + https://fuel.gazebosim.org/1.0/openrobotics/models/X3 UAV Config 1 @@ -20,7 +20,7 @@ - https://fuel.ignitionrobotics.org/1.0/openrobotics/models/X1 Config 1 + https://fuel.gazebosim.org/1.0/openrobotics/models/X1 Config 1 diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 992a1312..a35a0475 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,2 +1 @@ add_subdirectory(gz) -install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) diff --git a/include/ignition/launch.hh b/include/ignition/launch.hh deleted file mode 100644 index f98a82e2..00000000 --- a/include/ignition/launch.hh +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2022 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include -#include diff --git a/include/ignition/launch/Export.hh b/include/ignition/launch/Export.hh deleted file mode 100644 index 6d8f9e22..00000000 --- a/include/ignition/launch/Export.hh +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2022 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include -#include diff --git a/include/ignition/launch/Plugin.hh b/include/ignition/launch/Plugin.hh deleted file mode 100644 index 2167e569..00000000 --- a/include/ignition/launch/Plugin.hh +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2019 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include -#include diff --git a/include/ignition/launch/config.hh b/include/ignition/launch/config.hh deleted file mode 100644 index 4ca2fa85..00000000 --- a/include/ignition/launch/config.hh +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2022 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef IGNITION_LAUNCH__CONFIG_HH_ -#define IGNITION_LAUNCH__CONFIG_HH_ - -#include - -#define IGNITION_LAUNCH_MAJOR_VERSION GZ_LAUNCH_MAJOR_VERSION -#define IGNITION_LAUNCH_MINOR_VERSION GZ_LAUNCH_MINOR_VERSION -#define IGNITION_LAUNCH_PATCH_VERSION GZ_LAUNCH_PATCH_VERSION - -#define IGNITION_LAUNCH_VERSION GZ_LAUNCH_VERSION -#define IGNITION_LAUNCH_VERSION_FULL GZ_LAUNCH_VERSION_FULL - -#define IGNITION_LAUNCH_VERSION_HEADER GZ_LAUNCH_VERSION_HEADER - -#define IGNITION_LAUNCH_INITIAL_CONFIG_PATH GZ_LAUNCH_INITIAL_CONFIG_PATH - -#define IGNITION_LAUNCH_PLUGIN_INSTALL_PATH GZ_LAUNCH_PLUGIN_INSTALL_PATH - -namespace gz -{ -} - -namespace ignition -{ - #ifndef SUPPRESS_IGNITION_HEADER_DEPRECATION - #pragma message("ignition namespace is deprecated! Use gz instead!") - #endif - using namespace gz; -} - -#endif diff --git a/plugins/sim_factory/SimFactory.hh b/plugins/sim_factory/SimFactory.hh index 76bb4065..8d3e157f 100644 --- a/plugins/sim_factory/SimFactory.hh +++ b/plugins/sim_factory/SimFactory.hh @@ -47,7 +47,7 @@ namespace gz /// spawned --> /// /// - /// https://fuel.ignitionrobotics.org/1.0/openrobotics/models/X2 UGV/1 + /// https://fuel.gazebosim.org/1.0/openrobotics/models/X2 UGV/1 /// /// diff --git a/src/Manager.cc b/src/Manager.cc index 400d95a3..42f51e1b 100644 --- a/src/Manager.cc +++ b/src/Manager.cc @@ -679,14 +679,8 @@ bool ManagerPrivate::ParseConfig(const std::string &_config) tinyxml2::XMLElement *root = xmlDoc.FirstChildElement("gz"); if (!root) { - root = xmlDoc.FirstChildElement("ignition"); - if (!root) - { - gzerr << "Invalid config file, missing `` element\n"; - return false; - } - gzwarn << "The `` element is deprecated and will be removed. " - << "Please use `` instead." << std::endl; + gzerr << "Invalid config file, missing `` element\n"; + return false; } // Keep the environment variables in memory. See manpage for putenv. this->envs = this->ParseEnvs(root); @@ -1111,26 +1105,6 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem) else pathToLib = systemPaths.FindSharedLibrary(file); - if (pathToLib.empty()) - { - // TODO(CH3): Deprecated. Remove on ticktock. - // This tries to find one more time with IGN_LAUNCH_PLUGIN_PATH instead of - // GZ_LAUNCH_PLUGIN_PATH - systemPaths.SetPluginPathEnv("IGN_LAUNCH_PLUGIN_PATH"); - - systemPaths.AddPluginPaths( - gz::common::joinPaths(homePath, ".ignition", "gazebo", "plugins")); - - pathToLib = systemPaths.FindSharedLibrary(file); - - if (!pathToLib.empty()) - { - gzwarn << "Found plugin [" << pathToLib - << "] using deprecated environment variable [IGN_LAUNCH_PLUGIN_PATH]." - " Please use [GZ_LAUNCH_PLUGIN_PATH] instead." << std::endl; - } - } - if (pathToLib.empty()) { gzerr << "Failed to find the path to library[" << file << "]. " diff --git a/src/Manager_TEST.cc b/src/Manager_TEST.cc index b2742249..0a8ed9ba 100644 --- a/src/Manager_TEST.cc +++ b/src/Manager_TEST.cc @@ -84,7 +84,7 @@ TEST_F(ManagerTest, RunEmptyConfig) } ///////////////////////////////////////////////// -TEST_F(ManagerTest, MissingIgnition) +TEST_F(ManagerTest, MissingGz) { std::string config = "" diff --git a/test/integration/deprecated_TEST.cc b/test/integration/deprecated_TEST.cc deleted file mode 100644 index 5b99bc6d..00000000 --- a/test/integration/deprecated_TEST.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2022 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ - -#include - -#define SUPPRESS_IGNITION_HEADER_DEPRECATION - -#include -#include - -///////////////////////////////////////////////// -// Make sure the ignition namespace still works -TEST(Deprecated, IgnitionNamespace) -{ - ignition::launch::Plugin plugin; -} - -#undef SUPPRESS_IGNITION_HEADER_DEPRECATION diff --git a/tutorials/install.md b/tutorials/install.md index cdfcfeb5..a785f33e 100644 --- a/tutorials/install.md +++ b/tutorials/install.md @@ -62,7 +62,7 @@ necessary prerequisites followed by building from source. ``` sudo apt -y install \ - $(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | sed '/ignition\|sdf/d' | tr '\n' ' ') + $(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | sed '/gz\|sdf/d' | tr '\n' ' ') ``` 1. Install required Gazebo libraries @@ -105,7 +105,7 @@ necessary prerequisites followed by building from source. 2. Install dependencies ``` - brew install --only-dependencies ignition-launch<#> + brew install --only-dependencies gz-launch<#> ``` Be sure to replace `<#>` with a number value, such as 5 or 6, depending on which version you need. From ddc7ec78ac45f62dc26e9682595bd5d97231ad9a Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 27 Jul 2023 21:46:01 -0700 Subject: [PATCH 2/3] version bumps Signed-off-by: Nate Koenig --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f12380ee..9840259e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ project(gz-launch7 VERSION 7.0.0) #============================================================================ # Find gz-cmake #============================================================================ -find_package(gz-cmake3 REQUIRED) -set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR}) +find_package(gz-cmake4 REQUIRED) +set(GZ_CMAKE_VER ${gz-cmake4_VERSION_MAJOR}) #============================================================================ # Configure the project @@ -36,18 +36,18 @@ gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2) #-------------------------------------- # Find gz-common -gz_find_package(gz-common5 REQUIRED PRIVATE) -set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) +gz_find_package(gz-common6 REQUIRED PRIVATE) +set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR}) #-------------------------------------- # Find gz-utils -gz_find_package(gz-utils2 REQUIRED COMPONENTS cli) -set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR}) +gz_find_package(gz-utils3 REQUIRED COMPONENTS cli) +set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR}) #-------------------------------------- # Find gz-plugin -gz_find_package(gz-plugin2 REQUIRED_BY launch COMPONENTS loader register) -set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR}) +gz_find_package(gz-plugin3 REQUIRED_BY launch COMPONENTS loader register) +set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR}) #-------------------------------------- # Find if gz command is available @@ -71,8 +71,8 @@ set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) #-------------------------------------- # Find gz-math -gz_find_package(gz-math7 REQUIRED) -set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) +gz_find_package(gz-math8 REQUIRED) +set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR}) #-------------------------------------- # Find gz-gui From 19b4f82a44eb84dd78b4edb1f399717bf3caf2e6 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Wed, 2 Aug 2023 05:28:36 -0700 Subject: [PATCH 3/3] harmonic Signed-off-by: Nate Koenig --- CMakeLists.txt | 20 ++++++++++---------- examples/factory.gzlaunch | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9840259e..f12380ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ project(gz-launch7 VERSION 7.0.0) #============================================================================ # Find gz-cmake #============================================================================ -find_package(gz-cmake4 REQUIRED) -set(GZ_CMAKE_VER ${gz-cmake4_VERSION_MAJOR}) +find_package(gz-cmake3 REQUIRED) +set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR}) #============================================================================ # Configure the project @@ -36,18 +36,18 @@ gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2) #-------------------------------------- # Find gz-common -gz_find_package(gz-common6 REQUIRED PRIVATE) -set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR}) +gz_find_package(gz-common5 REQUIRED PRIVATE) +set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) #-------------------------------------- # Find gz-utils -gz_find_package(gz-utils3 REQUIRED COMPONENTS cli) -set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR}) +gz_find_package(gz-utils2 REQUIRED COMPONENTS cli) +set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR}) #-------------------------------------- # Find gz-plugin -gz_find_package(gz-plugin3 REQUIRED_BY launch COMPONENTS loader register) -set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR}) +gz_find_package(gz-plugin2 REQUIRED_BY launch COMPONENTS loader register) +set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR}) #-------------------------------------- # Find if gz command is available @@ -71,8 +71,8 @@ set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) #-------------------------------------- # Find gz-math -gz_find_package(gz-math8 REQUIRED) -set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR}) +gz_find_package(gz-math7 REQUIRED) +set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) #-------------------------------------- # Find gz-gui diff --git a/examples/factory.gzlaunch b/examples/factory.gzlaunch index 1d12cb54..005ae59d 100644 --- a/examples/factory.gzlaunch +++ b/examples/factory.gzlaunch @@ -9,7 +9,7 @@ - https://fuel.gazeosim.org/1.0/openrobotics/models/X2 UGV/1 + https://fuel.gazebosim.org/1.0/openrobotics/models/X2 UGV/1 front_left_wheel_joint