Closed stephane-caron closed 2 years ago
Oh, that's great, thanks! What do you think is missing to make this a non-draft PR?
Well I hacked the call to apply_visual_color(geom, v)
at the first spot I found where it worked, so first I wanted your feedback on whether it makes sense within the overall code :smiley:
There are three aspects to materials from the URDF reference that a visualizer would eventually need to handle: color, texture and named material.
If it makes sense, we could go for it this way:
Robot
and _parse_robot
)And https://github.com/clemense/yourdfpy/pull/15 adds support for named materials, so now the Upkie model renders as:
Moving the remaining point on textures to https://github.com/clemense/yourdfpy/issues/16 so that we can let the PR close this issue.
If I understand correctly, visual materials are currently read and written but not rendered. Loading e.g. the Upkie URDF we get the dark "ninja" version:
Trimesh can render materials so getting them to yourdfpy is a matter of plugging the right info. Here is for instance a draft PR to do so (opening the issue here to keep track):
Is there an interest to render colors (eventually materials) in yourdfpy?