Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing ignition #2055

Merged
merged 11 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if [ $# -eq 0 ]
then
echo "Usage: $0 <Gazebo meta-package name> <dockerfile>"
echo "Example: $0 ignition-blueprint ./Dockerfile.gz"
echo "Example: $0 gz-garden ./Dockerfile.gz"
exit 1
fi

Expand Down
82 changes: 0 additions & 82 deletions examples/worlds/deprecated_ignition.sdf

This file was deleted.

4 changes: 2 additions & 2 deletions include/gz/sim/ServerConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/gz/sim/System.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/gz/sim/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions include/gz/sim/components/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 0 additions & 18 deletions src/ServerConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ServerPrivate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
21 changes: 0 additions & 21 deletions src/SystemLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> paths = this->PluginPaths();
common::SystemPaths systemPaths;
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Util_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/plugins/banana_for_scale/BananaForScale.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/plugins/component_inspector/ComponentInspector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 6 additions & 11 deletions src/gui/plugins/resource_spawner/ResourceSpawner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
9 changes: 0 additions & 9 deletions src/rendering/RenderUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/systems/air_speed/AirSpeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion src/systems/hydrodynamics/Hydrodynamics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void Hydrodynamics::Configure(
if (_sdf->HasElement("waterDensity"))
{
ignwarn <<
"<waterDensity> parameter is deprecated and will be removed Ignition G.\n"
"<waterDensity> parameter is deprecated and will be removed Gazebo G.\n"
<< "\tPlease update your SDF to use <water_density> instead.";
}

Expand Down
3 changes: 0 additions & 3 deletions src/systems/lens_flare/LensFlare.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 2 additions & 2 deletions src/systems/log/LogPlayback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 0 additions & 10 deletions src/systems/physics/Physics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/systems/triggered_publisher/TriggeredPublisher.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions test/integration/battery_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -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),
Expand Down
Loading