Skip to content

Commit

Permalink
Expand the output path in MujocoVideoRecorder.write_video
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Jul 2, 2024
1 parent 85bceda commit a5999d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jaxsim/mujoco/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def record_frame(self, camera_name: str | None = None) -> None:
def write_video(self, path: pathlib.Path, exist_ok: bool = False) -> None:
"""Writes the video to a file."""

# Resolve the path to the video.
path = path.expanduser().resolve()

if path.is_dir():
raise IsADirectoryError(f"The path '{path}' is a directory.")

Expand Down

0 comments on commit a5999d9

Please sign in to comment.