diff --git a/src/rviz/robot/robot_link.cpp b/src/rviz/robot/robot_link.cpp index 36ce7b213c..9a8dfc7c9c 100644 --- a/src/rviz/robot/robot_link.cpp +++ b/src/rviz/robot/robot_link.cpp @@ -628,7 +628,7 @@ void RobotLink::createEntityForGeometryElement(const urdf::LinkConstSharedPtr& l Ogre::SubEntity* sub = entity->getSubEntity(i); const std::string& material_name = sub->getMaterialName(); - if (material_name == "BaseWhite" || material_name == "BaseWhiteNoLighting") + if (material_name == "BaseWhite" || material_name == "BaseWhiteNoLighting" || material_name.empty()) { sub->setMaterial(default_material_); }