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

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Apr 8, 2022

Signed-off-by: Ian Chen [email protected]

🦟 Bug fix

Summary

Our model names often have spaces in them. This makes sure the ign topic created by the pose publisher system has valid topics.

to test:

edit pose_publisher.sdf world and change the double_pendulum_with_base model to a name with spaces, e.g. double pendulum with base, install, and launch the world:

ign gazebo -v 4 pose_publisher.sdf`

Before this change, the /model/double_pendulum_with_base/pose topic will not be published

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from chapulina as a code owner April 8, 2022 22:41
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Apr 8, 2022
@@ -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

@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #1433 (7c02004) into ign-gazebo6 (fa2d7cc) will increase coverage by 0.13%.
The diff coverage is 96.64%.

@@               Coverage Diff               @@
##           ign-gazebo6    #1433      +/-   ##
===============================================
+ Coverage        63.36%   63.49%   +0.13%     
===============================================
  Files              306      307       +1     
  Lines            24715    24776      +61     
===============================================
+ Hits             15660    15731      +71     
+ Misses            9055     9045      -10     
Impacted Files Coverage Δ
include/ignition/gazebo/EntityComponentManager.hh 100.00% <ø> (ø)
include/ignition/gazebo/detail/BaseView.hh 100.00% <ø> (ø)
src/BaseView.cc 100.00% <ø> (ø)
src/gui/plugins/spawn/Spawn.cc 10.27% <ø> (+0.46%) ⬆️
...rc/systems/odometry_publisher/OdometryPublisher.hh 100.00% <ø> (ø)
src/systems/pose_publisher/PosePublisher.cc 93.42% <40.00%> (-1.29%) ⬇️
...rc/systems/odometry_publisher/OdometryPublisher.cc 88.37% <95.16%> (+2.31%) ⬆️
...e/ignition/gazebo/detail/EntityComponentManager.hh 93.86% <100.00%> (+0.44%) ⬆️
include/ignition/gazebo/detail/View.hh 100.00% <100.00%> (ø)
src/View.cc 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbc16c6...7c02004. Read the comment docs.

@iche033 iche033 requested a review from ahcorde April 12, 2022 04:19
@chapulina chapulina merged commit e3b5964 into ign-gazebo6 Apr 12, 2022
@chapulina chapulina deleted the pose_publisher_valid_topic branch April 12, 2022 17:34
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-releases-2022-04-27-fortress-citadel/1389/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants