Colours in Gazebo 5 are always shown white
Hi everybody,
It's the simplest problem I've faced, but I'm not able to solve it. I'm working with an urdf file with Gazebo 5. The problem is that in Gazebo the colours doesn't appear as I want, they always appear white:
However, adding a model from the gazebo database works right and the colors are shown properly. I think the problem is in the urdf file, but I don't know where the mistake is. When I was working with Gazebo 2 the colors from worked propely but when I moved to Gazebo 5 they don't work.
Thanks!!
Asked by ROS_GAZEBO_USER on 2016-02-25 08:24:12 UTC
Answers
Gazebo is using it's own materials to display the appearance of the links. You need to add a gazebo-specific material
tag to each one of your links:
<gazebo reference="imu_link">
<material>Gazebo/Red</material>
</gazebo>
Here in reference
gives the name of your link.
You can find the available materials in your gazebo installation: gazebo/media/materials/scripts/gazebo.material
IMPORTANT: I've found out that the material
tag should go exactly like this, without any extra spaces around the Gazebo/Red
string. Otherwise it is just silently ignored and your link is appearing white..
Asked by ZhekaS on 2016-05-30 08:22:32 UTC
Comments
I have this problem too. To have colour on my link, I use dae meshes which contain the texture.
Asked by Brosseau.F on 2016-02-26 02:38:36 UTC
I have the same problem. But it looks like not all of the colors from the standard models are shown as well. Have you managed to solve this problem?
Asked by ZhekaS on 2016-05-28 22:49:02 UTC
Having the same issue. I filed a bug report because it seems like no one has solved it...
https://bitbucket.org/osrf/sdformat/issues/132/parser-does-not-handle-urdf-material
Asked by plusk01 on 2017-01-05 01:32:06 UTC