0
$\begingroup$

Gazebo Answers logo

Gazebo 1.2.5 no longer seems to be picking up the material tag from the URDF file. This can be seen through the following commands (from this tutorial on the ROS wiki).

roslaunch gazebo_worlds empty_world.launch
roslaunch gazebo_worlds table.launch

A screenshot can be seen here. I am facing the same problem in my robot models.

On a similar note, I have seen weird behavior in Gazebo from my COLLADA mesh models (this behavior was also similarly weird in Gazebo 1.0 + ROS Fuerte). I would like to use the colors as specified in the mesh file (rviz + RobotModel handle this correctly).

Gazebo seems to start with all the meshes painted grey. If any of the joints move, then the corresponding links seem to alternate between grey and the color as specified by the mesh. A video of this can be seen here.

I am not sure what information will be required to debug this, but I can place it online.

Edit #1:

Replacing the material tag as suggested by the SDF documentation and Nate's answer does not work. I've replace the material tag of all my urdf links with this line from my world file which I know works:

<material>
  <script>
    <uri>file://media/materials/scripts/gazebo.material</uri>
    <name>Gazebo/Green</name>
  </script>
</material>
  • Here is the generated urdf after running through xacro: test.urdf
  • Here is the world file I get from gazebo gui (after using save world as): test.world.
  • Notice all the material tags from URDF are empty (Search for "material/")
  • All the tags from my world SDF file are fine and rendered correctly.

Thanks!!


Originally posted by piyushk on Gazebo Answers with karma: 138 on 2013-01-01

Post score: 1


Original comments

Comment by davetcoleman on 2013-01-02:
i'm having this same issue and would like to have the material color from the URDF to be used

Comment by Ben B on 2013-01-07:
Ditto! I had to go back from ROS Groovy to ROS fuerte for this reason.

$\endgroup$

2 Answers 2

0
$\begingroup$

Gazebo Answers logo

fixed in trunk per commit, will make a groovy release soon.

Update 2012-01-22 simulator_gazebo 1.7.8 with a fix for the materials issue in tutorial is in shadow fixed, should make it out to the public repo soon.


Originally posted by hsu with karma: 1873 on 2013-01-10

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Gazebo Answers logo

The URDF in that tutorial is incorrect. It should be:

<material>
  <script>
    <uri>URI of the .material file</uri>
    <name>Name of the material</name>
  </script>
</material>

Look for the SDF documentation for information: http://gazebosim.org/sdf


Originally posted by nkoenig with karma: 7676 on 2013-01-09

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by piyushk on 2013-01-10:
@nkoenig: I just tried this and it does not work. See updated question. I can't see why it should not work if I take a look at urdf_parser.cc, but I am having trouble compiling the simulator_gazebo stack from source to figure it out.

$\endgroup$

Your Answer

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