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

Return only unique message types in MessageFactory::Types function #472

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 11, 2024

🦟 Bug fix

Fixes #470

Summary

The MessageFactory::Type function returns duplicate message types. This is because the list of known message types overlaps with types loaded from descriptor files so the function essentially return two of the same message types. This PR uses a set to filter out duplicates. A potential todo is to return an set instead of a vector.

I also removed an extra duplicate check in the New function (probably leftover from ign -> gz migration)

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: Ian Chen <[email protected]>
@iche033 iche033 requested a review from caguero as a code owner October 11, 2024 01:29
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Oct 11, 2024
@VincidaB
Copy link

Still getting ERROR Error: duplicate name 'Distortion' in Namespace .gz.msgs on the web visualization.

Signed-off-by: Ian Chen <[email protected]>
@iche033
Copy link
Contributor Author

iche033 commented Oct 11, 2024

Still getting ERROR Error: duplicate name 'Distortion' in Namespace .gz.msgs on the web visualization.

addressed on the gz-launch websocket server side: gazebosim/gz-launch#281

@arilow
Copy link

arilow commented Oct 29, 2024

Hi @caguero! Is there anything required to merge this change? Our team is looking forward to being able to use GZweb with Harmonic and this seems the last change required to do that.

@caguero caguero merged commit 96004b0 into gz-msgs10 Oct 29, 2024
11 checks passed
@caguero caguero deleted the duplicate_msg_types branch October 29, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants