Skip to content

Commit 12c4616

Browse files
authored
Expose functions to load LeRobot episodes (rerun-io#9141)
1 parent 2e3e808 commit 12c4616

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

crates/store/re_data_loader/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ mod loader_directory;
1515
mod loader_rrd;
1616

1717
#[cfg(not(target_arch = "wasm32"))]
18-
mod lerobot;
18+
pub mod lerobot;
1919

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

2424
#[cfg(not(target_arch = "wasm32"))]
2525
mod loader_external;

crates/store/re_data_loader/src/loader_lerobot.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ fn prepare_episode_chunks(
160160
store_ids
161161
}
162162

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

0 commit comments

Comments
 (0)