Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Haosulab ManiSkill DownloadAsset

From Leeroopedia
Knowledge Sources
Domains Robotics, Simulation, Asset Management
Last Updated 2026-02-15 08:00 GMT

Overview

Concrete tool for downloading, verifying, and extracting ManiSkill assets from remote sources via CLI or programmatic API.

Description

The download_asset.py module provides both a command-line interface and Python API for downloading assets required by ManiSkill environments. It supports multiple download sources and handles the full download lifecycle.

Core functions:

  • download() -- Downloads a single DataSource. Handles directory creation, existing file cleanup, URL download with progress bars, SHA-256 checksum verification, ZIP extraction with directory renaming, and HuggingFace dataset downloads.
  • download_from_hf_datasets() -- Specialized download using huggingface_hub.snapshot_download() for HF-hosted datasets.
  • sha256sum() -- Computes SHA-256 checksum of a file for verification.

CLI interface:

  • python -m mani_skill.utils.download_asset [uid]
  • Supports downloading by asset UID, data group ID, or "all".
  • -l/--list -- List available assets by category (scene, robot, task_assets, objects).
  • -y/--non-interactive -- Skip confirmation prompts.
  • -o/--output-dir -- Custom output directory.
  • --quiet -- Disable verbose output.
  • Environment variable MS_SKIP_ASSET_DOWNLOAD_PROMPT=1 auto-accepts prompts.

Data group expansion: When a data group ID is given (e.g., an environment ID), it is expanded into individual data sources using expand_data_group_into_individual_data_source_ids().

Usage

Used to download assets before running environments that require external data (models, scenes, task configurations). Can be used from the command line or called programmatically.

Code Reference

Source Location

Signature

def download(data_source: DataSource, verbose=True, non_interactive=True) -> Path: ...
def download_from_hf_datasets(data_source: DataSource) -> None: ...
def sha256sum(filename, chunk_size=4096) -> str: ...
def main(args) -> None: ...
def parse_args(args=None) -> argparse.Namespace: ...

Import

from mani_skill.utils.download_asset import download

I/O Contract

Inputs

Name Type Required Description
data_source DataSource Yes Data source definition with URL, target path, etc.
verbose bool No Show progress output (default: True)
non_interactive bool No Skip confirmation prompts (default: True)

Outputs

Name Type Description
output_path Path Local path where asset was downloaded/extracted

Usage Examples

Basic Usage

# CLI usage
# python -m mani_skill.utils.download_asset ycb
# python -m mani_skill.utils.download_asset all -y

# Programmatic usage
from mani_skill.utils.assets.data import DATA_SOURCES
from mani_skill.utils.download_asset import download

output = download(DATA_SOURCES["ycb"])
print(f"Assets downloaded to: {output}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment