Color of a link is not taken into account

asked 2019-09-12 03:51:22 -0600

Tobi92 gravatar image

updated 2019-09-12 03:51:46 -0600

I have a urdf model of a rover. In particular, i have the 'chassis' link:

  <link name='chassis_front1'>
    <pose>0 0 0.1 0 0 0</pose>
    <inertial>
      <mass value="10.0"/>
      <origin xyz="0.0 0 0.1" rpy=" 0 0 0"/>
      <inertia
          ixx="0.5" ixy="0" ixz="0"
          iyy="1.0" iyz="0"
          izz="0.1"
      />
    </inertial>

    <collision name='collision_front1'>
      <geometry>
        <box size=".25 .5 .18"/>
      </geometry>
    </collision>

    <visual name='chassis_visual_front1'>
      <origin xyz="0 0 0" rpy=" 0 0 0"/>
      <geometry>
        <box size=".25 .5 .18"/>
      </geometry>
    </visual>
  </link>

In mybot.gazebo, I have:

<?xml version="1.0"?>
<robot>

  <gazebo reference="chassis_front1">
    <material>Gazebo/Red</material>
  </gazebo>
</robot>

But, when I spawn the model, nothing happen. The chassis is still metal grey instead of red. Any ideas?

edit retag flag offensive close merge delete