Skip to content

Commit

Permalink
[update] update dex-retargeting to deal with new dex-urdf
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqin committed Dec 21, 2023
1 parent e38f681 commit f2d1218
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "assets"]
path = assets
url = https://github.com/dexsuite/dex-urdf.git
branch = init_dev
branch = main
2 changes: 1 addition & 1 deletion assets
Submodule assets updated 426 files
2 changes: 1 addition & 1 deletion example/position_retargeting/visualize_hand_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def viz_hand_object(robots: Optional[Tuple[RobotName]], data_root: Path, fps: in
def main(dexycb_dir: str, robots: Optional[List[RobotName]] = None, fps: int = 5):
print(robots)
data_root = Path(dexycb_dir).absolute()
robot_dir = Path(__file__).parent.parent.parent / "assets" / "robots"
robot_dir = Path(__file__).absolute().parent.parent.parent / "assets" / "robots" / "hands"
RetargetingConfig.set_default_urdf_dir(robot_dir)
if not data_root.exists():
raise ValueError(f"Path to DexYCB dir: {data_root} does not exist.")
Expand Down
2 changes: 1 addition & 1 deletion example/vector_retargeting/detect_from_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def main(
"""

config_path = get_default_config_path(robot_name, retargeting_type, hand_type)
robot_dir = Path(__file__).parent.parent.parent / "assets" / "robots"
robot_dir = Path(__file__).absolute().parent.parent.parent / "assets" / "robots" / "hands"
RetargetingConfig.set_default_urdf_dir(str(robot_dir))
retargeting = RetargetingConfig.load_from_file(config_path).build()
retarget_video(retargeting, video_path, output_path, str(config_path))
Expand Down
2 changes: 1 addition & 1 deletion example/vector_retargeting/render_robot_hand.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def main(
By default, it is set to None, implying no video will be saved.
headless: Set to visualize the rendering on the screen by opening the viewer window.
"""
robot_dir = Path(__file__).parent.parent.parent / "assets" / "robots"
robot_dir = Path(__file__).absolute().parent.parent.parent / "assets" / "robots" / "hands"
RetargetingConfig.set_default_urdf_dir(str(robot_dir))
supported_renderer = ["sapien", "sim_web_visualizer", "trimesh"]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_retargeting_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class TestRetargetingConfig:
config_dir = Path(__file__).parent.parent / "dex_retargeting" / "configs"
robot_dir = Path(__file__).parent.parent / "assets" / "robots"
robot_dir = Path(__file__).parent.parent / "assets" / "robots" / "hands"
RetargetingConfig.set_default_urdf_dir(str(robot_dir.absolute()))

config_paths = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sapien_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class TestSapienOptimizer:
np.set_printoptions(precision=4)
config_dir = Path(__file__).parent.parent / "dex_retargeting" / "configs"
robot_dir = Path(__file__).parent.parent / "assets" / "robots"
robot_dir = Path(__file__).parent.parent / "assets" / "robots" / "hands"
RetargetingConfig.set_default_urdf_dir(str(robot_dir.absolute()))

@staticmethod
Expand Down

0 comments on commit f2d1218

Please sign in to comment.