diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9fa3ba7da6c..5b9ee7c3920 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,10 +2,11 @@ name: Bug report about: Report a bug labels: bug + --- +https://robotics.stackexchange.com instead.--> ## Environment * OS Version: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 87233a479a5..72ed73ad9a8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,11 +2,12 @@ name: Feature request about: Request a new feature labels: enhancement + --- +https://robotics.stackexchange.com instead.--> ## Desired behavior diff --git a/src/Util_TEST.cc b/src/Util_TEST.cc index 6cc56dbd1b1..b1aca1def78 100644 --- a/src/Util_TEST.cc +++ b/src/Util_TEST.cc @@ -17,6 +17,8 @@ #include #include +#include +sfe #include #include #include diff --git a/src/systems/physics/Physics.cc b/src/systems/physics/Physics.cc index 33e3db42241..060508feb03 100644 --- a/src/systems/physics/Physics.cc +++ b/src/systems/physics/Physics.cc @@ -774,7 +774,7 @@ void Physics::Configure(const Entity &_entity, // 3. Use DART by default if (pluginLib.empty()) { - pluginLib = "gz-physics-dartsim-plugin"; + pluginLib = "gz::physics::dartsim::Plugin"; } // Deprecated: accept ignition-prefixed engines @@ -806,58 +806,10 @@ void Physics::Configure(const Entity &_entity, "include_entity_names", true).first; } - // Find engine shared library - // Look in: - // * Paths from environment variable - // * Engines installed with gz-physics - common::SystemPaths systemPaths; - systemPaths.SetPluginPathEnv(this->dataPtr->pluginPathEnv); - systemPaths.AddPluginPaths(gz::physics::getEngineInstallDir()); - - auto pathToLib = systemPaths.FindSharedLibrary(pluginLib); - if (pathToLib.empty()) - { - // Try deprecated environment variable - // TODO(CH3): Deprecated. Remove on tock. - common::SystemPaths systemPathsDep; - systemPathsDep.SetPluginPathEnv(this->dataPtr->pluginPathEnvDeprecated); - pathToLib = systemPathsDep.FindSharedLibrary(pluginLib); - - if (pathToLib.empty()) - { - gzerr << "Failed to find plugin [" << pluginLib - << "]. Have you checked the " << this->dataPtr->pluginPathEnv - << " environment variable?" << std::endl; - - return; - } - else - { - gzwarn << "Found plugin [" << pluginLib - << "] using deprecated environment variable [" - << this->dataPtr->pluginPathEnvDeprecated << "]. Please use [" - << this->dataPtr->pluginPathEnv << "] instead." << std::endl; - } - } - // Load engine plugin plugin::Loader pluginLoader; - auto plugins = pluginLoader.LoadLib(pathToLib); - if (plugins.empty()) - { - gzerr << "Unable to load the [" << pathToLib << "] library.\n"; - return; - } - auto classNames = pluginLoader.PluginsImplementing< - physics::ForwardStep::Implementation< - physics::FeaturePolicy3d>>(); - if (classNames.empty()) - { - gzerr << "No physics plugins found in library [" << pathToLib << "]." - << std::endl; - return; - } + std::vector classNames = {pluginLib}; // Get the first plugin that works for (auto className : classNames) @@ -866,8 +818,7 @@ void Physics::Configure(const Entity &_entity, if (!plugin) { - gzwarn << "Failed to instantiate [" << className << "] from [" - << pathToLib << "]" << std::endl; + gzwarn << "Failed to instantiate [" << className << "]" << std::endl; continue; } @@ -877,8 +828,7 @@ void Physics::Configure(const Entity &_entity, if (nullptr != this->dataPtr->engine) { - gzdbg << "Loaded [" << className << "] from library [" - << pathToLib << "]" << std::endl; + gzdbg << "Loaded [" << className << "]" << std::endl; break; } @@ -898,9 +848,7 @@ void Physics::Configure(const Entity &_entity, if (nullptr == this->dataPtr->engine) { - gzerr << "Failed to load a valid physics engine from [" << pathToLib - << "]." - << std::endl; + gzerr << "Failed to load a valid physics engine." << std::endl; return; }