From 3eb2c7c46bc923a950776c662bfb854e8b017d49 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 20 Sep 2023 14:09:10 -0500 Subject: [PATCH] Fix SDFormat xml output of sdf_exporter (#2156) Fixes the warnings reported in https://github.com/gazebosim/gazebo_test_cases/issues/207 Signed-off-by: Addisu Z. Taddese --- examples/scripts/blender/sdf_exporter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/scripts/blender/sdf_exporter.py b/examples/scripts/blender/sdf_exporter.py index 6450d0a46d..b619918c5c 100644 --- a/examples/scripts/blender/sdf_exporter.py +++ b/examples/scripts/blender/sdf_exporter.py @@ -50,7 +50,7 @@ def export_sdf(prefix_path): # 1 model and 1 link model = ET.SubElement(sdf, "model", attrib={"name": "test"}) - static = ET.SubElement(sdf, "static") + static = ET.SubElement(model, "static") static.text = "true" link = ET.SubElement(model, "link", attrib={"name": "testlink"}) # for each geometry in geometry library add a tag @@ -165,8 +165,8 @@ def add_attenuation_tags(light_tag, blender_light): uri.text = path.join(meshes_folder_prefix, dae_filename) surface = ET.SubElement(collision, "surface") - contact = ET.SubElement(collision, "contact") - collide_bitmask = ET.SubElement(collision, "collide_bitmask") + contact = ET.SubElement(surface, "contact") + collide_bitmask = ET.SubElement(contact, "collide_bitmask") collide_bitmask.text = "0x01" ## sdf write to file