Skip to content

Commit

Permalink
Merge pull request #40 from giuliano-97/fix/hand-robot-viewer-urdf-pa…
Browse files Browse the repository at this point in the history
…th-manip

fix path stem manip in hand_robot_viewer
  • Loading branch information
yzqin authored Sep 5, 2024
2 parents 062a806 + e8aef3c commit aa84a36
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 aa84a36

Please sign in to comment.