From 2cb9f8ab908fbde0b76432a1aff06d75fc963ab0 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 27 Jul 2023 05:21:23 -0700 Subject: [PATCH 1/7] Removing ignition Signed-off-by: Nate Koenig --- docker/build.bash | 2 +- examples/worlds/deprecated_ignition.sdf | 82 ------------------- include/gz/sim/ServerConfig.hh | 4 +- include/gz/sim/System.hh | 2 +- include/gz/sim/Util.hh | 2 +- include/gz/sim/components/Model.hh | 4 +- src/ServerConfig.cc | 18 ---- src/ServerPrivate.cc | 2 +- src/SystemLoader.cc | 21 ----- src/Util_TEST.cc | 4 +- .../banana_for_scale/BananaForScale.cc | 4 +- .../component_inspector/ComponentInspector.cc | 4 +- .../resource_spawner/ResourceSpawner.cc | 17 ++-- src/rendering/RenderUtil.cc | 9 -- src/systems/air_speed/AirSpeed.cc | 2 +- src/systems/hydrodynamics/Hydrodynamics.cc | 2 +- src/systems/lens_flare/LensFlare.cc | 3 - src/systems/log/LogPlayback.cc | 4 +- src/systems/physics/Physics.cc | 10 --- .../triggered_publisher/TriggeredPublisher.hh | 4 +- test/integration/battery_plugin.cc | 4 +- test/integration/deprecated_TEST.cc | 34 -------- test/worlds/battery_thruster_consumer.sdf | 24 +++--- test/worlds/hydrodynamics.sdf.in | 2 +- tutorials/erb_template.md | 4 +- tutorials/migration_actor_api.md | 50 +++++------ tutorials/migration_joint_api.md | 70 ++++++++-------- tutorials/migration_light_api.md | 56 ++++++------- tutorials/model_photo_shoot.md | 2 +- tutorials/move_camera_to_model.md | 6 +- tutorials/particle_tutorial.md | 4 +- tutorials/resources.md | 2 +- tutorials/triggered_publisher.md | 24 +++--- 33 files changed, 150 insertions(+), 332 deletions(-) delete mode 100644 examples/worlds/deprecated_ignition.sdf delete mode 100644 test/integration/deprecated_TEST.cc diff --git a/docker/build.bash b/docker/build.bash index 0f7db5cc07..b3ee429514 100755 --- a/docker/build.bash +++ b/docker/build.bash @@ -7,7 +7,7 @@ if [ $# -eq 0 ] then echo "Usage: $0 " - echo "Example: $0 ignition-blueprint ./Dockerfile.gz" + echo "Example: $0 gz-garden ./Dockerfile.gz" exit 1 fi diff --git a/examples/worlds/deprecated_ignition.sdf b/examples/worlds/deprecated_ignition.sdf deleted file mode 100644 index 50dfe997a1..0000000000 --- a/examples/worlds/deprecated_ignition.sdf +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - 3D View - false - docked - - - ogre2 - scene - 0.4 0.4 0.4 - 0.8 0.8 0.8 - -6 0 6 0 0.5 0 - - - - - true - 0 0 10 0 0 0 - 0.8 0.8 0.8 1 - 0.2 0.2 0.2 1 - - 1000 - 0.9 - 0.01 - 0.001 - - -0.5 0.1 -0.9 - - - - true - - - - - 0 0 1 - 100 100 - - - - - - - 0 0 1 - 100 100 - - - - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - - - - - - - diff --git a/include/gz/sim/ServerConfig.hh b/include/gz/sim/ServerConfig.hh index 582134f9bf..4c67af53af 100644 --- a/include/gz/sim/ServerConfig.hh +++ b/include/gz/sim/ServerConfig.hh @@ -376,14 +376,14 @@ namespace gz UpdatePeriod() const; /// \brief Path to where simulation resources, such as models downloaded - /// from fuel.ignitionrobotics.org, should be stored. + /// from fuel.gazebosim.org, should be stored. /// \return Path to a location on disk. An empty string indicates that /// the default value will be used, which is currently /// ~/.gz/fuel. public: const std::string &ResourceCache() const; /// \brief Set the path to where simulation resources, such as models - /// downloaded from fuel.ignitionrobotics.org, should be stored. + /// downloaded from fuel.gazebosim.org, should be stored. /// \param[in] _path Path to a location on disk. An empty string /// indicates that the default value will be used, which is currently /// ~/.gz/fuel. diff --git a/include/gz/sim/System.hh b/include/gz/sim/System.hh index c5ef4ef965..cc0139161e 100644 --- a/include/gz/sim/System.hh +++ b/include/gz/sim/System.hh @@ -102,7 +102,7 @@ namespace gz EventManager &_eventMgr) = 0; }; - /// \class ISystemConfigureParameters ISystem.hh ignition/gazebo/System.hh + /// \class ISystemConfigureParameters ISystem.hh gz/sim/System.hh /// \brief Interface for a system that declares parameters. /// /// ISystemConfigureParameters::ConfigureParameters is called after diff --git a/include/gz/sim/Util.hh b/include/gz/sim/Util.hh index 8e84199ddf..8206355701 100644 --- a/include/gz/sim/Util.hh +++ b/include/gz/sim/Util.hh @@ -232,7 +232,7 @@ namespace gz /// 2. "../shapes.sdf" - This is referencing a relative world file. /// 3. "/home/user/shapes.sdf" - This is reference an absolute world /// file. - /// 4. "https://fuel.ignitionrobotics.org/1.0/openrobotics/worlds/shapes.sdf" + /// 4. "https://fuel.gazebosim.org/1.0/openrobotics/worlds/shapes.sdf" /// This is referencing a Fuel URI. This will download the world file. /// \param[in] _fuelResourceCache Path to a Fuel resource cache, if /// known. diff --git a/include/gz/sim/components/Model.hh b/include/gz/sim/components/Model.hh index 8b68028786..c5d28cbe1b 100644 --- a/include/gz/sim/components/Model.hh +++ b/include/gz/sim/components/Model.hh @@ -58,8 +58,8 @@ namespace serializers { // Skip serializing models with //pose/@relative_to attribute // since deserialization will fail. This could be a nested model. - // see https://github.com/ignitionrobotics/ign-gazebo/issues/1071 - // Once https://github.com/ignitionrobotics/sdformat/issues/820 is + // see https://github.com/gazebosim/gz-gazebo/issues/1071 + // Once https://github.com/gazebosim/sdformat/issues/820 is // resolved, there should be an API that returns sdf::Errors objects // instead of printing console msgs so it would be easier to ignore // specific errors in Deserialize. diff --git a/src/ServerConfig.cc b/src/ServerConfig.cc index 030edc6a00..23c927248f 100644 --- a/src/ServerConfig.cc +++ b/src/ServerConfig.cc @@ -605,16 +605,7 @@ const std::string &ServerConfig::RenderEngineServer() const ///////////////////////////////////////////////// void ServerConfig::SetRenderEngineServer(const std::string &_engine) { - // Deprecated: accept ignition-prefixed engines - std::string deprecatedPrefix{"ignition"}; auto engine = _engine; - auto pos = engine.find(deprecatedPrefix); - if (pos != std::string::npos) - { - engine.replace(pos, deprecatedPrefix.size(), "gz"); - gzwarn << "Trying to load deprecated engine [" << _engine - << "] for the server. Use [" << engine << "] instead." << std::endl; - } this->dataPtr->renderEngineServer = engine; } @@ -652,16 +643,7 @@ const std::string &ServerConfig::RenderEngineGui() const ///////////////////////////////////////////////// void ServerConfig::SetRenderEngineGui(const std::string &_engine) { - // Deprecated: accept ignition-prefixed engines - std::string deprecatedPrefix{"ignition"}; auto engine = _engine; - auto pos = engine.find(deprecatedPrefix); - if (pos != std::string::npos) - { - engine.replace(pos, deprecatedPrefix.size(), "gz"); - gzwarn << "Trying to load deprecated engine [" << _engine - << "] for the GUI. Use [" << engine << "] instead." << std::endl; - } this->dataPtr->renderEngineGui = engine; } diff --git a/src/ServerPrivate.cc b/src/ServerPrivate.cc index 97b3930c55..80df07819e 100644 --- a/src/ServerPrivate.cc +++ b/src/ServerPrivate.cc @@ -45,7 +45,7 @@ struct LoggingPlugin public: static std::string &LoggingPluginFileName() { static std::string recordPluginFileName = - std::string("ignition-gazebo") + + std::string("gz-sim") + GZ_SIM_MAJOR_VERSION_STR + "-log-system"; return recordPluginFileName; } diff --git a/src/SystemLoader.cc b/src/SystemLoader.cc index 4f1f9e4edc..ab7c878189 100644 --- a/src/SystemLoader.cc +++ b/src/SystemLoader.cc @@ -63,16 +63,7 @@ class gz::sim::SystemLoaderPrivate public: bool InstantiateSystemPlugin(const sdf::Plugin &_sdfPlugin, gz::plugin::PluginPtr &_gzPlugin) { - // Deprecated: accept ignition-gazebo-prefixed systems - std::string deprecatedPrefix{"ignition-gazebo"}; auto filename = _sdfPlugin.Filename(); - auto pos = filename.find(deprecatedPrefix); - if (pos != std::string::npos) - { - filename.replace(pos, deprecatedPrefix.size(), "gz-sim"); - gzwarn << "Trying to load deprecated plugin [" << _sdfPlugin.Filename() - << "]. Using [" << filename << "] instead." << std::endl; - } std::list paths = this->PluginPaths(); common::SystemPaths systemPaths; @@ -123,18 +114,6 @@ class gz::sim::SystemLoaderPrivate std::string pluginToInstantiate = _sdfPlugin.Name().empty() ? pluginName : _sdfPlugin.Name(); - std::string deprecatedPluginNamePrefix{"ignition::gazebo"}; - pos = pluginToInstantiate.find(deprecatedPluginNamePrefix); - if (pos != std::string::npos) - { - auto origPluginName = pluginToInstantiate; - pluginToInstantiate.replace(pos, deprecatedPluginNamePrefix.size(), - "gz::sim"); - gzwarn << "Trying to load deprecated plugin name [" << origPluginName - << "]. Using [" << pluginToInstantiate << "] instead." - << std::endl; - } - _gzPlugin = this->loader.Instantiate(pluginToInstantiate); if (!_gzPlugin) { diff --git a/src/Util_TEST.cc b/src/Util_TEST.cc index 9b291983f6..37bc7b13c5 100644 --- a/src/Util_TEST.cc +++ b/src/Util_TEST.cc @@ -973,11 +973,11 @@ TEST_F(UtilTest, ResolveSdfWorldFile) // URI to a Fuel world. std::string fuelUri = - "https://fuel.ignitionrobotics.org/1.0/openrobotics/worlds/test world"; + "https://fuel.gazebosim.org/1.0/openrobotics/worlds/test world"; // The expect path for the local Fuel world. std::string expectedPath = common::joinPaths( - config.CacheLocation(), "fuel.ignitionrobotics.org", + config.CacheLocation(), "fuel.gazebosim.org", "openrobotics", "worlds", "test world"); // Get the Fuel world. diff --git a/src/gui/plugins/banana_for_scale/BananaForScale.cc b/src/gui/plugins/banana_for_scale/BananaForScale.cc index 6bfe427b8d..54b12621b1 100644 --- a/src/gui/plugins/banana_for_scale/BananaForScale.cc +++ b/src/gui/plugins/banana_for_scale/BananaForScale.cc @@ -44,10 +44,10 @@ namespace gz::sim } const char kBanana[] = - "https://fuel.ignitionrobotics.org/1.0/mjcarroll/models/banana for scale"; + "https://fuel.gazebosim.org/1.0/mjcarroll/models/banana for scale"; const char kBigBanana[] = - "https://fuel.ignitionrobotics.org/1.0/mjcarroll/models/big banana for scale"; + "https://fuel.gazebosim.org/1.0/mjcarroll/models/big banana for scale"; using namespace gz; using namespace sim; diff --git a/src/gui/plugins/component_inspector/ComponentInspector.cc b/src/gui/plugins/component_inspector/ComponentInspector.cc index 2f8fed736d..d6e89efbe6 100644 --- a/src/gui/plugins/component_inspector/ComponentInspector.cc +++ b/src/gui/plugins/component_inspector/ComponentInspector.cc @@ -1240,8 +1240,8 @@ void ComponentInspector::QuerySystems() // Remove common prefixes and suffixes auto humanReadable = plugin.filename(); - removePrefix("ignition-gazebo-", humanReadable); - removePrefix("ignition-gazebo" + + removePrefix("gz-sim-", humanReadable); + removePrefix("gz-sim" + std::string(GZ_SIM_MAJOR_VERSION_STR) + "-", humanReadable); removeSuffix("-system", humanReadable); removeSuffix("system", humanReadable); diff --git a/src/gui/plugins/resource_spawner/ResourceSpawner.cc b/src/gui/plugins/resource_spawner/ResourceSpawner.cc index e268d5f05b..2304ffc27e 100644 --- a/src/gui/plugins/resource_spawner/ResourceSpawner.cc +++ b/src/gui/plugins/resource_spawner/ResourceSpawner.cc @@ -553,25 +553,20 @@ void ResourceSpawner::LoadConfig(const tinyxml2::XMLElement *) auto servers = this->dataPtr->fuelClient->Config().Servers(); // Since the ign->gz rename, `servers` here returns two items for the - // canonical Fuel server: fuel.ignitionrobotics.org and fuel.gazebosim.org. + // canonical Fuel server: fuel.gazebosim.org and fuel.gazebosim.org. // For the purposes of the ResourceSpawner, these will be treated as the same - // and we will remove the ignitionrobotics server here. + // and we will remove the gazebo server here. auto urlIs = [](const std::string &_url) { return [_url](const fuel_tools::ServerConfig &_server) { return _server.Url().Str() == _url; }; }; - auto ignIt = std::find_if(servers.begin(), servers.end(), - urlIs("https://fuel.ignitionrobotics.org")); - if (ignIt != servers.end()) + auto gzsimIt = std::find_if(servers.begin(), servers.end(), + urlIs("https://fuel.gazebosim.org")); + if (gzsimIt != servers.end()) { - auto gzsimIt = std::find_if(servers.begin(), servers.end(), - urlIs("https://fuel.gazebosim.org")); - if (gzsimIt != servers.end()) - { - servers.erase(ignIt); - } + servers.erase(ignIt); } gzmsg << "Please wait... Loading models from Fuel.\n"; diff --git a/src/rendering/RenderUtil.cc b/src/rendering/RenderUtil.cc index 49ed8835f5..2055daa57d 100644 --- a/src/rendering/RenderUtil.cc +++ b/src/rendering/RenderUtil.cc @@ -2797,16 +2797,7 @@ void RenderUtil::ShowGrid() ///////////////////////////////////////////////// void RenderUtil::SetEngineName(const std::string &_name) { - // Deprecated: accept ignition-prefixed engines - std::string deprecatedPrefix{"ignition"}; auto name = _name; - auto pos = name.find(deprecatedPrefix); - if (pos != std::string::npos) - { - name.replace(pos, deprecatedPrefix.size(), "gz"); - gzwarn << "Trying to load deprecated engine [" << _name - << "] for the server. Use [" << name << "] instead." << std::endl; - } this->dataPtr->engineName = name; } diff --git a/src/systems/air_speed/AirSpeed.cc b/src/systems/air_speed/AirSpeed.cc index 2082e4e2a1..3b47b987ee 100644 --- a/src/systems/air_speed/AirSpeed.cc +++ b/src/systems/air_speed/AirSpeed.cc @@ -307,4 +307,4 @@ GZ_ADD_PLUGIN(AirSpeed, System, GZ_ADD_PLUGIN_ALIAS(AirSpeed, "gz::sim::systems::AirSpeed") // TODO(CH3): Deprecated, remove on version 8 -GZ_ADD_PLUGIN_ALIAS(AirSpeed, "ignition::gazebo::systems::AirSpeed") +GZ_ADD_PLUGIN_ALIAS(AirSpeed, "gz::sim::systems::AirSpeed") diff --git a/src/systems/hydrodynamics/Hydrodynamics.cc b/src/systems/hydrodynamics/Hydrodynamics.cc index 6b2167a072..4158b5059a 100644 --- a/src/systems/hydrodynamics/Hydrodynamics.cc +++ b/src/systems/hydrodynamics/Hydrodynamics.cc @@ -296,7 +296,7 @@ void Hydrodynamics::Configure( if (_sdf->HasElement("waterDensity")) { ignwarn << - " parameter is deprecated and will be removed Ignition G.\n" + " parameter is deprecated and will be removed Gazebo G.\n" << "\tPlease update your SDF to use instead."; } diff --git a/src/systems/lens_flare/LensFlare.cc b/src/systems/lens_flare/LensFlare.cc index a82c6ada1f..0e5b5b767a 100644 --- a/src/systems/lens_flare/LensFlare.cc +++ b/src/systems/lens_flare/LensFlare.cc @@ -237,6 +237,3 @@ GZ_ADD_PLUGIN(LensFlare, // Add plugin alias so that we can refer to the plugin without the version // namespace GZ_ADD_PLUGIN_ALIAS(LensFlare, "gz::sim::systems::LensFlare") - -// TODO(CH3): Deprecated, remove on version 8 -GZ_ADD_PLUGIN_ALIAS(LensFlare, "ignition::gazebo::systems::LensFlare") diff --git a/src/systems/log/LogPlayback.cc b/src/systems/log/LogPlayback.cc index b8813f6bf8..8c2c50f773 100644 --- a/src/systems/log/LogPlayback.cc +++ b/src/systems/log/LogPlayback.cc @@ -510,9 +510,9 @@ void LogPlayback::Update(const UpdateInfo &_info, EntityComponentManager &_ecm) { auto msgType = iter->Type(); - // Support ignition.msgs for backwards compatibility, don't remove on tock + // Support gz.msgs for backwards compatibility, don't remove on tock // so users can use logs across versions - std::string deprecatedPrefix{"ignition.msgs"}; + std::string deprecatedPrefix{"gz.msgs"}; auto pos = msgType.find(deprecatedPrefix); if (pos != std::string::npos) { diff --git a/src/systems/physics/Physics.cc b/src/systems/physics/Physics.cc index 27fb5378f9..0d064bedb4 100644 --- a/src/systems/physics/Physics.cc +++ b/src/systems/physics/Physics.cc @@ -775,16 +775,6 @@ void Physics::Configure(const Entity &_entity, pluginLib = "gz-physics-dartsim-plugin"; } - // Deprecated: accept ignition-prefixed engines - std::string deprecatedPrefix{"ignition"}; - auto pos = pluginLib.find(deprecatedPrefix); - if (pos != std::string::npos) - { - auto msg = "Trying to load deprecated plugin [" + pluginLib + "]. Use ["; - pluginLib.replace(pos, deprecatedPrefix.size(), "gz"); - gzwarn << msg << pluginLib << "] instead." << std::endl; - } - // Update component if (!engineComp) { diff --git a/src/systems/triggered_publisher/TriggeredPublisher.hh b/src/systems/triggered_publisher/TriggeredPublisher.hh index f503c48b11..776b86c76f 100644 --- a/src/systems/triggered_publisher/TriggeredPublisher.hh +++ b/src/systems/triggered_publisher/TriggeredPublisher.hh @@ -86,8 +86,8 @@ namespace systems /// * Attributes: /// * `name`: Service name (eg. `/world/triggered_publisher/set_pose`) /// * `timeout`: Service timeout - /// * `reqType`: Service request message type (eg. ignition.msgs.Pose) - /// * `repType`: Service response message type (eg. ignition.msgs.Empty) + /// * `reqType`: Service request message type (eg. gz.msgs.Pose) + /// * `repType`: Service response message type (eg. gz.msgs.Empty) /// * `reqMsg`: String used to construct the service protobuf message. /// /// Examples: diff --git a/test/integration/battery_plugin.cc b/test/integration/battery_plugin.cc index 6873341208..7f31376af4 100644 --- a/test/integration/battery_plugin.cc +++ b/test/integration/battery_plugin.cc @@ -292,7 +292,7 @@ TEST_F(BatteryPluginTest, // the LinearBatteryPlugin is not zero when created. If // components::BatterySoC is zero on start, then the Physics plugin // can disable a joint. This in turn can prevent the joint from - // rotating. See https://github.com/ignitionrobotics/ign-gazebo/issues/55 + // rotating. See https://github.com/gazebosim/gz-sim/issues/55 EXPECT_GT(batComp->Data(), 0); EXPECT_GT(batComp2->Data(), 0); }; @@ -333,7 +333,7 @@ TEST_F(BatteryPluginTest, ///////////////////////////////////////////////// // Battery with power draining topics -// See https://github.com/ignitionrobotics/ign-gazebo/issues/1175 +// See https://github.com/gazebosim/gz-sim/issues/1175 TEST_F(BatteryPluginTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(PowerDrainTopic)) { const auto sdfPath = common::joinPaths(std::string(PROJECT_SOURCE_PATH), diff --git a/test/integration/deprecated_TEST.cc b/test/integration/deprecated_TEST.cc deleted file mode 100644 index 57ca438c10..0000000000 --- a/test/integration/deprecated_TEST.cc +++ /dev/null @@ -1,34 +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 -#include - -GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION - -///////////////////////////////////////////////// -// Make sure the ignition namespace still works -TEST(Deprecated, IgnitionNamespace) -{ - ignition::gazebo::System system; -} - -#undef SUPPRESS_IGNITION_HEADER_DEPRECATION - -GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION diff --git a/test/worlds/battery_thruster_consumer.sdf b/test/worlds/battery_thruster_consumer.sdf index 58afe3720c..05329ab3e6 100644 --- a/test/worlds/battery_thruster_consumer.sdf +++ b/test/worlds/battery_thruster_consumer.sdf @@ -11,12 +11,12 @@ 0 0 0 + filename="gz-sim-physics-system" + name="gz::sim::systems::Physics"> + filename="gz-sim-scene-broadcaster-system" + name="gz::sim::systems::SceneBroadcaster"> @@ -95,8 +95,8 @@ + filename="gz-sim-thruster-system" + name="gz::sim::systems::Thruster"> lowbattery propeller_joint 0.005 @@ -108,8 +108,8 @@ thrust - + linear_battery 12.592 12.694 @@ -186,8 +186,8 @@ + filename="gz-sim-thruster-system" + name="gz::sim::systems::Thruster"> lowbattery propeller_joint 0.005 @@ -201,8 +201,8 @@ linear_battery2 - + linear_battery2 12.592 12.694 diff --git a/test/worlds/hydrodynamics.sdf.in b/test/worlds/hydrodynamics.sdf.in index 7e86144be7..627d6589b1 100644 --- a/test/worlds/hydrodynamics.sdf.in +++ b/test/worlds/hydrodynamics.sdf.in @@ -27,7 +27,7 @@ diff --git a/tutorials/erb_template.md b/tutorials/erb_template.md index e38f5cd1d4..d6dbbe350e 100644 --- a/tutorials/erb_template.md +++ b/tutorials/erb_template.md @@ -116,11 +116,11 @@ Instead of simple shapes, you can also use a nested loop to generate 100 actors - https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/talk_b.dae + https://fuel.gazebosim.org/1.0/Mingfei/models/actor/tip/files/meshes/talk_b.dae 1.0 - https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/talk_b.dae + https://fuel.gazebosim.org/1.0/Mingfei/models/actor/tip/files/meshes/talk_b.dae 0.055 true diff --git a/tutorials/migration_actor_api.md b/tutorials/migration_actor_api.md index d1aacda04f..065a0b19d8 100644 --- a/tutorials/migration_actor_api.md +++ b/tutorials/migration_actor_api.md @@ -34,10 +34,10 @@ can be divided in these categories: You'll find the Gazebo APIs below on the following headers: -* [ignition/gazebo/Actor.hh](https://gazebosim.org/api/gazebo/7/Actor_8hh.html) -* [ignition/gazebo/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) -* [ignition/gazebo/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) -* [ignition/gazebo/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) +* [gz/sim/Actor.hh](https://gazebosim.org/api/gazebo/7/Actor_8hh.html) +* [gz/sim/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) +* [gz/sim/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) +* [gz/sim/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) It's worth remembering that most of this functionality can be performed using the @@ -75,15 +75,15 @@ CustomTrajectory | see `SetCustomTrajectory` DirtyPose | Not supported FillMsg | TODO GetAutoDisable | TODO -GetId | `ignition::gazebo::Model::Entity` -GetName | `ignition::gazebo::Actor::Name` +GetId | `gz::sim::Model::Entity` +GetName | `gz::sim::Actor::Name` GetPluginCount | TODO GetSaveable | Not supported -GetScopedName | `ignition::gazebo::scopedName` +GetScopedName | `gz::sim::scopedName` GetSDF | TODO GetSDFDom | TODO GetSelfCollide | TODO -GetType | `ignition::gazebo::entityType` +GetType | `gz::sim::entityType` GetWorldEnergy | TODO GetWorldEnergyKinetic | TODO GetWorldEnergyPotential | TODO @@ -102,17 +102,17 @@ RelativeAngularAccel | TODO RelativeAngularVel | TODO RelativeLinearAccel | TODO RelativeLinearVel | TODO -RelativePose | `ignition::gazebo::Actor::Pose` +RelativePose | `gz::sim::Actor::Pose` Scale | TODO -ScriptTime | `ignition::gazebo::Actor::AnimationTime` -SDFPoseRelativeToParent | `ignition::gazebo::Actor::Pose` -SDFSemanticPose | `ignition::gazebo::Actor::Pose` +ScriptTime | `gz::sim::Actor::AnimationTime` +SDFPoseRelativeToParent | `gz::sim::Actor::Pose` +SDFSemanticPose | `gz::sim::Actor::Pose` SensorScopedName | TODO SetAngularVel | TODO -SetAnimation | use `ignition::gazebo::Actor::SetTrajectoryPose` +SetAnimation | use `gz::sim::Actor::SetTrajectoryPose` SetAutoDisable | TODO SetCollideMode | TODO -SetCustomTrajectory | use `ignition::gazebo::Actor::SetTrajectoryPose`, `SetAnimationTime`, and `SetAnimationName` to achieve similar result. +SetCustomTrajectory | use `gz::sim::Actor::SetTrajectoryPose`, `SetAnimationTime`, and `SetAnimationName` to achieve similar result. SetEnabled | TODO SetGravityMode | TODO SetInitialRelativePose | TODO @@ -126,7 +126,7 @@ SetName | TODO SetRelativePose | TODO SetSaveable | Not supported SetScale | TODO -SetScriptTime | `ignition::gazebo::Actor::SetAnimationTime` +SetScriptTime | `gz::sim::Actor::SetAnimationTime` SetSelected | Selection is client-specific, not porting SetSelfCollide | TODO SetState | TODO @@ -136,8 +136,8 @@ SetWorldPose | TODO SetWorldTwist | TODO SkeletonAnimations | TODO Stop | TODO -StopAnimation | use `ignition::gazebo::Actor::SetTrajectoryPose` -TypeStr | `ignition::gazebo::entityTypeStr` +StopAnimation | use `gz::sim::Actor::SetTrajectoryPose` +TypeStr | `gz::sim::entityTypeStr` UnscaledSDF | TODO UpdateParamenters | TODO URI | TODO @@ -146,7 +146,7 @@ WorldAngularAccel | TODO WorldAngularVel | TODO WorldLinearAccel | TODO WorldLinearVel | TODO -WorldPose | `ignition::gazebo::Actor::WorldPose` +WorldPose | `gz::sim::Actor::WorldPose` --- @@ -175,11 +175,11 @@ GetJointCount | Not supported GetJoints | Not supported GetLink | TODO GetLinks | TODO -GetParent | `ignition::gazebo::EntiyComponentManager::ParentEntity` -GetParentId | `ignition::gazebo::EntiyComponentManager::ParentEntity` -GetParentModel | `ignition::gazebo::EntiyComponentManager::ParentEntity` +GetParent | `gz::sim::EntiyComponentManager::ParentEntity` +GetParentId | `gz::sim::EntiyComponentManager::ParentEntity` +GetParentModel | `gz::sim::EntiyComponentManager::ParentEntity` GetSensorCount | TODO -GetWorld | const `ignition::gazebo::worldEntity` +GetWorld | const `gz::sim::worldEntity` NestedModel | TODO NestedModels | TODO @@ -219,8 +219,8 @@ Classic | Gazebo -- | -- Fini | N/A Init | N/A -Load | `ignition::gazebo::SdfEntityCreator::CreateEntities` -LoadJoints | `ignition::gazebo::SdfEntityCreator::CreateEntities` +Load | `gz::sim::SdfEntityCreator::CreateEntities` +LoadJoints | `gz::sim::SdfEntityCreator::CreateEntities` LoadPlugins | TODO Reset | TODO ResetCustomTrajectory | TODO @@ -239,7 +239,7 @@ logic that should be performed from within a system. Classic | Gazebo -- | -- -GetJointController | Use this system: `ignition::gazebo::systems::JointController` +GetJointController | Use this system: `gz::sim::systems::JointController` GetNearestEntityBelow | Requires a system PlaceOnEntity | Requires a system PlaceOnNearestEntityBelow | Requires a system diff --git a/tutorials/migration_joint_api.md b/tutorials/migration_joint_api.md index 54179c31c3..8e33acd5e7 100644 --- a/tutorials/migration_joint_api.md +++ b/tutorials/migration_joint_api.md @@ -32,10 +32,10 @@ can be divided in these categories: You'll find the Gazebo APIs below on the following headers: -* [ignition/gazebo/Joint.hh](https://gazebosim.org/api/gazebo/7/Joint_8hh.html) -* [ignition/gazebo/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) -* [ignition/gazebo/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) -* [ignition/gazebo/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) +* [gz/sim/Joint.hh](https://gazebosim.org/api/gazebo/7/Joint_8hh.html) +* [gz/sim/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) +* [gz/sim/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) +* [gz/sim/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) It's worth remembering that most of this functionality can be performed using the @@ -76,24 +76,24 @@ DOF | TODO FillMsg | TODO GetDamping | TODO GetEffortLimit | TODO -GetForce | `ignition::gazebo::Joint::TransmittedWrench` -GetForceTorque | `ignition::gazebo::Joint::TransmittedWrench` -GetId | `ignition::gazebo::Joint::Entity` +GetForce | `gz::sim::Joint::TransmittedWrench` +GetForceTorque | `gz::sim::Joint::TransmittedWrench` +GetId | `gz::sim::Joint::Entity` GetInertiaRatio | TODO -GetJointLink | use `ignition::gazebo::Joint::*LinkName` +GetJointLink | use `gz::sim::Joint::*LinkName` GetMsgType | TODO -GetName | `ignition::gazebo::Joint::Name` +GetName | `gz::sim::Joint::Name` GetParam | TODO GetSaveable | Not supported -GetScopedName | `ignition::gazebo::scopedName` +GetScopedName | `gz::sim::scopedName` GetSDF | TODO GetSDFDom | TODO GetSpringReferencePosition | TODO GetStiffness | TODO GetStopDissipation | TODO GetStopStiffness | TODO -GetType | `ignition::gazebo::Joint::Type` -GetVelocity | `ignition::gazebo::Joint::Velocity` +GetType | `gz::sim::Joint::Type` +GetVelocity | `gz::sim::Joint::Velocity` GetVelocityLimit | TODO GetWorldEnergyPotentialSpring | TODO GlobalAxis | TODO @@ -103,24 +103,24 @@ InitialAnchorPose | TODO IsSelected | Selection is client-specific, not porting LinkForce | TODO LinkTorque | TODO -LocalAxis | `ignition::gazebo::Joint::Axis` +LocalAxis | `gz::sim::Joint::Axis` LowerLimit | TODO ParentWorldPose | TODO -Position | `ignition::gazebo::Joint::Position` +Position | `gz::sim::Joint::Position` Print | TODO ResolveAxisXyz | TODO -SDFPoseRelativeToParent | `ignition::gazebo::Joint::Pose` -SDFSemanticPose | `ignition::gazebo::Joint::Pose` +SDFPoseRelativeToParent | `gz::sim::Joint::Pose` +SDFSemanticPose | `gz::sim::Joint::Pose` SetAnchor | TODO SetAxis | TODO SetDamping | TODO -SetEffortLimit | `ignition::gazebo::Joint::SetEffortLimits` -SetForce | `ignition::gazebo::Joint::SetForce` -SetLowerLimit | `ignition::gazebo::Joint::SetPositionLimits` +SetEffortLimit | `gz::sim::Joint::SetEffortLimits` +SetForce | `gz::sim::Joint::SetForce` +SetLowerLimit | `gz::sim::Joint::SetPositionLimits` SetName | TODO SeParam | TODO -SetPosition | `ignition::gazebo::Joint::ResetPosition` -SetProvideFeedback | `ignition::gazebo::Joint::EnableTransmittedWrenchCheck` +SetPosition | `gz::sim::Joint::ResetPosition` +SetProvideFeedback | `gz::sim::Joint::EnableTransmittedWrenchCheck` SetSaveable | Not supported SetSelected | Selection is client-specific, not porting SetState | TODO @@ -128,10 +128,10 @@ SetStiffness | TODO SetStiffnessDamping | TODO SetStopDissipation | TODO SetStopStiffness | TODO -SetUpperLimit | `ignition::gazebo::Joint::SetPositionLimits` -SetVelocity | `ignition::gazebo::Joint::SetVelocity` -SetVelocityLimit | `ignition::gazebo::Joint::SetVelocityLimits` -TypeStr | `ignition::gazebo::Joint::Type` +SetUpperLimit | `gz::sim::Joint::SetPositionLimits` +SetVelocity | `gz::sim::Joint::SetVelocity` +SetVelocityLimit | `gz::sim::Joint::SetVelocityLimits` +TypeStr | `gz::sim::Joint::Type` UpdateParameters | TODO UpperLimit | TODO URI | TODO @@ -152,14 +152,14 @@ they deal with entity IDs. Classic | Gazebo -- | -- -GetByName | Use type-specific `ignition::gazebo::Joint::*ByName` -GetChild | Use type-specific `ignition::gazebo::Joint::*ByName` -GetChild (Child link) | `ignition::gazebo::Joint::ChildLinkName` -GetChildCount | Use type-specific `ignition::gazebo::Joint::*Count` -GetParent | `ignition::gazebo::Joint::ParentModel` -GetParent (Parent link) | `ignition::gazebo::Joint::ParentLinkName` -GetParentId | `ignition::gazebo::EntiyComponentManager::ParentEntity` -GetWorld | `ignition::gazebo::worldEntity` +GetByName | Use type-specific `gz::sim::Joint::*ByName` +GetChild | Use type-specific `gz::sim::Joint::*ByName` +GetChild (Child link) | `gz::sim::Joint::ChildLinkName` +GetChildCount | Use type-specific `gz::sim::Joint::*Count` +GetParent | `gz::sim::Joint::ParentModel` +GetParent (Parent link) | `gz::sim::Joint::ParentLinkName` +GetParentId | `gz::sim::EntiyComponentManager::ParentEntity` +GetWorld | `gz::sim::worldEntity` --- @@ -196,8 +196,8 @@ Classic | Gazebo ConnectJointUpdate | TODO Fini | N/A Init | N/A -Load | `ignition::gazebo::SdfEntityCreator::CreateEntities` -Reset | `ignition::gazebo::Joint::ResetPosition` / `ignition::gazebo::Joint::ResetVelocity` +Load | `gz::sim::SdfEntityCreator::CreateEntities` +Reset | `gz::sim::Joint::ResetPosition` / `gz::sim::Joint::ResetVelocity` Update | Entities are updated by systems --- diff --git a/tutorials/migration_light_api.md b/tutorials/migration_light_api.md index 79ea920ddd..86f1f508c6 100644 --- a/tutorials/migration_light_api.md +++ b/tutorials/migration_light_api.md @@ -29,10 +29,10 @@ In Gazebo, the light APIs has been consolidated into a single Light class with some of generic functions available through other utility / core classes. You'll find the APIs below on the following headers: -* [ignition/gazebo/Light.hh](https://gazebosim.org/api/gazebo/7/Light_8hh.html) -* [ignition/gazebo/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) -* [ignition/gazebo/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) -* [ignition/gazebo/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) +* [gz/sim/Light.hh](https://gazebosim.org/api/gazebo/7/Light_8hh.html) +* [gz/sim/Util.hh](https://gazebosim.org/api/gazebo/7/Util_8hh.html) +* [gz/sim/SdfEntityCreator.hh](https://gazebosim.org/api/gazebo/7/SdfEntityCreator_8hh.html) +* [gz/sim/EntityComponentManager.hh](https://gazebosim.org/api/gazebo/7/classignition_1_1gazebo_1_1EntityComponentManager.html) It's worth remembering that most of this functionality can be performed using the @@ -62,35 +62,35 @@ This section focuses on migrating from APIs provided through the Classic | Gazebo -- | -- -CastShadows | `ignition::gazebo::Light::CastShadows` +CastShadows | `gz::sim::Light::CastShadows` Clone | TODO -DiffuseColor | `ignition::gazebo::Light::DiffuseColor` -Direction | `ignition::gazebo::Light::Direction` +DiffuseColor | `gz::sim::Light::DiffuseColor` +Direction | `gz::sim::Light::Direction` FillMsg | TODO -Id | `ignition::gazebo::Light::Entity` -LightType | `ignition::gazebo::Light::Type` -Name | `ignition::gazebo::Light::Name` -Position | `ignition::gazebo::Light::Pose` -Rotation | `ignition::gazebo::Light::Pose` -SetAttenuation | use `ignition::gazebo::Light::SetAttenuation*` -SetCastShadows | `ignition::gazebo::Light::SetCastShadows` -SetDiffuseColor | `ignition::gazebo::Light::SetDiffuseColor` -SetDirection | `ignition::gazebo::Light::SetDirection` +Id | `gz::sim::Light::Entity` +LightType | `gz::sim::Light::Type` +Name | `gz::sim::Light::Name` +Position | `gz::sim::Light::Pose` +Rotation | `gz::sim::Light::Pose` +SetAttenuation | use `gz::sim::Light::SetAttenuation*` +SetCastShadows | `gz::sim::Light::SetCastShadows` +SetDiffuseColor | `gz::sim::Light::SetDiffuseColor` +SetDirection | `gz::sim::Light::SetDirection` SetLightType | TODO SetName | TODO SetPosition | TODO -SetRange | `ignition::gazebo::Light::SetAttenuationRange` +SetRange | `gz::sim::Light::SetAttenuationRange` SetRotation | TODO SetSelected | Selection is client-specific, not porting -SetSpecularColor | `ignition::gazebo::Light::SetSpecularColor` -SetSpotFalloff | `ignition::gazebo::Light::SetSpotFalloff` -SetSpotInnerAngle | `ignition::gazebo::Light::SetSpotInnerAngle` -SetSpotOuterAngle | `ignition::gazebo::Light::SetSpotOuterAngle` +SetSpecularColor | `gz::sim::Light::SetSpecularColor` +SetSpotFalloff | `gz::sim::Light::SetSpotFalloff` +SetSpotInnerAngle | `gz::sim::Light::SetSpotInnerAngle` +SetSpotOuterAngle | `gz::sim::Light::SetSpotOuterAngle` SetVisible | TODO ShowVisual | TODO -SpecularColor | `ignition::gazebo::Light::SetSpecularColor` +SpecularColor | `gz::sim::Light::SetSpecularColor` ToggleShowVisual | TODO -Type | `ignition::gazebo::Light::Type` +Type | `gz::sim::Light::Type` Visible | TODO WorldPose | TODO --- @@ -112,9 +112,9 @@ they deal with entity IDs. Classic | Gazebo -- | -- -GetParent | `ignition::gazebo::Light::Parent` -GetParentId | `ignition::gazebo::Light::Parent` -GetWorld | `ignition::gazebo::worldEntity` +GetParent | `gz::sim::Light::Parent` +GetParentId | `gz::sim::Light::Parent` +GetWorld | `gz::sim::worldEntity` --- @@ -148,8 +148,8 @@ its properties. Classic | Gazebo -- | -- -Load | `ignition::gazebo::SdfEntityCreator::CreateEntities` -LoadFromMsg | `ignition::gazebo::SdfEntityCreator::CreateEntities` +Load | `gz::sim::SdfEntityCreator::CreateEntities` +LoadFromMsg | `gz::sim::SdfEntityCreator::CreateEntities` UpdateFromMsg | TODO --- diff --git a/tutorials/model_photo_shoot.md b/tutorials/model_photo_shoot.md index 0624a1882c..9b0ba0f17f 100644 --- a/tutorials/model_photo_shoot.md +++ b/tutorials/model_photo_shoot.md @@ -53,7 +53,7 @@ plugin will also affect the final resulting background color on the images. ``` - https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Robonaut + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Robonaut diff --git a/tutorials/move_camera_to_model.md b/tutorials/move_camera_to_model.md index fb008afb3b..25f014c404 100644 --- a/tutorials/move_camera_to_model.md +++ b/tutorials/move_camera_to_model.md @@ -5,12 +5,12 @@ This tutorial gives an introduction to Gazebo's service `/gui/move_to/model`. Th ## How to move the camera to a model 1. Load the **View Angle** plugin. This service is only available when the **View Angle** plugin is loaded. -2. Call the service using the request message type `ignition.msgs.GUICamera` and the response message type `ignition.msgs.Boolean`. The distance to the object is defined as the z coordinate, and the direction of the camera with a quaternion. It's possible to select the projection type. +2. Call the service using the request message type `gz.msgs.GUICamera` and the response message type `gz.msgs.Boolean`. The distance to the object is defined as the z coordinate, and the direction of the camera with a quaternion. It's possible to select the projection type. For example, Let's move the camera to the `box` model looking down from 5 meters away. ```bash -ign service -s /gui/move_to/model --reqtype ignition.msgs.GUICamera --reptype ignition.msgs.Boolean -r 'name: "box", pose: {position: {z:5}, orientation: {x:0, y:0, z: -1, w:0}}, projection_type: "orbit"' --timeout 5000 +ign service -s /gui/move_to/model --reqtype gz.msgs.GUICamera --reptype gz.msgs.Boolean -r 'name: "box", pose: {position: {z:5}, orientation: {x:0, y:0, z: -1, w:0}}, projection_type: "orbit"' --timeout 5000 ``` @image html files/move_camera_to_model/box_5.gif @@ -18,7 +18,7 @@ ign service -s /gui/move_to/model --reqtype ignition.msgs.GUICamera --reptype The camera can also be placed far away, for example 20 meters: ```bash -ign service -s /gui/move_to/model --reqtype ignition.msgs.GUICamera --reptype ignition.msgs.Boolean -r 'name: "box", pose: {position: {z:20}, orientation: {x:0, y:0, z: -1, w:0}}, projection_type: "orbit"' --timeout 5000 +ign service -s /gui/move_to/model --reqtype gz.msgs.GUICamera --reptype gz.msgs.Boolean -r 'name: "box", pose: {position: {z:20}, orientation: {x:0, y:0, z: -1, w:0}}, projection_type: "orbit"' --timeout 5000 ``` @image html files/move_camera_to_model/box_20.gif diff --git a/tutorials/particle_tutorial.md b/tutorials/particle_tutorial.md index e310e41c42..b676d204de 100644 --- a/tutorials/particle_tutorial.md +++ b/tutorials/particle_tutorial.md @@ -20,11 +20,11 @@ Next, we can start adding particle emitter models into the world. In our example ```xml - https://fuel.ignitionrobotics.org/1.0/openrobotics/models/fog generator + https://fuel.gazebosim.org/1.0/openrobotics/models/fog generator ``` -Here is the content of the Fog Generator [model.sdf](https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Fog%20Generator/1/files/model.sdf) file. +Here is the content of the Fog Generator [model.sdf](https://fuel.gazebosim.org/1.0/OpenRobotics/models/Fog%20Generator/1/files/model.sdf) file. ```xml diff --git a/tutorials/resources.md b/tutorials/resources.md index 09634ed9b7..97f81350fe 100644 --- a/tutorials/resources.md +++ b/tutorials/resources.md @@ -120,7 +120,7 @@ Gazebo will look for URIs (path / URL) in the following, in order: path is URI, scheme is stripped) 2. Current running path / absolute path 3. [Gazebo Fuel](https://app.gazebosim.org/fuel/models) - 1. Cache (i.e. `$HOME/.ignition/fuel`) + 1. Cache (i.e. `$HOME/.gz/fuel`) 2. Web server \* The `SDF_PATH` environment variable also works in some scenarios, but diff --git a/tutorials/triggered_publisher.md b/tutorials/triggered_publisher.md index 0e5bfafae0..4ce930b9e1 100644 --- a/tutorials/triggered_publisher.md +++ b/tutorials/triggered_publisher.md @@ -275,16 +275,16 @@ metadata to invoke a service call to `/world/triggered_publisher/set_pose`. The Multiple `` tags can be used as well as with the `` tag. ```xml - - - + + + linear: {x: 0} @@ -299,16 +299,16 @@ metadata to invoke a service call to `/world/triggered_publisher/set_pose`. The Multiple `` tags can be used as well as with the `` tag. ```xml - - - + + + linear: {x: 0} From 9e366b72b285e7af710b77420c5fcb900f86e563 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 27 Jul 2023 21:45:08 -0700 Subject: [PATCH 2/7] Version bumps Signed-off-by: Nate Koenig --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f75b0d492e..79547238e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set (GZ_DISTRIBUTION "?") # Find gz-cmake #============================================================================ # If you get an error at this line, you need to install gz-cmake -find_package(gz-cmake3 REQUIRED) +find_package(gz-cmake4 REQUIRED) #============================================================================ # Configure the project @@ -73,8 +73,8 @@ set(SDF_VER ${sdformat13_VERSION_MAJOR}) #-------------------------------------- # Find gz-plugin -gz_find_package(gz-plugin2 REQUIRED COMPONENTS loader register) -set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR}) +gz_find_package(gz-plugin3 REQUIRED COMPONENTS loader register) +set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR}) #-------------------------------------- # Find gz-transport @@ -89,7 +89,7 @@ set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) #-------------------------------------- # Find gz-common # Always use the profiler component to get the headers, regardless of status. -gz_find_package(gz-common5 +gz_find_package(gz-common6 COMPONENTS profiler events @@ -97,7 +97,7 @@ gz_find_package(gz-common5 io REQUIRED ) -set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) +set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR}) #-------------------------------------- # Find gz-fuel_tools From 50e62975f4d4d779bd42bc8c1177cbbe13ed6d9a Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Fri, 28 Jul 2023 10:39:01 -0700 Subject: [PATCH 3/7] Fix build Signed-off-by: Nate Koenig --- CMakeLists.txt | 16 +++++++------- .../component_inspector/ComponentInspector.cc | 8 +++---- .../resource_spawner/ResourceSpawner.cc | 16 -------------- src/rendering/RenderUtil.cc | 2 +- src/rendering/SceneManager.cc | 8 +++---- .../battery_plugin/LinearBatteryPlugin.cc | 4 ++-- .../environment_preload/EnvironmentPreload.cc | 2 +- src/systems/hydrodynamics/Hydrodynamics.cc | 4 ++-- src/systems/thruster/Thruster.cc | 6 ++--- .../triggered_publisher/TriggeredPublisher.cc | 22 +++++++++---------- 10 files changed, 36 insertions(+), 52 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79547238e8..4687d22daa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,8 +68,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # as protobuf could be find transitively by any dependency set(protobuf_MODULE_COMPATIBLE TRUE) -gz_find_package(sdformat13 REQUIRED) -set(SDF_VER ${sdformat13_VERSION_MAJOR}) +gz_find_package(sdformat14 REQUIRED) +set(SDF_VER ${sdformat14_VERSION_MAJOR}) #-------------------------------------- # Find gz-plugin @@ -118,14 +118,14 @@ gz_find_package (Qt5 #-------------------------------------- # Find gz-physics -gz_find_package(gz-physics6 +gz_find_package(gz-physics7 COMPONENTS heightmap mesh sdf REQUIRED ) -set(GZ_PHYSICS_VER ${gz-physics6_VERSION_MAJOR}) +set(GZ_PHYSICS_VER ${gz-physics7_VERSION_MAJOR}) #-------------------------------------- # Find gz-sensors @@ -166,8 +166,8 @@ set(GZ_RENDERING_VER ${gz-rendering8_VERSION_MAJOR}) #-------------------------------------- # Find gz-math -gz_find_package(gz-math7 REQUIRED COMPONENTS eigen3) -set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) +gz_find_package(gz-math8 REQUIRED COMPONENTS eigen3) +set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR}) #-------------------------------------- # Find if gz command is available @@ -183,8 +183,8 @@ set(GZ_TOOLS_VER 2) #-------------------------------------- # 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 protobuf diff --git a/src/gui/plugins/component_inspector/ComponentInspector.cc b/src/gui/plugins/component_inspector/ComponentInspector.cc index d6e89efbe6..8503027c0f 100644 --- a/src/gui/plugins/component_inspector/ComponentInspector.cc +++ b/src/gui/plugins/component_inspector/ComponentInspector.cc @@ -1223,7 +1223,7 @@ void ComponentInspector::QuerySystems() "/system/info"}; if (!this->dataPtr->node.Request(service, req, timeout, res, result)) { - ignerr << "Unable to query available systems." << std::endl; + gzerr << "Unable to query available systems." << std::endl; return; } @@ -1233,7 +1233,7 @@ void ComponentInspector::QuerySystems() { if (plugin.filename().empty()) { - ignerr << "Received empty plugin name. This shouldn't happen." + gzerr << "Received empty plugin name. This shouldn't happen." << std::endl; continue; } @@ -1281,7 +1281,7 @@ void ComponentInspector::OnAddSystem(const QString &_name, auto it = this->dataPtr->systemMap.find(filenameStr); if (it == this->dataPtr->systemMap.end()) { - ignerr << "Internal error: failed to find [" << filenameStr + gzerr << "Internal error: failed to find [" << filenameStr << "] in system map." << std::endl; return; } @@ -1304,7 +1304,7 @@ void ComponentInspector::OnAddSystem(const QString &_name, "/entity/system/add"}; if (!this->dataPtr->node.Request(service, req, timeout, res, result)) { - ignerr << "Error adding new system to entity: " + gzerr << "Error adding new system to entity: " << this->dataPtr->entity << "\n" << "Name: " << name << "\n" << "Filename: " << filename << "\n" diff --git a/src/gui/plugins/resource_spawner/ResourceSpawner.cc b/src/gui/plugins/resource_spawner/ResourceSpawner.cc index 2304ffc27e..bbf4d78a95 100644 --- a/src/gui/plugins/resource_spawner/ResourceSpawner.cc +++ b/src/gui/plugins/resource_spawner/ResourceSpawner.cc @@ -552,22 +552,6 @@ void ResourceSpawner::LoadConfig(const tinyxml2::XMLElement *) } auto servers = this->dataPtr->fuelClient->Config().Servers(); - // Since the ign->gz rename, `servers` here returns two items for the - // canonical Fuel server: fuel.gazebosim.org and fuel.gazebosim.org. - // For the purposes of the ResourceSpawner, these will be treated as the same - // and we will remove the gazebo server here. - auto urlIs = [](const std::string &_url) - { - return [_url](const fuel_tools::ServerConfig &_server) - { return _server.Url().Str() == _url; }; - }; - - auto gzsimIt = std::find_if(servers.begin(), servers.end(), - urlIs("https://fuel.gazebosim.org")); - if (gzsimIt != servers.end()) - { - servers.erase(ignIt); - } gzmsg << "Please wait... Loading models from Fuel.\n"; diff --git a/src/rendering/RenderUtil.cc b/src/rendering/RenderUtil.cc index 2055daa57d..d2c69babcd 100644 --- a/src/rendering/RenderUtil.cc +++ b/src/rendering/RenderUtil.cc @@ -1271,7 +1271,7 @@ void RenderUtil::Update() } else { - ignerr << "Failed to create light" << std::endl; + gzerr << "Failed to create light" << std::endl; } } diff --git a/src/rendering/SceneManager.cc b/src/rendering/SceneManager.cc index 55d10e9534..d95aa752d3 100644 --- a/src/rendering/SceneManager.cc +++ b/src/rendering/SceneManager.cc @@ -1191,7 +1191,7 @@ rendering::LightPtr SceneManager::CreateLight(Entity _id, if (this->HasEntity(_id)) { - ignerr << "Light with Id: [" << _id << "] can not be create there is " + gzerr << "Light with Id: [" << _id << "] can not be create there is " "another entity with the same entity number" << std::endl; return nullptr; } @@ -2376,7 +2376,7 @@ SceneManager::LoadAnimations(const sdf::Actor &_actor) { if (!meshSkel->AddBvhAnimation(animFilename, animScale)) { - ignerr << "Bvh animation in file " << animFilename + gzerr << "Bvh animation in file " << animFilename << " failed to load during actor creation" << std::endl; continue; } @@ -2473,7 +2473,7 @@ SceneManagerPrivate::LoadTrajectories(const sdf::Actor &_actor, const sdf::Trajectory *trajSdf = _actor.TrajectoryByIndex(i); if (nullptr == trajSdf) { - ignerr << "Null trajectory SDF for [" << _actor.Name() << "]" + gzerr << "Null trajectory SDF for [" << _actor.Name() << "]" << std::endl; continue; } @@ -2517,7 +2517,7 @@ SceneManagerPrivate::LoadTrajectories(const sdf::Actor &_actor, } else { - ignwarn << "Animation has no x displacement. " + gzwarn << "Animation has no x displacement. " << "Ignoring for the animation in '" << animation->Filename() << "'." << std::endl; } diff --git a/src/systems/battery_plugin/LinearBatteryPlugin.cc b/src/systems/battery_plugin/LinearBatteryPlugin.cc index dc1b0ced76..1fe7eba2f1 100644 --- a/src/systems/battery_plugin/LinearBatteryPlugin.cc +++ b/src/systems/battery_plugin/LinearBatteryPlugin.cc @@ -394,7 +394,7 @@ void LinearBatteryPlugin::Configure(const Entity &_entity, std::bind(&LinearBatteryPluginPrivate::OnBatteryStopDrainingMsg, this->dataPtr.get(), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); - ignmsg << "LinearBatteryPlugin subscribes to stop power draining topic [" + gzmsg << "LinearBatteryPlugin subscribes to stop power draining topic [" << topic << "]." << std::endl; sdfElem = sdfElem->GetNextElement("power_draining_topic"); } @@ -498,7 +498,7 @@ void LinearBatteryPlugin::PreUpdate( bool success = this->dataPtr->battery->SetPowerLoad( this->dataPtr->consumerId, total_power_load); if (!success) - ignerr << "Failed to set consumer power load." << std::endl; + gzerr << "Failed to set consumer power load." << std::endl; // Start draining the battery if the robot has started moving if (!this->dataPtr->startDraining) diff --git a/src/systems/environment_preload/EnvironmentPreload.cc b/src/systems/environment_preload/EnvironmentPreload.cc index fe5b57f940..5c678aa2db 100644 --- a/src/systems/environment_preload/EnvironmentPreload.cc +++ b/src/systems/environment_preload/EnvironmentPreload.cc @@ -134,7 +134,7 @@ void EnvironmentPreload::PreUpdate( } else if (unitName != "radians") { - ignerr << "Unrecognized unit " << unitName << "\n"; + gzerr << "Unrecognized unit " << unitName << "\n"; } } } diff --git a/src/systems/hydrodynamics/Hydrodynamics.cc b/src/systems/hydrodynamics/Hydrodynamics.cc index 4158b5059a..8f4260f7e5 100644 --- a/src/systems/hydrodynamics/Hydrodynamics.cc +++ b/src/systems/hydrodynamics/Hydrodynamics.cc @@ -295,7 +295,7 @@ void Hydrodynamics::Configure( { if (_sdf->HasElement("waterDensity")) { - ignwarn << + gzwarn << " parameter is deprecated and will be removed Gazebo G.\n" << "\tPlease update your SDF to use instead."; } @@ -342,7 +342,7 @@ void Hydrodynamics::Configure( if (warnBehaviourChange) { - ignwarn << "You are using parameters that may cause instabilities " + gzwarn << "You are using parameters that may cause instabilities " << "in your simulation. If your simulation crashes we recommend " << "renaming -> and likewise for other axis " << "for more information see:" << std::endl diff --git a/src/systems/thruster/Thruster.cc b/src/systems/thruster/Thruster.cc index b911a5674a..423bf4b925 100644 --- a/src/systems/thruster/Thruster.cc +++ b/src/systems/thruster/Thruster.cc @@ -451,7 +451,7 @@ void Thruster::Configure( { if (!_sdf->HasElement("battery_name")) { - ignerr << "Specified a but missing ." + gzerr << "Specified a but missing ." "Specify a battery name so the power load can be assigned to it." << std::endl; } @@ -586,14 +586,14 @@ void Thruster::PreUpdate( }); if (numBatteriesWithName == 0) { - ignerr << "Can't assign battery consumption to battery: [" + gzerr << "Can't assign battery consumption to battery: [" << this->dataPtr->batteryName << "]. No batteries" "were found with the given name." << std::endl; return; } if (numBatteriesWithName > 1) { - ignerr << "More than one battery found with name: [" + gzerr << "More than one battery found with name: [" << this->dataPtr->batteryName << "]. Please make" "sure battery names are unique within the system." << std::endl; diff --git a/src/systems/triggered_publisher/TriggeredPublisher.cc b/src/systems/triggered_publisher/TriggeredPublisher.cc index bfb258f823..9ed3ec2db8 100644 --- a/src/systems/triggered_publisher/TriggeredPublisher.cc +++ b/src/systems/triggered_publisher/TriggeredPublisher.cc @@ -605,31 +605,31 @@ void TriggeredPublisher::Configure(const Entity &, serviceInfo.srvName = serviceElem->Get("name"); if (serviceInfo.srvName.empty()) { - ignerr << "Service name cannot be empty\n"; + gzerr << "Service name cannot be empty\n"; return; } serviceInfo.reqType = serviceElem->Get("reqType"); if (serviceInfo.reqType.empty()) { - ignerr << "Service request type cannot be empty\n"; + gzerr << "Service request type cannot be empty\n"; return; } serviceInfo.repType = serviceElem->Get("repType"); if (serviceInfo.repType.empty()) { - ignerr << "Service reply type cannot be empty\n"; + gzerr << "Service reply type cannot be empty\n"; return; } serviceInfo.reqMsg = serviceElem->Get("reqMsg"); if (serviceInfo.reqMsg.empty()) { - ignerr << "Service request message cannot be empty\n"; + gzerr << "Service request message cannot be empty\n"; return; } std::string timeoutInfo = serviceElem->Get("timeout"); if (timeoutInfo.empty()) { - ignerr << "Timeout value cannot be empty\n"; + gzerr << "Timeout value cannot be empty\n"; return; } @@ -639,7 +639,7 @@ void TriggeredPublisher::Configure(const Entity &, } if (!sdfClone->HasElement("service") && !sdfClone->HasElement("output")) { - ignerr << "No output and service specified. Make sure to specify at least" + gzerr << "No output and service specified. Make sure to specify at least" "one of them." << std::endl; return; } @@ -715,7 +715,7 @@ void TriggeredPublisher::CallService(std::size_t pendingSrv) auto req = msgs::Factory::New(serviceInfo.reqType, serviceInfo.reqMsg); if (!req) { - ignerr << "Unable to create request for type [" + gzerr << "Unable to create request for type [" << serviceInfo.reqType << "].\n"; return; } @@ -723,7 +723,7 @@ void TriggeredPublisher::CallService(std::size_t pendingSrv) auto rep = msgs::Factory::New(serviceInfo.repType); if (!rep) { - ignerr << "Unable to create response for type [" + gzerr << "Unable to create response for type [" << serviceInfo.repType << "].\n"; return; } @@ -734,16 +734,16 @@ void TriggeredPublisher::CallService(std::size_t pendingSrv) { if (!result) { - ignerr << "Service call [" << serviceInfo.srvName << "] failed\n"; + gzerr << "Service call [" << serviceInfo.srvName << "] failed\n"; } else { - ignmsg << "Service call [" << serviceInfo.srvName << "] succeeded\n"; + gzmsg << "Service call [" << serviceInfo.srvName << "] succeeded\n"; } } else { - ignerr << "Service call [" << serviceInfo.srvName << "] timed out\n"; + gzerr << "Service call [" << serviceInfo.srvName << "] timed out\n"; } } } From 376f3d8637f23fb7e97b1d6760fdcef8e5c8c14b Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Wed, 2 Aug 2023 05:46:34 -0700 Subject: [PATCH 4/7] Harmonic Signed-off-by: Nate Koenig --- CMakeLists.txt | 26 +++++++++++++------------- include/gz/sim/components/Model.hh | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4687d22daa..f75b0d492e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set (GZ_DISTRIBUTION "?") # Find gz-cmake #============================================================================ # If you get an error at this line, you need to install gz-cmake -find_package(gz-cmake4 REQUIRED) +find_package(gz-cmake3 REQUIRED) #============================================================================ # Configure the project @@ -68,13 +68,13 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # as protobuf could be find transitively by any dependency set(protobuf_MODULE_COMPATIBLE TRUE) -gz_find_package(sdformat14 REQUIRED) -set(SDF_VER ${sdformat14_VERSION_MAJOR}) +gz_find_package(sdformat13 REQUIRED) +set(SDF_VER ${sdformat13_VERSION_MAJOR}) #-------------------------------------- # Find gz-plugin -gz_find_package(gz-plugin3 REQUIRED COMPONENTS loader register) -set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR}) +gz_find_package(gz-plugin2 REQUIRED COMPONENTS loader register) +set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR}) #-------------------------------------- # Find gz-transport @@ -89,7 +89,7 @@ set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) #-------------------------------------- # Find gz-common # Always use the profiler component to get the headers, regardless of status. -gz_find_package(gz-common6 +gz_find_package(gz-common5 COMPONENTS profiler events @@ -97,7 +97,7 @@ gz_find_package(gz-common6 io REQUIRED ) -set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR}) +set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) #-------------------------------------- # Find gz-fuel_tools @@ -118,14 +118,14 @@ gz_find_package (Qt5 #-------------------------------------- # Find gz-physics -gz_find_package(gz-physics7 +gz_find_package(gz-physics6 COMPONENTS heightmap mesh sdf REQUIRED ) -set(GZ_PHYSICS_VER ${gz-physics7_VERSION_MAJOR}) +set(GZ_PHYSICS_VER ${gz-physics6_VERSION_MAJOR}) #-------------------------------------- # Find gz-sensors @@ -166,8 +166,8 @@ set(GZ_RENDERING_VER ${gz-rendering8_VERSION_MAJOR}) #-------------------------------------- # Find gz-math -gz_find_package(gz-math8 REQUIRED COMPONENTS eigen3) -set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR}) +gz_find_package(gz-math7 REQUIRED COMPONENTS eigen3) +set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) #-------------------------------------- # Find if gz command is available @@ -183,8 +183,8 @@ set(GZ_TOOLS_VER 2) #-------------------------------------- # 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 protobuf diff --git a/include/gz/sim/components/Model.hh b/include/gz/sim/components/Model.hh index c5d28cbe1b..decd6776ed 100644 --- a/include/gz/sim/components/Model.hh +++ b/include/gz/sim/components/Model.hh @@ -58,7 +58,7 @@ namespace serializers { // Skip serializing models with //pose/@relative_to attribute // since deserialization will fail. This could be a nested model. - // see https://github.com/gazebosim/gz-gazebo/issues/1071 + // see https://github.com/gazebosim/gz-sim/issues/1071 // Once https://github.com/gazebosim/sdformat/issues/820 is // resolved, there should be an API that returns sdf::Errors objects // instead of printing console msgs so it would be easier to ignore From d3b2dd1ac8f5321bb958e3a73e7de18496cbccce Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 10 Aug 2023 05:57:04 -0700 Subject: [PATCH 5/7] Support ignition in sdf and msgs Signed-off-by: Nate Koenig --- src/SystemLoader.cc | 23 +++++++++++++++++++++++ src/systems/log/LogPlayback.cc | 5 ++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/SystemLoader.cc b/src/SystemLoader.cc index a7e58c2fbf..5e422b8412 100644 --- a/src/SystemLoader.cc +++ b/src/SystemLoader.cc @@ -63,7 +63,17 @@ class gz::sim::SystemLoaderPrivate public: bool InstantiateSystemPlugin(const sdf::Plugin &_sdfPlugin, gz::plugin::PluginPtr &_gzPlugin) { + // Deprecated: accept ignition-gazebo-prefixed systems. Remove this on + // gz-sim9 + std::string deprecatedPrefix{"ignition-gazebo"}; auto filename = _sdfPlugin.Filename(); + auto pos = filename.find(deprecatedPrefix); + if (pos != std::string::npos) + { + filename.replace(pos, deprecatedPrefix.size(), "gz-sim"); + gzwarn << "Trying to load deprecated plugin [" << _sdfPlugin.Filename() + << "]. Using [" << filename << "] instead." << std::endl; + } std::list paths = this->PluginPaths(); common::SystemPaths systemPaths; @@ -114,6 +124,19 @@ class gz::sim::SystemLoaderPrivate std::string pluginToInstantiate = _sdfPlugin.Name().empty() ? pluginName : _sdfPlugin.Name(); + // Deprecated: accept ignition plugins. Remove this on gz-sim9 + std::string deprecatedPluginNamePrefix{"ignition::gazebo"}; + pos = pluginToInstantiate.find(deprecatedPluginNamePrefix); + if (pos != std::string::npos) + { + auto origPluginName = pluginToInstantiate; + pluginToInstantiate.replace(pos, deprecatedPluginNamePrefix.size(), + "gz::sim"); + gzwarn << "Trying to load deprecated plugin name [" << origPluginName + << "]. Using [" << pluginToInstantiate << "] instead." + << std::endl; + } + _gzPlugin = this->loader.Instantiate(pluginToInstantiate); if (!_gzPlugin) { diff --git a/src/systems/log/LogPlayback.cc b/src/systems/log/LogPlayback.cc index 8c2c50f773..df759ae79f 100644 --- a/src/systems/log/LogPlayback.cc +++ b/src/systems/log/LogPlayback.cc @@ -510,9 +510,8 @@ void LogPlayback::Update(const UpdateInfo &_info, EntityComponentManager &_ecm) { auto msgType = iter->Type(); - // Support gz.msgs for backwards compatibility, don't remove on tock - // so users can use logs across versions - std::string deprecatedPrefix{"gz.msgs"}; + // Support ignition.msgs for backwards compatibility. Remove on gz-sim9 + std::string deprecatedPrefix{"ignition.msgs"}; auto pos = msgType.find(deprecatedPrefix); if (pos != std::string::npos) { From c92a7e439baa38abd5f934d8d02bb235e564f8b4 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Mon, 28 Aug 2023 21:15:57 +0000 Subject: [PATCH 6/7] Lint and remove deprecation Signed-off-by: Michael Carroll --- src/systems/hydrodynamics/Hydrodynamics.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/systems/hydrodynamics/Hydrodynamics.cc b/src/systems/hydrodynamics/Hydrodynamics.cc index a48d044b06..171ca8f021 100644 --- a/src/systems/hydrodynamics/Hydrodynamics.cc +++ b/src/systems/hydrodynamics/Hydrodynamics.cc @@ -293,16 +293,7 @@ void Hydrodynamics::Configure( gz::sim::EventManager &/*_eventMgr*/ ) { - if (_sdf->HasElement("waterDensity")) - { - gzwarn << - " parameter is deprecated and will be removed in Gazebo G.\n" - << "\tPlease update your SDF to use instead."; - } - - this->dataPtr->waterDensity = SdfParamDouble(_sdf, "waterDensity", - SdfParamDouble(_sdf, "water_density", 998) - ); + this->dataPtr->waterDensity = SdfParamDouble(_sdf, "water_density", 998); // Load stability derivatives // Use SNAME 1950 convention to load the coeffecients. const auto snameConventionVel = "UVWPQR"; From 75c8945adeed39b85f3836f0dde116f9f6056ff1 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 28 Aug 2023 21:20:39 +0000 Subject: [PATCH 7/7] style Signed-off-by: Ian Chen --- src/ServerConfig.cc | 6 ++---- src/gui/plugins/component_inspector/ComponentInspector.cc | 8 ++++---- src/rendering/RenderUtil.cc | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/ServerConfig.cc b/src/ServerConfig.cc index db826bf0fc..b8a33fd965 100644 --- a/src/ServerConfig.cc +++ b/src/ServerConfig.cc @@ -546,8 +546,7 @@ const std::string &ServerConfig::RenderEngineServer() const ///////////////////////////////////////////////// void ServerConfig::SetRenderEngineServer(const std::string &_engine) { - auto engine = _engine; - this->dataPtr->renderEngineServer = engine; + this->dataPtr->renderEngineServer = _engine; } ///////////////////////////////////////////////// @@ -584,8 +583,7 @@ const std::string &ServerConfig::RenderEngineGui() const ///////////////////////////////////////////////// void ServerConfig::SetRenderEngineGui(const std::string &_engine) { - auto engine = _engine; - this->dataPtr->renderEngineGui = engine; + this->dataPtr->renderEngineGui = _engine; } ///////////////////////////////////////////////// diff --git a/src/gui/plugins/component_inspector/ComponentInspector.cc b/src/gui/plugins/component_inspector/ComponentInspector.cc index cdc8c8122b..04d3bb214a 100644 --- a/src/gui/plugins/component_inspector/ComponentInspector.cc +++ b/src/gui/plugins/component_inspector/ComponentInspector.cc @@ -1312,10 +1312,10 @@ void ComponentInspector::OnAddSystem(const QString &_name, if (!this->dataPtr->node.Request(service, req, timeout, res, result)) { gzerr << "Error adding new system to entity: " - << this->dataPtr->entity << "\n" - << "Name: " << name << "\n" - << "Filename: " << filename << "\n" - << "Inner XML: " << innerxml << std::endl; + << this->dataPtr->entity << "\n" + << "Name: " << name << "\n" + << "Filename: " << filename << "\n" + << "Inner XML: " << innerxml << std::endl; } } diff --git a/src/rendering/RenderUtil.cc b/src/rendering/RenderUtil.cc index d2c69babcd..0c833a60ca 100644 --- a/src/rendering/RenderUtil.cc +++ b/src/rendering/RenderUtil.cc @@ -2797,8 +2797,7 @@ void RenderUtil::ShowGrid() ///////////////////////////////////////////////// void RenderUtil::SetEngineName(const std::string &_name) { - auto name = _name; - this->dataPtr->engineName = name; + this->dataPtr->engineName = _name; } /////////////////////////////////////////////////