Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comment here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo!

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comment comments here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo!

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comments here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo!gazebo! because i use standalone version of gazebo, i use SDF, for Example SDF file of Cube20k is:

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comments here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo! because i use standalone version of gazebo, i use SDF, for Example SDF file of Cube20k is:

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

i got this error when i added the material tag to SDF file:

XML Element[material], child of element[mesh] not defined in SDF. Ignoring.[mesh]
Error [parser.cc:710] Error reading element <mesh>
Error [parser.cc:710] Error reading element <geometry>
Error [parser.cc:710] Error reading element <collision>
Error [parser.cc:710] Error reading element <link>
Error [parser.cc:710] Error reading element <model>
Error [parser.cc:369] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 61 in /tmp/buildd/ros-fuerte-urdfdom-0.2.3-3precise-20130312-1505/urdf_parser/src/model.cpp

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comments here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo! because i use standalone version of gazebo, i use SDF, for Example SDF file of Cube20k is:

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

i got this error when i added the material tag to SDF file:

XML Element[material], child of element[mesh] not defined in SDF. Ignoring.[mesh]
Error [parser.cc:710] Error reading element <mesh>
Error [parser.cc:710] Error reading element <geometry>
Error [parser.cc:710] Error reading element <collision>
Error [parser.cc:710] Error reading element <link>
Error [parser.cc:710] Error reading element <model>
Error [parser.cc:369] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 61 in /tmp/buildd/ros-fuerte-urdfdom-0.2.3-3precise-20130312-1505/urdf_parser/src/model.cpp

I've added material tag to SDF file of Cube20K in this way, and now color of my Cube20k is changed

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
    <material>
          <ambient>1 0 0 1</ambient>
          <diffuse>1 0 0 1</diffuse>
          <specular>0.1 0.1 0.1 1</specular>
        <emissive>0 0 0 0</emissive>
    </material>
      </visual>
    </link>
  </model>
</sdf>

change color of models

Hi Dear All,

I want to change color of models in gazebo ( standalone version 1.8.6 ), i read some comments here, but those don't work, by the way any one can help me? for example i want to change color of Cube 20k, and i don't know what is tag of color?!! and also i can't fine any property for color in gazebo! because i use standalone version of gazebo, i use SDF, for Example SDF file of Cube20k is:

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

i got this error when i added the material tag to SDF file:

XML Element[material], child of element[mesh] not defined in SDF. Ignoring.[mesh]
Error [parser.cc:710] Error reading element <mesh>
Error [parser.cc:710] Error reading element <geometry>
Error [parser.cc:710] Error reading element <collision>
Error [parser.cc:710] Error reading element <link>
Error [parser.cc:710] Error reading element <model>
Error [parser.cc:369] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 61 in /tmp/buildd/ros-fuerte-urdfdom-0.2.3-3precise-20130312-1505/urdf_parser/src/model.cpp

I've added material tag to SDF file of Cube20K in this way, and now color of my Cube20k is changed

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="cube_20k">
    <link name="link">
      <pose>0 0 0.5 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://cube_20k/meshes/cube_20k.stl</uri>
            <scale>0.5 0.5 0.5</scale>
          </mesh>
        </geometry>
     <material>
          <ambient>1 0 0 1</ambient>
          <diffuse>1 0 0 1</diffuse>
          <specular>0.1 0.1 0.1 1</specular>
         <emissive>0 0 0 0</emissive>
     </material>
      </visual>
    </link>
  </model>
</sdf>