Home | Tutorials | Wiki | Issues
Ask Your Question
0

how to modify the color or material of link in gazebo version 1.2?

asked 2012-11-18 21:01:02 -0500

lugd1229 gravatar image

when I follow the tutorial to modify the color or material like " <material script="Gazebo/Blue"/>" or "color rgb ", gazebo will appear errors, how can I modify the color or materials?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-08 03:09:43 -0500

AndreiHaidu gravatar image

Hey, here is an example that works in Gazebo 1.2.5:

    <material>
      <script>
        <uri>file://media/materials/scripts/gazebo.material</uri>
        <name>Gazebo/Grey</name>
      </script>
    </material>
edit flag offensive delete link more

Comments

1

Are you using this code in a URDF file or a SDF file?

piyushk gravatar imagepiyushk ( 2013-01-09 08:11:06 -0500 )edit

it is an SDF file

AndreiHaidu gravatar imageAndreiHaidu ( 2013-01-09 10:51:17 -0500 )edit

Check out the SDF documentation: http://gazebosim.org/sdf

nkoenig gravatar imagenkoenig ( 2013-01-09 15:35:44 -0500 )edit

This doesn't work for me. I try to spawn e.g. a simple box from an urdf.xacro-file. And it always is white in Gazebo (2.2.3). Is there another way, that allows me to set the color?

J_Schaefer gravatar imageJ_Schaefer ( 2015-12-03 01:45:39 -0500 )edit
0

answered 2013-01-07 19:24:48 -0500

Ben B gravatar image

updated 2013-01-07 19:25:06 -0500

It's a bit late -- but I'd might as well leave an answer here.

You can modify the colour by changing the appropriate tag in the URDF file of the model/object you're playing with.

In the example posted here, you can change the tag

<material>Gazebo/Blue</material>

To whatever you want.

For fuerte, the list of available materials is in the file:

/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/share/gazebo-1.0.2/Media/materials/scripts/Gazebo.material

edit flag offensive delete link more

Comments

Hi, the example you have given is for the older gazebo version (v1.0).

AndreiHaidu gravatar imageAndreiHaidu ( 2013-01-08 03:08:35 -0500 )edit

Yup! It's for the version of Gazebo that came with Fuerte.

Ben B gravatar imageBen B ( 2013-01-09 19:47:18 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2012-11-18 21:01:02 -0500

Seen: 12,372 times

Last updated: Jan 08 '13