-
Notifications
You must be signed in to change notification settings - Fork 277
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
Skip serializing nested model with //pose/@relative_to attribute #1454
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1454 +/- ##
============================================
Coverage 33.58% 33.58%
============================================
Files 44 44
Lines 2260 2260
============================================
Hits 759 759
Misses 1501 1501 Continue to review full report at Codecov.
|
once gazebosim/sdformat#820 is fully resolved, there should be an API that returns |
this was just an FYI, I think this is fine to merge |
Signed-off-by: Ian Chen <[email protected]>
I added this comment to the code as a reminder. 91d77a5 |
Signed-off-by: Ian Chen [email protected]
🦟 Bug fix
Not a bug but suppresses misleading error messages.
Related issue: #1071
Summary
Details are described in #1071. This PR prevents serialization of a model component if it has the
//pose/@relative_to
attribute to avoid flooding the console with error messages when there are multiple models with nested models using this attribute. Since model deserialization with//pose/@relative_to
never worked, this should not affect existing behavior. I believe the model serialization / deserialization functionality is mainly used by the component editor.More info:
Problem is that during ign-gazebo serialization, a nested model is treated as an individual (top level) model (wrapped by
<sdf>
tag) and serialized to string. However, when ign-gazebo tries to deserialize it, sdformat sees it a top level model so the//pose/@relative_to
attribute causesroot.LoadSdfString
to fail. It then produces these error messages:I think sdformat is doing its job correctly when it fails to parse the sdf string. Maybe we need a way for ign-gazebo to tell sdformat to skip this check, or have a better serialization / deserialization method for [nested] models.
I also changed the verbosity level for serialization / serialization issue from error to warning.
See #1071 on how to reproduce the issue.
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.