Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose functions to load LeRobot episodes #9141

Merged
merged 2 commits into from
Feb 26, 2025
Merged
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
4 changes: 2 additions & 2 deletions crates/store/re_data_loader/src/lib.rs
Original file line number Diff line number Diff line change
@@ -15,11 +15,11 @@ mod loader_directory;
mod loader_rrd;

#[cfg(not(target_arch = "wasm32"))]
mod lerobot;
pub mod lerobot;

// This loader currently only works when loading the entire dataset directory, and we cannot do that on web yet.
#[cfg(not(target_arch = "wasm32"))]
mod loader_lerobot;
pub mod loader_lerobot;

#[cfg(not(target_arch = "wasm32"))]
mod loader_external;
7 changes: 6 additions & 1 deletion crates/store/re_data_loader/src/loader_lerobot.rs
Original file line number Diff line number Diff line change
@@ -160,7 +160,12 @@ fn prepare_episode_chunks(
store_ids
}

fn load_episode(
/// Loads a single episode from a `LeRobot` dataset and converts it into a collection of Rerun chunks.
///
/// This function processes an episode from the dataset by extracting the relevant data columns and
/// converting them into appropriate Rerun data structures. It handles different types of data
/// (videos, images, scalar values, etc.) based on their data type specifications in the dataset metadata.
pub fn load_episode(
dataset: &LeRobotDataset,
episode: EpisodeIndex,
) -> Result<Vec<Chunk>, DataLoaderError> {