-
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
Migrate to using TinyXML2 #264
Conversation
a200269
to
3829a40
Compare
there are some conflicts here, partially due to deprecation of the API's in parser_urdf.hh in the following bitbucket PR: @azeey, we marked it as deprecated as of 9.2, and I think we are planning to remove it in 10.0? let's make a separate PR to move that header file from |
PR to not install parser_urdf.hh: #276 |
I just merged #276, which makes |
@mjcarroll Do you know if you need a stable release for Ignition Dome ( Asking in the context of #278, whether we should target |
@EricCousineau-TRI I would like to target |
OK, thanks! |
do you mind rebasing on top of |
Done! Thanks for getting that set up. |
this PR is huge, but I'm not sure if there's a way to split up the changes. once you start parsing with tinyxml2, all the functions are going to need to read those data structures |
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'd like to see unit tests for XmlUtils
One thing to reduce the size could be to do the conversion, and then the removal of the vendored TinyXML in a followup PR |
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.
Looks good on first pass. I'll look into failing tests.
8086293
to
a6c4612
Compare
@scpeters How do I go about updating |
Codecov Report
@@ Coverage Diff @@
## sdf10 #264 +/- ##
==========================================
- Coverage 87.69% 87.50% -0.20%
==========================================
Files 59 60 +1
Lines 9048 9085 +37
==========================================
+ Hits 7935 7950 +15
- Misses 1113 1135 +22
Continue to review full report at Codecov.
|
It appears that the example is failing due to a trailing quote in the Is this intentional, or is it that TinyXML2 happens to be a bit more strict? |
the logic for the ubuntu build is in release-tools: for homebrew, we'll need a new formula with different dependencies; I'll work on that |
|
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
@osrf-jenkins run tests please |
the build farm is backed up, but I expect it to pass, so I'll approve let's wait to merge until the last job finishes |
Signed-off-by: Addisu Z. Taddese <[email protected]>
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.
LGTM!
ok, it looks it just needs an update to the migration guide and changelog, and then we can squash and merge @mjcarroll do you want me to update these? |
Signed-off-by: Steve Peters <[email protected]>
updated in 7155942 |
* Remove vendored TinyXML * Add FindTinyXML2 CMake Logic * Add XmlUtils with test * Update CI dependencies * Allow trim to remove newlines as well * Remove trailing quote in example sdf * Make internal URDF parser use tinyxml2 Signed-off-by: Michael Carroll <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
This has changed recently: gazebosim/sdformat#264
updating dependency in release repo: gazebo-release/sdformat10-release#1 |
* Remove vendored TinyXML * Add FindTinyXML2 CMake Logic * Add XmlUtils with test * Update CI dependencies * Allow trim to remove newlines as well * Remove trailing quote in example sdf * Make internal URDF parser use tinyxml2 Signed-off-by: Michael Carroll <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
There is special handling in the parser_urdf code to update plugin fields when links are merged together during fixed joint reduction. A test for this was added to sdf6 in #500. A portion of this test is applied directly to the sdf10 branch to illustrate a problem with ReduceSDFExtensionPluginFrameReplace in parser_urdf.cc. The original migration to use tinyxml2 in #264 changed the data structure used in SDFExtension to store XMLDocuments instead of XMLPointers, which requires an extra call to FirstChildElement, but the ReduceSDFExtension*FrameReplace functions did not receive this update. The fix here refactors the function arguments to pass the first child element directly, which simplifies the helper function implementation. Signed-off-by: Steve Peters <[email protected]>
This is the forward port of #241 for the current master branch
sdf10
.