[ros-users] [Ros-developers] urdf_parser does not set material for grouped visuals

Victor Savu victor.savu at dfki.de
Thu Jul 21 09:50:04 UTC 2011

Dear all,
I am working on a project which makes extensive use of all of URDF's descriptive
capabilities. I noticed that the urdf::Visual elements stored in the
urdf::Link::visual_groups did not get the urdf::Material object set if it was
defined at top level. After taking a look at the code, I saw that if the call to
urdf::Material::initXML(...) in urdf::Visual::initXML(...) fails, only a warning
is issued. The material for the default visual element is set by
urdf::Parser::init(...) [not a great design if you ask me; as it turns out it is
difficult to maintain...]. This used to work until visual groups came along.
The more robust solution is to have urdf::Material::initXML(...) do the complete
job of resolving the <material> tag (which involved passing a map of the
available top-level defined materials to the method, in case the tag is not
inline defined).
However, that solution would involve major changes (as any change in design).
The less messy solution in this case is just to extend urdf::Parser::init(...)
to set the appropriate materials for the grouped visual elements.
I already know how to fix this and I would be glad to file a bug report & write
a patch, but I don't know how to prepare the patch (something with diff...) and
submit it. I apologize for behaving like a newbie (which I am, in terms of open
source projects), but I really need this feature. Also, if I missed any posting
rules, please be so kind as to point that out.
Victor Savu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110721/61f800c3/attachment-0001.html>
-------------- next part --------------
ros-developers mailing list
ros-developers at code.ros.org

More information about the ros-users mailing list