Open freyzor opened 9 years ago
@freyzor Thanks for the report, I believe I am following what you are saying, but it isn't immediately obvious to me how to fix it. It sounds like you have a pretty good handle on what should happen, I don't suppose you'd like to try your hand at making a pull request to address it?
Unfortunately I'll likely not have time to address this myself in the short term. I've just run out of cycles to spend on rviz for the moment. For now I'll mark it as untargeted.
I would have taken a stab at it if I had a proper environment setup and am pretty new to ROS. I have been working through a virtualbox and software render at abyssmal framerates :P I caved and have now done a proper install. I will take a look if still unresolved when I have got my ros mojo going properly.
When defining a urdf link with multiple visual elements with different materials only the first material gets applied to all visual elements.
By viewing the code robot_link.cpp we can see how this happens as the color gets cached in a default value and never checked again while the default is set.
The method should always try to find a material for every element processed and use a default of none is found.
Also calling the urdf element processed 'link' is very confusing the methods is actually processing a or a element both belonging to a parent . Seems like a relic from a older and flatter urdf structure.