YCB Downloader (ycbust)
ycbust is a Rust library and CLI for downloading and extracting assets from the YCB Object and Model Set. It is aimed at rendering, robotics, and simulation workflows that need a predictable local YCB layout with minimal setup.
Features
- Library and CLI interfaces for the same download/extract workflow
- Fast presets for
representative,tbp-standard,tbp-similar, andall google_16kmeshes by default, with--fullfor extra Berkeley assets- Validation helpers for checking that benchmark objects are fully present
- Parallel downloads via
DownloadOptions::concurrency(default 1) Content-Lengthintegrity check on resume (toggle viaverify_integrity)- Typed
YcbErrorenum so consumers can match on network / http / io / extraction failures
Installation
Install the CLI from crates.io:
Prebuilt binaries are also available on the GitHub releases page.
Quick Start
The CLI uses subcommands. The default local output path is your OS temp directory plus ycb:
- Linux/macOS:
/tmp/ycb - Windows:
%TEMP%\ycb
Download the default TBP standard subset:
Download a quick 3-object smoke-test set:
Download specific objects to a custom directory:
Download all supported file types for the standard subset:
Validate a local dataset directory:
List the objects in a built-in subset:
Fetch the full upstream object list from YCB S3:
Subsets
representative: 3 common objects for quick end-to-end checkstbp-standard: the TBP standard 10-object benchmark settbp-similar: the TBP harder 10-object discrimination setall: every object advertised by the YCB dataset index
Output Layout
For a typical google_16k download, ycbust produces:
<output-dir>/
003_cracker_box/
google_16k/
textured.obj
texture_map.png
textured.mtl
...
For rendering workflows, point your asset loader at google_16k/textured.obj. The relative path is also exposed as the GOOGLE_16K_MESH_RELATIVE constant for callers that already hold an object_dir.
Library Usage
The crate can also be used directly from Rust:
use Path;
use ;
async
For an ad-hoc list of object IDs (no Subset indirection), use download_objects:
use Path;
use ;
async
To download in parallel and skip the integrity check:
use DownloadOptions;
let mut options = default;
options.concurrency = 4;
options.verify_integrity = false;
Performance note on verify_integrity
When verify_integrity = true (default), each cached .tgz archive triggers
one HEAD request on resume so the local size can be compared against the
server-reported Content-Length. Archives whose extracted google_16k mesh
is already on disk do not trigger a HEAD — the extracted artifact is the
fast path. Set verify_integrity = false for offline-ish workflows or if
you keep delete_archives = false and want to avoid a HEAD per object per
run; the tradeoff is that a truncated archive from an interrupted run will
look valid on the next pass.
API docs: docs.rs/ycbust
Error handling
All public APIs return Result<T, ycbust::YcbError>. Match on the variants for granular handling:
use ;
# async
anyhow users get From<YcbError> for anyhow::Error for free.
Development
This repo uses just for common tasks:
This is a public utility crate, so changes should stay small, general-purpose, and easy to verify.