mishig HF Staff commited on
Commit
4b31140
·
verified ·
1 Parent(s): bb732a4

Sync from GitHub via hub-sync

Browse files
.gitattributes CHANGED
@@ -1,2 +1,55 @@
1
  public/urdf/**/*.dae filter=lfs diff=lfs merge=lfs -text
2
  public/urdf/**/*.stl filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  public/urdf/**/*.dae filter=lfs diff=lfs merge=lfs -text
2
  public/urdf/**/*.stl filter=lfs diff=lfs merge=lfs -text
3
+ public/urdf/g1/meshes/head_link.STL filter=lfs diff=lfs merge=lfs -text
4
+ public/urdf/g1/meshes/left_ankle_roll_link.STL filter=lfs diff=lfs merge=lfs -text
5
+ public/urdf/g1/meshes/left_elbow_link_merge.STL filter=lfs diff=lfs merge=lfs -text
6
+ public/urdf/g1/meshes/left_hand_index_0_link.STL filter=lfs diff=lfs merge=lfs -text
7
+ public/urdf/g1/meshes/left_hand_index_1_link.STL filter=lfs diff=lfs merge=lfs -text
8
+ public/urdf/g1/meshes/left_hand_middle_0_link.STL filter=lfs diff=lfs merge=lfs -text
9
+ public/urdf/g1/meshes/left_hand_middle_1_link.STL filter=lfs diff=lfs merge=lfs -text
10
+ public/urdf/g1/meshes/left_hand_palm_link.STL filter=lfs diff=lfs merge=lfs -text
11
+ public/urdf/g1/meshes/left_hand_thumb_1_link.STL filter=lfs diff=lfs merge=lfs -text
12
+ public/urdf/g1/meshes/left_hand_thumb_2_link.STL filter=lfs diff=lfs merge=lfs -text
13
+ public/urdf/g1/meshes/left_hip_pitch_link.STL filter=lfs diff=lfs merge=lfs -text
14
+ public/urdf/g1/meshes/left_hip_roll_link.STL filter=lfs diff=lfs merge=lfs -text
15
+ public/urdf/g1/meshes/left_hip_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
16
+ public/urdf/g1/meshes/left_knee_link.STL filter=lfs diff=lfs merge=lfs -text
17
+ public/urdf/g1/meshes/left_rubber_hand.STL filter=lfs diff=lfs merge=lfs -text
18
+ public/urdf/g1/meshes/left_shoulder_pitch_link.STL filter=lfs diff=lfs merge=lfs -text
19
+ public/urdf/g1/meshes/left_shoulder_roll_link.STL filter=lfs diff=lfs merge=lfs -text
20
+ public/urdf/g1/meshes/left_shoulder_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
21
+ public/urdf/g1/meshes/left_wrist_roll_link.STL filter=lfs diff=lfs merge=lfs -text
22
+ public/urdf/g1/meshes/left_wrist_roll_rubber_hand.STL filter=lfs diff=lfs merge=lfs -text
23
+ public/urdf/g1/meshes/left_wrist_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
24
+ public/urdf/g1/meshes/logo_link.STL filter=lfs diff=lfs merge=lfs -text
25
+ public/urdf/g1/meshes/pelvis.STL filter=lfs diff=lfs merge=lfs -text
26
+ public/urdf/g1/meshes/pelvis_contour_link.STL filter=lfs diff=lfs merge=lfs -text
27
+ public/urdf/g1/meshes/right_ankle_roll_link.STL filter=lfs diff=lfs merge=lfs -text
28
+ public/urdf/g1/meshes/right_elbow_link_merge.STL filter=lfs diff=lfs merge=lfs -text
29
+ public/urdf/g1/meshes/right_hand_index_0_link.STL filter=lfs diff=lfs merge=lfs -text
30
+ public/urdf/g1/meshes/right_hand_index_1_link.STL filter=lfs diff=lfs merge=lfs -text
31
+ public/urdf/g1/meshes/right_hand_middle_0_link.STL filter=lfs diff=lfs merge=lfs -text
32
+ public/urdf/g1/meshes/right_hand_middle_1_link.STL filter=lfs diff=lfs merge=lfs -text
33
+ public/urdf/g1/meshes/right_hand_palm_link.STL filter=lfs diff=lfs merge=lfs -text
34
+ public/urdf/g1/meshes/right_hand_thumb_1_link.STL filter=lfs diff=lfs merge=lfs -text
35
+ public/urdf/g1/meshes/right_hand_thumb_2_link.STL filter=lfs diff=lfs merge=lfs -text
36
+ public/urdf/g1/meshes/right_hip_pitch_link.STL filter=lfs diff=lfs merge=lfs -text
37
+ public/urdf/g1/meshes/right_hip_roll_link.STL filter=lfs diff=lfs merge=lfs -text
38
+ public/urdf/g1/meshes/right_hip_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
39
+ public/urdf/g1/meshes/right_knee_link.STL filter=lfs diff=lfs merge=lfs -text
40
+ public/urdf/g1/meshes/right_rubber_hand.STL filter=lfs diff=lfs merge=lfs -text
41
+ public/urdf/g1/meshes/right_shoulder_pitch_link.STL filter=lfs diff=lfs merge=lfs -text
42
+ public/urdf/g1/meshes/right_shoulder_roll_link.STL filter=lfs diff=lfs merge=lfs -text
43
+ public/urdf/g1/meshes/right_shoulder_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
44
+ public/urdf/g1/meshes/right_wrist_roll_link.STL filter=lfs diff=lfs merge=lfs -text
45
+ public/urdf/g1/meshes/right_wrist_roll_rubber_hand.STL filter=lfs diff=lfs merge=lfs -text
46
+ public/urdf/g1/meshes/right_wrist_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
47
+ public/urdf/g1/meshes/torso_constraint_L_link.STL filter=lfs diff=lfs merge=lfs -text
48
+ public/urdf/g1/meshes/torso_constraint_R_link.STL filter=lfs diff=lfs merge=lfs -text
49
+ public/urdf/g1/meshes/torso_link.STL filter=lfs diff=lfs merge=lfs -text
50
+ public/urdf/g1/meshes/torso_link_rev_1_0.STL filter=lfs diff=lfs merge=lfs -text
51
+ public/urdf/g1/meshes/waist_constraint_L.STL filter=lfs diff=lfs merge=lfs -text
52
+ public/urdf/g1/meshes/waist_constraint_R.STL filter=lfs diff=lfs merge=lfs -text
53
+ public/urdf/g1/meshes/waist_support_link.STL filter=lfs diff=lfs merge=lfs -text
54
+ public/urdf/g1/meshes/waist_yaw_link.STL filter=lfs diff=lfs merge=lfs -text
55
+ public/urdf/g1/meshes/waist_yaw_link_rev_1_0.STL filter=lfs diff=lfs merge=lfs -text
public/urdf/g1/meshes/left_ankle_pitch_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/left_ankle_pitch_link.STL and b/public/urdf/g1/meshes/left_ankle_pitch_link.STL differ
 
public/urdf/g1/meshes/left_elbow_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/left_elbow_link.STL and b/public/urdf/g1/meshes/left_elbow_link.STL differ
 
public/urdf/g1/meshes/left_hand_thumb_0_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/left_hand_thumb_0_link.STL and b/public/urdf/g1/meshes/left_hand_thumb_0_link.STL differ
 
public/urdf/g1/meshes/left_wrist_pitch_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/left_wrist_pitch_link.STL and b/public/urdf/g1/meshes/left_wrist_pitch_link.STL differ
 
public/urdf/g1/meshes/right_ankle_pitch_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/right_ankle_pitch_link.STL and b/public/urdf/g1/meshes/right_ankle_pitch_link.STL differ
 
public/urdf/g1/meshes/right_elbow_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/right_elbow_link.STL and b/public/urdf/g1/meshes/right_elbow_link.STL differ
 
public/urdf/g1/meshes/right_hand_thumb_0_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/right_hand_thumb_0_link.STL and b/public/urdf/g1/meshes/right_hand_thumb_0_link.STL differ
 
public/urdf/g1/meshes/right_wrist_pitch_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/right_wrist_pitch_link.STL and b/public/urdf/g1/meshes/right_wrist_pitch_link.STL differ
 
public/urdf/g1/meshes/torso_constraint_L_rod_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/torso_constraint_L_rod_link.STL and b/public/urdf/g1/meshes/torso_constraint_L_rod_link.STL differ
 
public/urdf/g1/meshes/torso_constraint_R_rod_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/torso_constraint_R_rod_link.STL and b/public/urdf/g1/meshes/torso_constraint_R_rod_link.STL differ
 
public/urdf/g1/meshes/waist_roll_link.STL CHANGED
Binary files a/public/urdf/g1/meshes/waist_roll_link.STL and b/public/urdf/g1/meshes/waist_roll_link.STL differ
 
public/urdf/g1/meshes/waist_roll_link_rev_1_0.STL CHANGED
Binary files a/public/urdf/g1/meshes/waist_roll_link_rev_1_0.STL and b/public/urdf/g1/meshes/waist_roll_link_rev_1_0.STL differ
 
src/app/[org]/[dataset]/[episode]/fetch-data.ts CHANGED
@@ -1154,65 +1154,57 @@ function extractVideoInfoV3WithSegmentation(
1154
  return videosInfo;
1155
  }
1156
 
1157
- // Metadata loading for v3.0 episodes
1158
- async function loadEpisodeMetadataV3Simple(
 
 
 
1159
  repoId: string,
1160
  version: string,
1161
- episodeId: number,
1162
- ): Promise<EpisodeMetadataV3> {
1163
- // Pattern: meta/episodes/chunk-{chunk_index:03d}/file-{file_index:03d}.parquet
1164
- // Most datasets have all episodes in chunk-000/file-000, but episodes can be split across files
1165
-
1166
- let episodeRow = null;
1167
  let fileIndex = 0;
1168
- const chunkIndex = 0; // Episodes are typically in chunk-000
1169
-
1170
- // Try loading episode metadata files until we find the episode
1171
- while (!episodeRow) {
1172
- const episodesMetadataPath = buildV3EpisodesMetadataPath(
1173
- chunkIndex,
1174
- fileIndex,
1175
- );
1176
- const episodesMetadataUrl = buildVersionedUrl(
1177
- repoId,
1178
- version,
1179
- episodesMetadataPath,
1180
- );
1181
 
 
 
 
 
1182
  try {
1183
- const arrayBuffer = await fetchParquetFile(episodesMetadataUrl);
1184
- const episodesData = await readParquetAsObjects(arrayBuffer, []);
1185
-
1186
- if (episodesData.length === 0) {
1187
- // Empty file, try next one
1188
- fileIndex++;
1189
- continue;
1190
- }
1191
 
1192
- // Find the row for the requested episode by episode_index
1193
- for (const row of episodesData) {
1194
- const parsedRow = parseEpisodeRowSimple(row);
 
 
 
1195
 
1196
- if (parsedRow.episode_index === episodeId) {
1197
- episodeRow = row;
1198
- break;
1199
- }
1200
- }
1201
 
1202
- if (!episodeRow) {
1203
- // Not in this file, try the next one
1204
- fileIndex++;
 
 
 
 
 
 
 
1205
  }
1206
- } catch {
1207
- // File doesn't exist - episode not found
1208
- throw new Error(
1209
- `Episode ${episodeId} not found in metadata (searched up to file-${fileIndex.toString().padStart(PADDING.CHUNK_INDEX, "0")}.parquet)`,
1210
- );
1211
  }
1212
  }
1213
-
1214
- // Convert the row to a usable format
1215
- return parseEpisodeRowSimple(episodeRow);
1216
  }
1217
 
1218
  // Simple parser for episode row - focuses on key fields for episodes
@@ -1522,47 +1514,35 @@ export async function loadAllEpisodeFrameInfo(
1522
  );
1523
 
1524
  if (version === "v3.0") {
1525
- let fileIndex = 0;
1526
- while (true) {
1527
- const path = `meta/episodes/chunk-000/file-${fileIndex.toString().padStart(3, "0")}.parquet`;
1528
- try {
1529
- const buf = await fetchParquetFile(
1530
- buildVersionedUrl(repoId, version, path),
1531
- );
1532
- const rows = await readParquetAsObjects(buf, []);
1533
- if (rows.length === 0 && fileIndex > 0) break;
1534
- for (const row of rows) {
1535
- const epIdx = Number(row["episode_index"] ?? 0);
1536
- if (sampledEpisodeSet && !sampledEpisodeSet.has(epIdx)) continue;
1537
- for (const cam of cameras) {
1538
- const cIdx = Number(
1539
- row[`videos/${cam}/chunk_index`] ?? row["video_chunk_index"] ?? 0,
1540
- );
1541
- const fIdx = Number(
1542
- row[`videos/${cam}/file_index`] ?? row["video_file_index"] ?? 0,
1543
- );
1544
- const fromTs = Number(
1545
- row[`videos/${cam}/from_timestamp`] ??
1546
- row["video_from_timestamp"] ??
1547
- 0,
1548
- );
1549
- const toTs = Number(
1550
- row[`videos/${cam}/to_timestamp`] ??
1551
- row["video_to_timestamp"] ??
1552
- 30,
1553
- );
1554
- const videoPath = `videos/${cam}/chunk-${cIdx.toString().padStart(3, "0")}/file-${fIdx.toString().padStart(3, "0")}.mp4`;
1555
- framesByCamera[cam].push({
1556
- episodeIndex: epIdx,
1557
- videoUrl: buildVersionedUrl(repoId, version, videoPath),
1558
- firstFrameTime: fromTs,
1559
- lastFrameTime: Math.max(0, toTs - 0.05),
1560
- });
1561
- }
1562
  }
1563
- fileIndex++;
1564
- } catch {
1565
- break;
1566
  }
1567
  }
1568
  return { cameras, framesByCamera };
@@ -1704,28 +1684,16 @@ export async function loadCrossEpisodeActionVariance(
1704
  const allEps: EpMeta[] = [];
1705
 
1706
  if (version === "v3.0") {
1707
- let fileIndex = 0;
1708
- while (true) {
1709
- const path = `meta/episodes/chunk-000/file-${fileIndex.toString().padStart(3, "0")}.parquet`;
1710
- try {
1711
- const buf = await fetchParquetFile(
1712
- buildVersionedUrl(repoId, version, path),
1713
- );
1714
- const rows = await readParquetAsObjects(buf, []);
1715
- if (rows.length === 0 && fileIndex > 0) break;
1716
- for (const row of rows) {
1717
- const parsed = parseEpisodeRowSimple(row);
1718
- allEps.push({
1719
- index: parsed.episode_index,
1720
- chunkIdx: parsed.data_chunk_index,
1721
- fileIdx: parsed.data_file_index,
1722
- from: parsed.dataset_from_index,
1723
- to: parsed.dataset_to_index,
1724
- });
1725
- }
1726
- fileIndex++;
1727
- } catch {
1728
- break;
1729
  }
1730
  }
1731
  } else {
 
1154
  return videosInfo;
1155
  }
1156
 
1157
+ // Walks v3.0 episode-metadata parquet files across chunks/files. A new chunk
1158
+ // begins when the current chunk's files run out (404 or empty); iteration ends
1159
+ // when file-000 of the next chunk 404s. `chunks_size` caps files per chunk, so
1160
+ // large datasets can spill past chunk-000.
1161
+ async function* iterateEpisodeMetadataFilesV3(
1162
  repoId: string,
1163
  version: string,
1164
+ ): AsyncGenerator<Record<string, unknown>[], void, unknown> {
1165
+ let chunkIndex = 0;
 
 
 
 
1166
  let fileIndex = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
1167
 
1168
+ while (true) {
1169
+ const path = buildV3EpisodesMetadataPath(chunkIndex, fileIndex);
1170
+ const url = buildVersionedUrl(repoId, version, path);
1171
+ let rows: Record<string, unknown>[];
1172
  try {
1173
+ const buf = await fetchParquetFile(url);
1174
+ rows = await readParquetAsObjects(buf, []);
1175
+ } catch {
1176
+ if (fileIndex === 0) return;
1177
+ chunkIndex++;
1178
+ fileIndex = 0;
1179
+ continue;
1180
+ }
1181
 
1182
+ if (rows.length === 0) {
1183
+ if (fileIndex === 0) return;
1184
+ chunkIndex++;
1185
+ fileIndex = 0;
1186
+ continue;
1187
+ }
1188
 
1189
+ yield rows;
1190
+ fileIndex++;
1191
+ }
1192
+ }
 
1193
 
1194
+ // Metadata loading for v3.0 episodes
1195
+ async function loadEpisodeMetadataV3Simple(
1196
+ repoId: string,
1197
+ version: string,
1198
+ episodeId: number,
1199
+ ): Promise<EpisodeMetadataV3> {
1200
+ for await (const rows of iterateEpisodeMetadataFilesV3(repoId, version)) {
1201
+ for (const row of rows) {
1202
+ if (parseEpisodeRowSimple(row).episode_index === episodeId) {
1203
+ return parseEpisodeRowSimple(row);
1204
  }
 
 
 
 
 
1205
  }
1206
  }
1207
+ throw new Error(`Episode ${episodeId} not found in metadata`);
 
 
1208
  }
1209
 
1210
  // Simple parser for episode row - focuses on key fields for episodes
 
1514
  );
1515
 
1516
  if (version === "v3.0") {
1517
+ for await (const rows of iterateEpisodeMetadataFilesV3(repoId, version)) {
1518
+ for (const row of rows) {
1519
+ const epIdx = Number(row["episode_index"] ?? 0);
1520
+ if (sampledEpisodeSet && !sampledEpisodeSet.has(epIdx)) continue;
1521
+ for (const cam of cameras) {
1522
+ const cIdx = Number(
1523
+ row[`videos/${cam}/chunk_index`] ?? row["video_chunk_index"] ?? 0,
1524
+ );
1525
+ const fIdx = Number(
1526
+ row[`videos/${cam}/file_index`] ?? row["video_file_index"] ?? 0,
1527
+ );
1528
+ const fromTs = Number(
1529
+ row[`videos/${cam}/from_timestamp`] ??
1530
+ row["video_from_timestamp"] ??
1531
+ 0,
1532
+ );
1533
+ const toTs = Number(
1534
+ row[`videos/${cam}/to_timestamp`] ??
1535
+ row["video_to_timestamp"] ??
1536
+ 30,
1537
+ );
1538
+ const videoPath = `videos/${cam}/chunk-${cIdx.toString().padStart(3, "0")}/file-${fIdx.toString().padStart(3, "0")}.mp4`;
1539
+ framesByCamera[cam].push({
1540
+ episodeIndex: epIdx,
1541
+ videoUrl: buildVersionedUrl(repoId, version, videoPath),
1542
+ firstFrameTime: fromTs,
1543
+ lastFrameTime: Math.max(0, toTs - 0.05),
1544
+ });
 
 
 
 
 
 
 
 
 
1545
  }
 
 
 
1546
  }
1547
  }
1548
  return { cameras, framesByCamera };
 
1684
  const allEps: EpMeta[] = [];
1685
 
1686
  if (version === "v3.0") {
1687
+ for await (const rows of iterateEpisodeMetadataFilesV3(repoId, version)) {
1688
+ for (const row of rows) {
1689
+ const parsed = parseEpisodeRowSimple(row);
1690
+ allEps.push({
1691
+ index: parsed.episode_index,
1692
+ chunkIdx: parsed.data_chunk_index,
1693
+ fileIdx: parsed.data_file_index,
1694
+ from: parsed.dataset_from_index,
1695
+ to: parsed.dataset_to_index,
1696
+ });
 
 
 
 
 
 
 
 
 
 
 
 
1697
  }
1698
  }
1699
  } else {
src/utils/constants.ts CHANGED
@@ -37,8 +37,29 @@ export const HTTP = {
37
  TIMEOUT_MS: 10000,
38
  } as const;
39
 
40
- // Excluded columns by dataset version
 
 
 
41
  export const EXCLUDED_COLUMNS = {
42
- V2: ["timestamp", "frame_index", "episode_index", "index", "task_index"],
43
- V3: ["index", "task_index", "episode_index", "frame_index", "next.done"],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  } as const;
 
37
  TIMEOUT_MS: 10000,
38
  } as const;
39
 
40
+ // Excluded columns by dataset version.
41
+ // Reserved names from lerobot: `next.reward`, `next.done`, `next.truncated` are
42
+ // auto-populated step signals and should not be rendered as chart series.
43
+ // `subtask_index` is the v3.0 subtask pointer (maps into meta/subtasks.parquet).
44
  export const EXCLUDED_COLUMNS = {
45
+ V2: [
46
+ "timestamp",
47
+ "frame_index",
48
+ "episode_index",
49
+ "index",
50
+ "task_index",
51
+ "next.reward",
52
+ "next.done",
53
+ "next.truncated",
54
+ ],
55
+ V3: [
56
+ "index",
57
+ "task_index",
58
+ "episode_index",
59
+ "frame_index",
60
+ "next.reward",
61
+ "next.done",
62
+ "next.truncated",
63
+ "subtask_index",
64
+ ],
65
  } as const;