Closed diegoferigo closed 7 months ago
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.
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.
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.
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.
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: