gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.2k stars 483 forks source link

COLLADA material properties (color) visualization regression #1728

Open osrf-migration opened 9 years ago

osrf-migration commented 9 years ago

Original report (archived issue) by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


It seems there is a regression in how COLLADA material properties are handled. In Gazebo2, the colors of a simple Hokuyo model appear as they should, with the model being black and partly orange. In both Gazebo4 and Gazebo6, the model is displayed completely homogenous gray. See attached screenshot of Gazebo6. In the Gazebo window, the LIDAR is gray, while rviz on the right seems correctly visualize the material colors. Up to Gazebo2, this also worked with Gazebo. Is this a bug, or was support for material properties intentionally dropped at some point?

collada_issue.png

The COLLADA LIDAR model in question is this one and has been added to the model using this xacro macro.

osrf-migration commented 9 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


Same issue asked about at Gazebo Answers by someone else.

osrf-migration commented 9 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


I am trying to reproduce your issue. Made a test model with the hokuyo collada file. This is what I get:

hokuyo-test.png

I am using gazebo6 built from source. Do you get any error messages when running with gazebo --verbose?

osrf-migration commented 9 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


That's interesting :) To be more specific: I use the latest Gazebo6 version from .debs provided by OSRF, installed using sudo apt-get install ros-indigo-gazebo6-ros. I so far only used URDFs spawned via the Gazebo ROS API. Could something in the conversion step from URDF to SDF cause this?

osrf-migration commented 9 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


gazebo --verbose does not show any errors.

So I also made a test SDF model (collada_test) and spawned it into the same scenario as my robot. As visible in the screenshot, the exact same model gets colored correctly when loaded as part of a SDF, but doesn't when loaded as part of a URDF. It thus seems that at some point during the conversion from URDF to SDF the color information is lost (?).

collada_issue_comparison.jpg

osrf-migration commented 9 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


Ok, so when I change the color of a preceding link (that doesn't have geometry in the current version of the model) here, the LIDAR also inherits that color. It thus seems like child links inherit the material properties of their parent links (which they should not IMHO, at least not when having material properties defined).

After removing the gazebo material tags (changeset) for the parent links, the .dae visualization looks correct.

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 7 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).