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

Camera: fix default trigger topic #1006

Merged
merged 5 commits into from
May 12, 2022

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented May 1, 2022

🦟 Bug fix

Fixes default trigger topic when unset

Summary

In gazebosim/gz-sensors#215 (comment) I noticed that if the trigger topic name is not explicitly set in SDFormat that ign-sensors uses __default__/trigger as the default trigger topic name. I believe this is due to the way the DOM object is loaded, so I have adjusted it in 361fa6a to only read the value of the trigger_topic element if that element exists. Thus it will return an empty string "" if no trigger topic is specified, leaving the default behavior up to the downstream library (ign-sensors in the case I noticed).

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Otherwise it has a value of __default__/trigger

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters requested a review from azeey as a code owner May 1, 2022 05:32
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label May 1, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 1, 2022

Codecov Report

Merging #1006 (fabc21b) into sdf12 (6424ffa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            sdf12    #1006   +/-   ##
=======================================
  Coverage   65.38%   65.38%           
=======================================
  Files           2        2           
  Lines          26       26           
=======================================
  Hits           17       17           
  Misses          9        9           

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 6424ffa...fabc21b. Read the comment docs.

src/Camera.cc Outdated Show resolved Hide resolved
Then we don't need to check HasElement before getting its value.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #1006 (bc834eb) into sdf12 (a50ba52) will not change coverage.
The diff coverage is n/a.

❗ Current head bc834eb differs from pull request most recent head 2678029. Consider uploading reports for the commit 2678029 to get more accurate results

@@           Coverage Diff           @@
##            sdf12    #1006   +/-   ##
=======================================
  Coverage   65.38%   65.38%           
=======================================
  Files           2        2           
  Lines          26       26           
=======================================
  Hits           17       17           
  Misses          9        9           

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 a50ba52...2678029. Read the comment docs.

@chapulina chapulina merged commit 85e1a9b into gazebosim:sdf12 May 12, 2022
@scpeters scpeters deleted the fix_trigger_topic branch May 12, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants