diff --git a/recipe/fix-invisible-meshes.patch b/recipe/fix-invisible-meshes.patch new file mode 100644 index 00000000..68145409 --- /dev/null +++ b/recipe/fix-invisible-meshes.patch @@ -0,0 +1,21 @@ +diff --git a/gazebo/rendering/Visual.cc b/gazebo/rendering/Visual.cc +index 14ee82bc5c..d8df743a8b 100644 +--- a/gazebo/rendering/Visual.cc ++++ b/gazebo/rendering/Visual.cc +@@ -626,6 +626,7 @@ void Visual::DetachVisual(const std::string &_name) + ////////////////////////////////////////////////// + void Visual::AttachObject(Ogre::MovableObject *_obj) + { ++ static std::atomic_uint64_t id = 0; + // This code makes plane render before grids. This allows grids to overlay + // planes, and then other elements to overlay both planes and grids. + // if (this->dataPtr->sdf->HasElement("geometry")) +@@ -647,7 +648,7 @@ void Visual::AttachObject(Ogre::MovableObject *_obj) + { + std::string newMaterialName; + newMaterialName = this->dataPtr->sceneNode->getName() + +- "_MATERIAL_" + material->getName(); ++ "_MATERIAL_" + material->getName() + "_" + boost::lexical_cast(id++); + + // keep a pointer to the original submesh material so it can be used + // to restore material state when setting transparency diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b7f8111a..f43ad6c9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -13,9 +13,10 @@ source: - use-external-libs-config.patch - normalize-ogre-path.patch - fix-windows-model-insert.patch + - fix-invisible-meshes.patch build: - number: 0 + number: 1 skip: false run_exports: - {{ pin_subpackage('gazebo', max_pin='x') }}