Upcoming API break in urdfdom

Hi all,

Please bear with me on a long post about urdfdom.

For those who don’t know, GitHub - ros/urdfdom: URDF parser houses the source code that both ROS 1 and ROS 2 use to parse and interact with URDF files.

Since 2012, the code there has had a dependency on TinyXML (the original version). Further, that dependency is exposed via the public API, in the form of a few functions that either consume or produce a TinyXML object.

Unfortunately, TinyXML itself has been deprecated for a long time. So we want to move urdfdom exclusively to TinyXML2, but we have been concerned that doing that would break current users of the urdfdom API.

One thing we could do here would be to have a transition period where we introduced TinyXML2 APIs alongside the existing TinyXML ones. I suggested this earlier this year, and SMillerDev took up the challenge. Unfortunately, the resulting PR is large and we would have to maintain a lot more code.

Instead, we recently took a look at the uses of urdfdom across all packages in Rolling, and we found that there are zero callers of the affected APIs there. That doesn’t mean there are zero callers in the world; we can’t see things that aren’t released publicly. However, the fact that there are no callers in Rolling gives us confidence that there are few callers of these APIs in the world.

Therefore, we are very seriously considering closing the PR adding in TinyXML2 APIs and merging this PR that replaces TinyXML with TinyXML2. That would break the API, but it would be much simpler going forward and we don’t expect too much fallout from it.

This post acts as both a notice that we are going to do this, and as a question: do you depend on the TinyXML APIs from urdfdom? If you do, please respond and let us know how you are using them. If we don’t hear back from users that these APIs are important to them, then we will likely break the API and bump the major number of the urdfdom library.

Please also respond if you have any other questions or concerns about this change. Thank you.

12 Likes

Does this also affect Noetic? If I recall correctly, liburdfdom is distributed via upstream Debian packages which are almost immutable, let alone regarding such a large change. Or did the situation change since the times people had problems with non-English locales in urdfdom?

No, none of the stable distributions (Noetic, Humble, and Iron) would be affected. We would only release this change into Rolling.

1 Like

Initially I thought I was using those APIs - but looking at it - I guess I’m indirectly using TinyXML through urdfdom in robot_calibration (released into Humble, not yet in Iron/Rolling).

I’m not doing a proper find_package() for it, but finding the headers probably through urdfdom exports and then using TinyXML parse function and API to apply the calibration - https://github.com/mikeferguson/robot_calibration/blob/ros2/robot_calibration/src/optimization/offsets.cpp#L225

So yeah, I should probably do a proper CMake thing and also update to TinyXML.

I see, thanks for the feedback.

But yeah, it seems like that is the right fix.

Given that I haven’t heard any other feedback about this, I’m going to go ahead with this merge, API break, and release of version 4.0.0 of urdfdom today. Then we can finally remove TinyXML from ROS 2.

2 Likes

It has been longer than I would have liked, but I just tagged and released version 4.0.0 of urdfdom with the switch to TinyXML2. Thanks to everyone who helped with the release!

5 Likes

Great idea! TinyXML has in the past been a thing bugging me since forever, good to see it being replaced with a maintained version. Progress :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.