From 3ed75183c091dd65c1c89bce139435ac25b53cee Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Mon, 3 Jun 2024 05:34:00 -0700 Subject: [PATCH] Fix topic name generation Signed-off-by: Nate Koenig --- .../logical_audio_sensor_plugin/LogicalAudioSensorPlugin.cc | 4 ++-- src/systems/pose_publisher/PosePublisher.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/systems/logical_audio_sensor_plugin/LogicalAudioSensorPlugin.cc b/src/systems/logical_audio_sensor_plugin/LogicalAudioSensorPlugin.cc index fab58be000..c0836401dd 100644 --- a/src/systems/logical_audio_sensor_plugin/LogicalAudioSensorPlugin.cc +++ b/src/systems/logical_audio_sensor_plugin/LogicalAudioSensorPlugin.cc @@ -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 [" @@ -503,7 +503,7 @@ void LogicalAudioSensorPluginPrivate::CreateMicrophone( // create the detection publisher for this microphone auto pub = this->node.Advertise( - topicFromScopedName(entity, _ecm, true) + "/detection"); + topicFromScopedName(entity, _ecm, false) + "/detection"); if (!pub) { gzerr << "Error creating a detection publisher for microphone " diff --git a/src/systems/pose_publisher/PosePublisher.cc b/src/systems/pose_publisher/PosePublisher.cc index d4c9bc0d39..fd167a882e 100644 --- a/src/systems/pose_publisher/PosePublisher.cc +++ b/src/systems/pose_publisher/PosePublisher.cc @@ -250,7 +250,7 @@ void PosePublisher::Configure(const Entity &_entity, this->dataPtr->usePoseV = _sdf->Get("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";