In this section we will learn how to add colors to the robot in Gazebo.
mobile_base_gazebo.xacro
my_robot.urdf.xacro<?xml version="1.0"?>
<robot name="my_robot" xmlns:xacro="<http://www.ros.org/wiki/xacro>">
<xacro:include filename="common_properties.xacro" />
<xacro:include filename="mobile_base.xacro" />
<xacro:include filename="mobile_base_gazebo.xacro" />
</robot>
mobile_base_gazebo.xacro to Add Colors<?xml version="1.0"?>
<robot xmlns:xacro="<http://www.ros.org/wiki/xacro>">
<gazebo reference="base_link">
<material>Gazebo/Blue</material>
</gazebo>
<gazebo reference="right_wheel_link">
<material>Gazebo/Grey</material>
</gazebo>
<gazebo reference="left_wheel_link">
<material>Gazebo/Grey</material>
</gazebo>
<gazebo reference="caster_wheel_link">
<material>Gazebo/Grey</material>
</gazebo>
</robot>