Skip to content

Commit

Permalink
fix stem modification and remove string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliano-97 committed Sep 5, 2024
1 parent 062a806 commit e8aef3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/position_retargeting/hand_robot_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def __init__(self, robot_names: List[RobotName], hand_type: HandType, headless=F
# Build robot
urdf_path = Path(config.urdf_path)
if "glb" not in urdf_path.stem:
urdf_path = str(urdf_path).replace(".urdf", "_glb.urdf")
urdf_path = urdf_path.with_stem(urdf_path.stem + "_glb")
robot_urdf = urdf.URDF.load(str(urdf_path), add_dummy_free_joints=True, build_scene_graph=False)
urdf_name = urdf_path.split("/")[-1]
urdf_name = urdf_path.name
temp_dir = tempfile.mkdtemp(prefix="dex_retargeting-")
temp_path = f"{temp_dir}/{urdf_name}"
robot_urdf.write_xml_file(temp_path)
Expand Down

0 comments on commit e8aef3c

Please sign in to comment.