Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dimos/robot/unitree_webrtc/mujoco_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ def __init__(self, global_config: GlobalConfig) -> None:
except ImportError:
raise ImportError("'mujoco' is not installed. Use `pip install -e .[sim]`")

# Pre-download the mujoco_sim data.
get_data("mujoco_sim")

# Trigger the download of the mujoco_menajerie package. This is so it
# doesn't trigger in the mujoco process where it can time out.
import mujoco_playground
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: unused import triggers linter warnings

Suggested change
import mujoco_playground
import mujoco_playground # noqa: F401


self.global_config = global_config
self.process: subprocess.Popen[bytes] | None = None
self.shm_data: ShmWriter | None = None
Expand Down
6 changes: 5 additions & 1 deletion dimos/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from functools import cache
import os
from pathlib import Path
import subprocess
import tarfile
Expand Down Expand Up @@ -70,11 +71,14 @@ def _lfs_pull(file_path: Path, repo_root: Path) -> None:
try:
relative_path = file_path.relative_to(repo_root)

env = os.environ.copy()
env["GIT_LFS_FORCE_PROGRESS"] = "1"

subprocess.run(
["git", "lfs", "pull", "--include", str(relative_path)],
cwd=repo_root,
check=True,
capture_output=True,
env=env,
)
except subprocess.CalledProcessError as e:
raise RuntimeError(f"Failed to pull LFS file {file_path}: {e}")
Expand Down