Home | Tutorials | Wiki | Issues
Ask Your Question
1

surface material colors from URDF and COLLADA

asked 2013-01-01 04:19:54 -0600

piyushk gravatar image

updated 2013-01-10 00:57:52 -0600

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!!

edit retag flag offensive close merge delete

Comments

i'm having this same issue and would like to have the material color from the URDF to be used

davetcoleman gravatar imagedavetcoleman ( 2013-01-02 14:48:38 -0600 )edit

Ditto! I had to go back from ROS Groovy to ROS fuerte for this reason.

Ben B gravatar imageBen B ( 2013-01-07 19:18:01 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-10 02:56:25 -0600

hsu gravatar image

updated 2013-01-22 10:30:37 -0600

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.

edit flag offensive delete link more
1

answered 2013-01-09 15:53:28 -0600

nkoenig gravatar image

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

edit flag offensive delete link more

Comments

@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.

piyushk gravatar imagepiyushk ( 2013-01-10 00:59:44 -0600 )edit
0

answered 2013-01-10 02:56:46 -0600

hsu gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-01-01 04:19:54 -0600

Seen: 2,572 times

Last updated: Jan 22 '13