From e6b65b3b93af97064ace17c505d8b876a4c84208 Mon Sep 17 00:00:00 2001 From: Fanbo Xiang Date: Tue, 31 Oct 2023 22:55:16 -0700 Subject: [PATCH] fix urdf loader fix root --- python/py_package/wrapper/urdf_loader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/py_package/wrapper/urdf_loader.py b/python/py_package/wrapper/urdf_loader.py index 8ef26795..bb65d270 100644 --- a/python/py_package/wrapper/urdf_loader.py +++ b/python/py_package/wrapper/urdf_loader.py @@ -542,8 +542,13 @@ def _parse_urdf(self, urdf_string, package_dir): if len(self.link2child_joints[root]) == 0: actor_builders.append(self._parse_actor(root)) else: + if root == robot.base_link.name: + fix_base = self.fix_root_link + else: + fix_base = False + articulation_builders.append( - self._parse_articulation(root, root == robot.base_link.name) + self._parse_articulation(root, fix_base) ) extra = ET.fromstring(robot.other_xml)