Color issue with URDF and multiple visual tags
I am trying to build a URDF model that comprises different components with different colors. However, I don't necessarily want every component to be its own link; I'm just aiming for a higher level of visual fidelity. I saw here that it's possible to have multiple <visual>
tags within a given <link>
:
http://answers.ros.org/question/10913...
...and indeed, this works. However, subsequent <visual>
tags appear to have their <material> tags ignored, and instead get painted the color of the first <visual>
tag. In other words, if I do this:
<link name="link1">
<visual>
<geometry>
<cylinder length="4" radius="1"/>
</geometry>
<material name="black_metal">
<color rgba="0.1 0.1 0.1 1"/>
</material>
</visual>
<visual>
<geometry>
<cylinder length="2" radius="5"/>
</geometry>
<material name="gold">
<color rgba="1 0.549 0 1"/>
</material>
</visual>
</link>
...then BOTH my cylinders end up getting colored as the "black_metal" material. Is this a bug, or am I simply using URDF in a manner which was not intended?
EDIT: I'm using Hydro.