Fixed URDF mesh materials being overridden by color materials.#187
Merged
jihoonl merged 1 commit intoRobotWebTools:developfrom Jul 27, 2017
Merged
Fixed URDF mesh materials being overridden by color materials.#187jihoonl merged 1 commit intoRobotWebTools:developfrom
jihoonl merged 1 commit intoRobotWebTools:developfrom
Conversation
Member
|
thanks |
jihoonl
pushed a commit
that referenced
this pull request
Dec 8, 2017
jihoonl
pushed a commit
that referenced
this pull request
Dec 15, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the develop branch (c36fbdb), this is what the Fetch URDF looks like:
This is because ROS3D.Urdf always uses a color material if a color is specified for the link: https://github.com/RobotWebTools/ros3djs/blob/develop/src/urdf/Urdf.js#L60
Then, that color material is always used for the MeshResource, even if the node already has a material (as discussed in #112 and implemented in #128). I think that change is correct, since we want to support colored meshes.
However, when using meshes in the context of a URDF, maybe we should not use the color material? I think most people want their URDF displays to reflect the mesh material and not some solid color.
This PR produces the following behaviors:
colorMaterialis still used for these links, so the behavior is unchangedAfter making this change, this is what the Fetch URDF looks like:

And here is what two robot marker arrays look like (from the robot_markers demo).