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

Make sure pose publisher creates valid pose topics #1433

Merged
merged 3 commits into from
Apr 12, 2022
Merged
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
1 change: 1 addition & 0 deletions src/systems/pose_publisher/PosePublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function might return an empty string. Do you mind to check poseTopic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may be ok here because there is a hardcoded /pose suffix in the topic name in the line above. In any case, I added a check in 488d07b

std::string staticPoseTopic = poseTopic + "_static";

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