Skip to content

Commit

Permalink
Make sure pose publisher creates valid pose topics (#1433)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
iche033 authored Apr 12, 2022
1 parent a5abbb5 commit e3b5964
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/systems/pose_publisher/PosePublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ void PosePublisher::Configure(const Entity &_entity,
_sdf->Get<bool>("use_pose_vector_msg", this->dataPtr->usePoseV).first;

std::string poseTopic = scopedName(_entity, _ecm) + "/pose";
poseTopic = transport::TopicUtils::AsValidTopic(poseTopic);
if (poseTopic.empty())
{
poseTopic = "/pose";
ignerr << "Empty pose topic generated for pose_publisher system. "
<< "Setting to " << poseTopic << std::endl;
}
std::string staticPoseTopic = poseTopic + "_static";

if (this->dataPtr->usePoseV)
Expand Down

0 comments on commit e3b5964

Please sign in to comment.