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

Revert behavior change introduced in #2452 #2527

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 10 additions & 14 deletions src/SdfEntityCreator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ void SdfEntityCreator::CreateEntities(const sdf::World *_world,
components::SphericalCoordinates(*_world->SphericalCoordinates()));
}

this->dataPtr->eventManager->Emit<events::LoadSdfPlugins>(_worldEntity,
_world->Plugins());

GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION
this->dataPtr->eventManager->Emit<events::LoadPlugins>(_worldEntity,
_world->ToElement());
GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION

// Models
for (uint64_t modelIndex = 0; modelIndex < _world->ModelCount();
++modelIndex)
Expand All @@ -337,7 +345,7 @@ void SdfEntityCreator::CreateEntities(const sdf::World *_world,
levelEntityNames.find(model->Name()) != levelEntityNames.end())

{
Entity modelEntity = this->CreateEntities(model, false);
Entity modelEntity = this->CreateEntities(model);

this->SetParent(modelEntity, _worldEntity);
}
Expand Down Expand Up @@ -387,7 +395,7 @@ void SdfEntityCreator::CreateEntities(const sdf::World *_world,
if (_world->ModelNameExists(_ref->Data()))
{
const sdf::Model *model = _world->ModelByName(_ref->Data());
Entity modelEntity = this->CreateEntities(model, false);
Entity modelEntity = this->CreateEntities(model);
this->SetParent(modelEntity, _worldEntity);
this->SetParent(_entity, modelEntity);
}
Expand Down Expand Up @@ -449,18 +457,6 @@ void SdfEntityCreator::CreateEntities(const sdf::World *_world,
// Store the world's SDF DOM to be used when saving the world to file
this->dataPtr->ecm->CreateComponent(
_worldEntity, components::WorldSdf(*_world));

// Load world plugins first.
this->dataPtr->eventManager->Emit<events::LoadSdfPlugins>(_worldEntity,
_world->Plugins());

GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION
this->dataPtr->eventManager->Emit<events::LoadPlugins>(_worldEntity,
_world->ToElement());
GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION

// Load model plugins after the world plugin.
this->LoadModelPlugins();
}

//////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ void LogicalAudioSensorPluginPrivate::CreateAudioSource(
};

// create services for this source
const auto validName = topicFromScopedName(entity, _ecm, true);
const auto validName = topicFromScopedName(entity, _ecm, false);
if (validName.empty())
{
gzerr << "Failed to create valid topics with entity scoped name ["
Expand Down Expand Up @@ -503,7 +503,7 @@ void LogicalAudioSensorPluginPrivate::CreateMicrophone(

// create the detection publisher for this microphone
auto pub = this->node.Advertise<msgs::Double>(
topicFromScopedName(entity, _ecm, true) + "/detection");
topicFromScopedName(entity, _ecm, false) + "/detection");
if (!pub)
{
gzerr << "Error creating a detection publisher for microphone "
Expand Down
2 changes: 1 addition & 1 deletion src/systems/pose_publisher/PosePublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void PosePublisher::Configure(const Entity &_entity,
this->dataPtr->usePoseV =
_sdf->Get<bool>("use_pose_vector_msg", this->dataPtr->usePoseV).first;

std::string poseTopic = topicFromScopedName(_entity, _ecm, true) + "/pose";
std::string poseTopic = topicFromScopedName(_entity, _ecm, false) + "/pose";
if (poseTopic.empty())
{
poseTopic = "/pose";
Expand Down
Loading