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

Real transition to TinyXML2? #24

Closed
rhaschke opened this issue Dec 10, 2018 · 8 comments
Closed

Real transition to TinyXML2? #24

rhaschke opened this issue Dec 10, 2018 · 8 comments
Assignees

Comments

@rhaschke
Copy link
Contributor

I don't really understand #9, attempting to transition to TinyXML2.
Passing in a TinyXML document or element (version 1 or 2 doesn't matter) actually serializes into a string and calls initString(), which eventually parses the XML string again in parseURDF. However, urdfdom's transition to TinyXML2 is still pending: ros/urdfdom#99.

While the parsing from string is mandatory to allow for the Collada parser plugin, I don't really see why we should support the highly inefficient initXml() convenience methods at all in the future?
Why not simply discourage their usage, i.e. deprecate them, and eventually remove them in future?

@clalancette
Copy link
Collaborator

I did a pretty extensive review of the use of the urdf APIs when coming up with #9. From what I saw, the majority of downstream users use initString(), despite the inefficiencies. So while I agree that it would be nice to deprecate it and use the more efficient versions that take the tinyxml{2} pointers, it was hard to justify. We would just be littering string -> tinyxml2 code through all downstream consumers, rather than centralizing it here.

@rhaschke
Copy link
Contributor Author

From what I saw, the majority of downstream users use initString(), despite the inefficiencies.
... it would be nice to use the more efficient versions that take the tinyxml{2} pointers ...

Looks like you missed my point: The API has to use initString() instead of initXml(), because the actual parser needs to handle both Collada and URDF. initXml() is the inefficient API version!
Hence, my proposal was to remove TinyXML support (and not initString()).

@clalancette
Copy link
Collaborator

Looks like you missed my point: The API has to use initString() instead of initXml(), because the actual parser needs to handle both Collada and URDF. initXml() is the inefficient API version!
Hence, my proposal was to remove TinyXML support (and not initString()).

I see, I read it backwards. Sorry about that. Yeah, I could definitely get behind that proposal; deprecating the current initXml APIs (including the new TinyXML2 ones), and then eventually transitioning to only the initString ones. @sloretz , thoughts?

@rhaschke
Copy link
Contributor Author

rhaschke commented Feb 8, 2019

@sloretz Ping.

@rhaschke
Copy link
Contributor Author

@sloretz, @clalancette: Unfortunately, we missed to cleanup the API of urdf and urdfdom and ultimately switch to TinyXML2 in Noetic. What are your plans regarding this?

@clalancette
Copy link
Collaborator

@sloretz, @clalancette: Unfortunately, we missed to cleanup the API of urdf and urdfdom and ultimately switch to TinyXML2 in Noetic. What are your plans regarding this?

In short: remove tinyxml from https://github.com/ros2/urdf and https://github.com/ros2/urdfdom. It was already done for the former in ros2#17 , and we'll need to go through a deprecation/removal tick-tok cycle for the latter.

@rhaschke
Copy link
Contributor Author

rhaschke commented Sep 24, 2020

Ok. So we should close this PR, right?

@clalancette
Copy link
Collaborator

Ok. So we should close this PR, right?

Yeah, that would be my preference. Since we don't have another ROS 1 vehicle to deliver this, I don't see much of a way forward here. I'm going to close this out, thanks for working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants