RobotLocomotion / models

Shareable model files (urdf/sdf + meshes, etc) for our robotics projects
27 stars 23 forks source link

[iiwa_description] iiwa7 link colors should match the physical robot #65

Open nepfaff opened 5 months ago

nepfaff commented 5 months ago

I noticed that the iiwa description GLTF files don't match the appearance of the real robots. I don't think this was the case for the old OBJ models (I might misremember). I attached a meshcat screenshot of iiwa_description/sdf/iiwa7_no_collision.sdf and a real image. The real photo has bad lighting, but the obvious color differences are visible (some links are orange but should be gray). I can take a better photo if desirable. Screenshot from 2024-04-19 10-01-02 thumbnail_IMG_6506

jwnimmer-tri commented 5 months ago

\CC @siddancha FYI related to #36.

nepfaff commented 5 months ago

Looking at https://github.com/RobotLocomotion/models/pull/36, it seems to have improved the iiwa14 visuals and made the iiwa7 visuals worse (iiwa14 contains gray and orange files, while iiwa7 does not).

The new iiwa14 visuals look amazing. It would be great to have the same for the iiwa7.

jwnimmer-tri commented 5 months ago

Aha, I see now, I didn't read the post carefully enough the first time.

This might be easy to fix if you want to give it a try. Inside the iiwa7 gltf files there is a "materials" section that governs the color. I suspect some materials just got copy-pasted into the wrong places during the conversion cleanups.

siddancha commented 5 months ago

To start with, I did not change the colors of iiwa7. Here's the result of

bazel run //tools:model_visualizer -- --show_rgbd_sensor package://drake/manipulation/models/iiwa_description/iiwa7/iiwa7_no_collision.sdf

when run on Drake v1.27.0:

So #36 did not introduce a regression.

But the issue @nepfaff pointed is deeper. It is currently impossible to correctly match the colors of the current iiwa7 meshes with that of the real robot. That's because the current iiwa7 meshes are not sufficiently sub-divided. Here's "link_2" of iiwa7:

This contains two pieces which are colored differently on the real IIWA. So we're forced to use the same color for both pieces: either both grey or both orange. Somebody made a choice to use "both orange" and I stuck with that.

This is not an issue with iiwa14. The iiwa14 uses separate meshes for each piece. Here's iiwa14's "link_2_grey":

and iiwa14s "link_2_orange":

jwnimmer-tri commented 5 months ago

All good points, thanks!

I guess for someone to fix this they'll need to either split up the meshes, or use a bi-color texture image instead of uniform materials.

nepfaff commented 5 months ago

Thanks for showing that visualization! I did misremember then. Sorry for that!

siddancha commented 5 months ago

@nepfaff No worries! The color mismatch is still an outstanding issue. Another discrepancy is that the "KUKA" bands are missing on Drake's iiwa7.

I found official URDFs/meshes here but they don't seem very helpful. Somebody (a Drake dev?) seems to have designed more visually accurate meshes for iiwa14 but not for iiwa7.

jwnimmer-tri commented 5 months ago

I think the iiwa14 polishing was https://github.com/RobotLocomotion/drake/pull/9300 by @SeanCurtis-TRI, way back in 2018.