LingxinMeng 6 miesięcy temu
rodzic
commit
08c9e6b3c4

+ 2 - 2
src/python2/pjibot_delivery/2simulation-pjibot_delivery.py

@@ -74,10 +74,10 @@ def move_xosc_before_simulation(root_path):
                 for node1 in node0:
                     # 打印根元素的标签名
                     if 'LogicFile' == node1.tag:
-                        xodr_src = str(node1.set('filepath'))
+                        xodr_src = str(node1.get('filepath'))
                         shutil.copy(xodr_src, root_path + xodr_src.rsplit('/', 1)[-1])
                     if 'SceneGraphFile' == node1.tag:
-                        osgb_src = str(node1.set('filepath'))
+                        osgb_src = str(node1.get('filepath'))
                         shutil.copy(osgb_src, root_path + osgb_src.rsplit('/', 1)[-1])
             if node0.tag == 'Entities':
                 for node1 in node0:

+ 2 - 2
src/python2/pjibot_delivery/simulation-pjibot_delivery.py

@@ -30,10 +30,10 @@ def move_xosc_before_simulation(root_path):
                 for node1 in node0:
                     # 打印根元素的标签名
                     if 'LogicFile' == node1.tag:
-                        xodr_src = str(node1.set('filepath'))
+                        xodr_src = str(node1.get('filepath'))
                         shutil.copy(xodr_src, root_path + xodr_src.rsplit('/', 1)[-1])
                     if 'SceneGraphFile' == node1.tag:
-                        osgb_src = str(node1.set('filepath'))
+                        osgb_src = str(node1.get('filepath'))
                         shutil.copy(osgb_src, root_path + osgb_src.rsplit('/', 1)[-1])
             if node0.tag == 'Entities':
                 for node1 in node0:

+ 2 - 2
src/python2/pjibot_patrol/simulation-pjibot_patrol.py

@@ -32,10 +32,10 @@ def move_xosc_before_simulation(root_path):
                 for node1 in node0:
                     # 打印根元素的标签名
                     if 'LogicFile' == node1.tag:
-                        xodr_src = str(node1.set('filepath'))
+                        xodr_src = str(node1.get('filepath'))
                         shutil.copy(xodr_src, root_path + xodr_src.rsplit('/', 1)[-1])
                     if 'SceneGraphFile' == node1.tag:
-                        osgb_src = str(node1.set('filepath'))
+                        osgb_src = str(node1.get('filepath'))
                         shutil.copy(osgb_src, root_path + osgb_src.rsplit('/', 1)[-1])
             if node0.tag == 'Entities':
                 for node1 in node0: