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

Fix running plugins with bad world name #107

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Conversation

chapulina
Copy link
Contributor

An unforeseen consequence of #104 + gazebosim/gz-sim#278 is that users who already had old ~/.ignition/gazebo/gui.config files wouldn't be able to load the worlds that now have no <gui> element, because of the topic mismatch.

So this PR adds a check and ignores topics and services that are explicitly defined, but don't match worldName.

For example, when the user has <topic>/world/default/stats</topic> on their gui.config, and tries to load shapes.sdf, we load the plugin with the correct /world/shapes/stats topic, and print a warning.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina added the bug Something isn't working label Aug 17, 2020
@github-actions github-actions bot added the 📜 blueprint Ignition Blueprint label Aug 17, 2020
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #107 into ign-gui2 will increase coverage by 0.45%.
The diff coverage is 77.77%.

Impacted file tree graph

@@             Coverage Diff              @@
##           ign-gui2     #107      +/-   ##
============================================
+ Coverage     60.43%   60.88%   +0.45%     
============================================
  Files            16       16              
  Lines          2108     2135      +27     
============================================
+ Hits           1274     1300      +26     
- Misses          834      835       +1     
Impacted Files Coverage Δ
src/plugins/world_control/WorldControl.cc 79.13% <66.66%> (+0.77%) ⬆️
src/plugins/world_stats/WorldStats.cc 97.14% <100.00%> (+2.35%) ⬆️

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 22b18c1...4359271. Read the comment docs.

Copy link

@JShep1 JShep1 left a comment

Choose a reason for hiding this comment

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

LGMT with tests passing, thanks for the hot fix!

@chapulina chapulina merged commit 42480e9 into ign-gui2 Aug 18, 2020
@chapulina chapulina deleted the chapulina/fix_worldname branch August 18, 2020 03:11
@chapulina chapulina mentioned this pull request Aug 18, 2020
nkoenig pushed a commit that referenced this pull request Aug 19, 2020
Signed-off-by: Nate Koenig <nate@openrobotics.org>
nkoenig added a commit that referenced this pull request Aug 19, 2020
Revert pull request #107 due to breaking changes in Blueprint
chapulina added a commit that referenced this pull request Aug 19, 2020
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 blueprint Ignition Blueprint bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants