Re: [ros-users] Contact point definition in URDF format

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: wim
CC: Florent Lamiraux, Antonio El Khoury, User discussions
Subject: Re: [ros-users] Contact point definition in URDF format
On Mon, Mar 5, 2012 at 7:27 PM, Wim Meeussen <> 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:
http://www.ros.org/wiki/robot_contact_point

> 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
know.


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