[ros-users] Contact point definition in URDF format

Thomas Moulard thomas.moulard at gmail.com
Wed Mar 14 09:03:41 UTC 2012

On Mon, Mar 5, 2012 at 7:27 PM, Wim Meeussen <meeussen at willowgarage.com> wrote:
> Even with the same root element, it is perfectly fine to have both
> descriptions in the same file. As long as both descriptions don't have
> conflicting elements or attributes.  For the humanoid description, you
> could choose to use the same root element, or create a new root
> element, whichever sounds best to you.

Ok, I followed your advice, and the implementation is available here:

> We're trying to keep the different descriptions separated both at the
> level of the xml specification, and at the level of the DOM.  So I
> think a plugin mechanism would not be very helpful in the end.   In
> the hypothetical situation where the xml and DOM would be unified,
> then a plugin mechanism would be useful as an implementation mechanism
> to separately maintain and release different parts of the parsers. But
> I think there's no real benefit in the current situation.

Hum, I see. For me, this is more a matter of being able to merge
safely the files.
The current approach is flexible, which is good, but also quite
dangerous as several
XML specifications may have conflicting tags for instance.
Errors such as typo also cannot be detected when the parser discards
the tag it does not

A solution would be to use XML namespace + DTD/XML Scheme validation.
I have seen this kind of information in the PR2 URDF model, but AFAIK
they are not used currently (?).
Anyway I am pretty sure that TinyXML cannot validate documents, so it
would require a switch to a bigger XML library...
Thomas Moulard

More information about the ros-users mailing list