From 6f01a921c3bd994461dac835b7d8d54bc280e6f5 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 10 May 2021 08:25:12 +1000 Subject: [PATCH 1/2] Create fix-invisible-meshes.patch --- recipe/fix-invisible-meshes.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 recipe/fix-invisible-meshes.patch 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 From d83481a0a794c88f098d95f330f4f61b0715d2f2 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 10 May 2021 08:25:41 +1000 Subject: [PATCH 2/2] Add patch to meta, bump build num --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') }}