I have a chassis link that has casters. I would like the casters to be grey and the box to be blue. The ROS link
doc mentions <material>
and <color>
tags as being needed for color.
<link name='chassis'>
<pose>0 0 0.1 0 0 0</pose>
<inertial>
<mass value="15.0"/>
<origin xyz="0.0 0 0" rpy=" 0 0 0"/>
<inertia
ixx="0.1" ixy="0" ixz="0"
iyy="0.1" iyz="0"
izz="0.1"
/>
</inertial>
<collision name='chassis_collision'>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<geometry>
<box size=".4 .2 .1"/>
</geometry>
</collision>
<visual name='chassis_visual'>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<geometry>
<box size=".4 .2 .1"/>
</geometry>
<material name="blue">
<color rgba= "0 0 1 1"/>
</material>
</visual>
<collision name='back_caster_collision'>
<origin xyz="-0.15 0 -0.05" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.0499"/>
</geometry>
</collision>
<visual name='back_caster_visual'>
<origin xyz="-0.15 0 -0.05" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.05"/>
</geometry>
<material name="grey">
<color rgba="0.75 0.75 0.75 1"/>
</material>
</visual>
<collision name='front_caster_collision'>
<origin xyz="0.15 0 -0.05" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.0499"/>
</geometry>
</collision>
<visual name='front_caster_visual'>
<origin xyz="0.15 0 -0.05" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.05"/>
</geometry>
<material name="grey">
<color rgba="0.75 0.75 0.75 1"/>
</material>
</visual>
</link>
However, when I roslaunch my_robot world.launch
the bot is the same color, gray. It is only when I add the following that the color changes to blue. What is the purpose of the <color>
tag then?
<gazebo reference="chassis">
<material>Gazebo/Blue</material>
</gazebo>