Rosanswers logo

Hello Everyone!

I am trying to create a conveyor belt simulation in gazebo, using the SolidWorks to URDF exporter. Before importing the conveyor, I decided to test the exporter out on a simple part, and I managed to spawn it in Gazebo just fine, but no matter what I do, I cannot seem to get any color but white/gray.

Tried the following: Changing texture in URDF Exporter, changing the RGB values in URDF file, changing colors and textures in SolidWorks before exporting.

Am I doing something wrong?

Thank you for your time!

Example URDF generated from a extruded pink cube in solidworks. (not edited)

        xyz="0.127 0.127 0.127"
        rpy="0 0 0" />
        value="16.387" />
        izz="1.07890658921981E-17" />
        xyz="1.5707963267949 0 0"
        rpy="0 0 0" />
          filename="package://PinkCube/meshes/PinkCube.STL" />
          rgba="0.79216 0.81961 0.93333 1" />
        xyz="0 0 0"
        rpy="1.5707963267949 0 0" />
          filename="package://PinkCube/meshes/PinkCube.STL" />

Originally posted by RebeccaK375 on ROS Answers with karma: 99 on 2013-01-10

Post score: 2

Original comments

Comment by RebeccaK375 on 2013-01-10:
Thanks for your response, Benjamin Blumer! I do not spot in the URDF... Is this something I should add manually?

Comment by brawner on 2013-02-13:
If it didn't properly display the color, that may be a bug. Single parts should have the correct colors specified in the URDF. One day, I'll add the gazebo colors to the options.

Comment by RebeccaK375 on 2013-02-14:
Thank you! For now, the fix suggested by Benjamin does the trick.


1 Answer 1


Rosanswers logo

What does the generated URDF look like?

Does the match the ?

Try adding:

<gazebo reference="PinkCube">

between the and tags. That should make it blue. If so, we're on the right track. From there you can play around with the different materials available. In Fuerte, they're listed in here: /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/share/gazebo-1.0.2/Media/materials/scripts/Gazebo.material for Groovy, I think the G in "Gazebo.material" is lower case.

Originally posted by Benjamin Blumer with karma: 287 on 2013-01-10

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by RebeccaK375 on 2013-01-13:
Thank you so so much! There was no need for a disclaimer - this worked!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.