-
Notifications
You must be signed in to change notification settings - Fork 100
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 parsing 'type' attibutes in plugins #809
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@@ -186,7 +186,7 @@ TEST(DOMPlugin, LoadWithChildren) | |||
std::string pluginStr = R"(<plugin name='3D View' filename='MinimalScene'> | |||
<ignition-gui> | |||
<title>3D View</title> | |||
<property type='bool' key='showTitleBar'>false</property> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is related to unrecognized type
values, like ignition.msgs.Boolean
in triggered_publisher.sdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just fixing the test failure. With my change, the parser is now converting false
into 0
.
I haven't touched the parser much before, so I'd appreciate some guidance on the proper fix. My assumption from #689 is that we only want to parse the /pose@type
attributes here, but don't affect the rest, that's why I added the extra check for "pose"
with a TODO to remove the special type handling from that function to a pose-specific function. But I suspect I may be missing some important detail.
Codecov Report
@@ Coverage Diff @@
## sdf12 #809 +/- ##
==========================================
- Coverage 90.70% 90.70% -0.01%
==========================================
Files 78 78
Lines 12437 12432 -5
==========================================
- Hits 11281 11276 -5
Misses 1156 1156
Continue to review full report at Codecov.
|
All tests are passing here, so I'm opening this for review. I updated the PR description with more context. |
|
Signed-off-by: Steve Peters <[email protected]>
I've added a line in 5fc1571 that reproduces the failure seen in ign-gazebo, caused by an unrecognized |
I'd like to see what @aaronchongth thinks about this change |
It failed similar to the other line:
My intention here is to revert the regression without reverting #689 completely. I don't think this is the final fix, and I hope the original authors come back with a cleaner fix later. I'd just like to fix the broken use cases on Are you concerned we may be breaking something else with this, @scpeters ? |
Hi @chapulina, @scpeters! Thanks for raising this so quickly. My bad for assuming that all the types will still be consistent with what The changes to I have a fix ready #811, let me know what you think. I haven't managed to run this fix against |
* Reverted changes to parser for custom element with attribute 'type', added fix in ParamPrivate::ValueFromStringImpl instead Signed-off-by: Aaron Chong <[email protected]>
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1 |
🦟 Bug fix
Summary
The logic added to check for the
type
attribute has broken use-cases insideign-gazebo
, such as this:Which now causes an assertion:
My assumption from #689 is that we only want to parse the
/pose@type
attributes here, but don't affect the rest, so I added the extra check for "pose". I left a TODO there because I think we should remove the special type handling from that function to a pose-specific function.I suspect I may be missing some important detail, but tests pass. So I hope this is enough as a band-aid to fix the regression, and I'd like to check with @aaronchongth and @azeey when they're back on making a proper fix.
Checklist
codecheck
passed (See contributing)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.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸