Adding colors and textures to the Gazebo robot model

We can see in the simulated robot that each link has different colors and textures. The following tags inside the xacro file provide textures and colors to robot links:

  <gazebo reference="bottom_link"> 
    <material>Gazebo/White</material> 
  </gazebo> 
  <gazebo reference="base_link"> 
    <material>Gazebo/White</material> 
  </gazebo> 
  <gazebo reference="shoulder_pan_link"> 
    <material>Gazebo/Red</material> 
  </gazebo> 

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.