diff --git a/rviz_default_plugins/src/rviz_default_plugins/robot/robot_link.cpp b/rviz_default_plugins/src/rviz_default_plugins/robot/robot_link.cpp index d47057758..2c7c316d4 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/robot/robot_link.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/robot/robot_link.cpp @@ -643,7 +643,7 @@ void RobotLink::assignMaterialsToEntities( default_material_ = getMaterialForLink(link); std::string cloned_name = - default_material_->getName() + std::to_string(material_count++) + "Robot"; + default_material_->getName() + "_" + std::to_string(material_count++) + "Robot"; default_material_ = default_material_->clone(cloned_name); default_material_name_ = default_material_->getName(); @@ -652,7 +652,7 @@ void RobotLink::assignMaterialsToEntities( for (uint32_t i = 0; i < entity->getNumSubEntities(); ++i) { default_material_ = getMaterialForLink(link, material_name); std::string cloned_name = - default_material_->getName() + std::to_string(material_count++) + "Robot"; + default_material_->getName() + "_" + std::to_string(material_count++) + "Robot"; default_material_ = default_material_->clone(cloned_name); default_material_name_ = default_material_->getName(); @@ -669,7 +669,7 @@ void RobotLink::assignMaterialsToEntities( // Once selection id is done per object and not per material, // this can go away std::string sub_cloned_name = - sub_material_name + std::to_string(material_count++) + "Robot"; + sub_material_name + "_" + std::to_string(material_count++) + "Robot"; sub->getMaterial()->clone(sub_cloned_name); sub->setMaterialName(sub_cloned_name); }