Dear all,
following the 2012-06-12 urdf review, I wrote an XML schema to
validate URDF files
and provide a formal specification for URDF.
It is now available inside the urdf_validator package here:
http://github.com/laas/urdf_validator
In particular, the XML schema is at the following location:
https://raw.github.com/laas/urdf_validator/master/urdf.xsd
...and using xmllint, one can validate a URDF file using:
rosrun urdf_validator validate /path/to/urdf/file.urdf
I validated the schema using PR2, Nao and Romeo robots.
To make a model uses this schema, a slight change is required in the robot XML
file. The root element must be:
<robot
xmlns="http://www.ros.org/wiki/urdf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://raw.github.com/laas/urdf_validator/master file:urdf.xsd"
name="ROBOT NAME">
See, for instance:
https://raw.github.com/laas/urdf_test_suite/master/one_dof_revolute_x.urdf
The ambiguity of the description provided by the wiki is documented in
the XML schema
as FIXME:. I also added undocumented URDF tags which are required so
that the current PR2
URDF file is considered valid.
Best,
PS: this package will be added to the wiki with the next succesful
indexing of the laas-ros-pkg
repository.
--
Thomas Moulard