-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of colors when exporting to URDF geometries with material element #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just for completeness: it is probably not worth it, but a way to fully support all SDF materials in URDF is to generate new meshes on the fly in Collada and/or obj format, encode the material information there, and use those material-aware meshes in URDF instead of the meshes used by SDF. |
I never saw this done elsewhere, interesting approach! It seems quite convoluted to do by hand, but doable in code and a good candidate in rod. If someone needs full color support, this could be a great workaround to the feature disparity between URDF and SDF. |
Yes, due to technical difficulties in handing mesh files users and libraries tend to think of meshes as "black box" that can't be modified, while effectively they are part of robots description exactly as the URDF and SDF files. |
We use the
//visual/material/diffuse
SDF element and convert it into thevisual/material/color@rgba
URDF attribute.Note that other material properties of SDF are ignored. We cannot work around it since the material properties of URDF are more limited than those of SDF.
Additional information on SDF materials: