Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Sync from huggingface/lerobot-dataset-visualizer via hub-sync
Browse filesFiles changed (2)
1261 unmodified lines12621263126412651266126712681269127012711261 unmodified linesfor (const [key, components] of Object.entries(frames.series)) {if (!info.features[key] || excludedColumns.includes(key)) continue;if (hasHandTracking(info) && isHandGeometryColumn(key)) continue;const names =frames.names[key]?.length === components.length? frames.names[key]: undefined;components.forEach((values, i) => {const suffix = names?.[i] ?? (components.length > 1 ? i : undefined);series.push([1261 unmodified lines1262126312641265126612671268126912701271127212731261 unmodified linesfor (const [key, components] of Object.entries(frames.series)) {if (!info.features[key] || excludedColumns.includes(key)) continue;if (hasHandTracking(info) && isHandGeometryColumn(key)) continue;/// The reader skips names nested in one more list, like Unitree's `[["kLeftShoulderPitch", ...]]`.const nested = (info.features[key].names as unknown[] | null)?.[0];const declared =frames.names[key] ??(Array.isArray(nested) ? (nested as string[]) : undefined);const names = declared?.length === components.length ? declared : undefined;components.forEach((values, i) => {const suffix = names?.[i] ?? (components.length > 1 ? i : undefined);series.push([
175 unmodified lines17617717817918018118224 unmodified lines2072082092102112128 unmodified lines221222223224225226227175 unmodified linesreturn groups;}// Unitree G1 SDK column suffix → URDF joint nameconst G1_SDK_TO_URDF: Record<string, string> = {"klefthippitch.q": "left_hip_pitch_joint","klefthiproll.q": "left_hip_roll_joint",24 unmodified lines"krightwristroll.q": "right_wrist_roll_joint","krightwristpitch.q": "right_wrist_pitch_joint","krightwristyaw.q": "right_wrist_yaw_joint",};function autoMatchJoints(8 unmodified lines// Build reverse lookup: URDF joint name → column key (for G1 SDK-style columns)const g1Reverse = new Map<string, string>();for (let i = 0; i < suffixes.length; i++) {const urdfName = G1_SDK_TO_URDF[suffixes[i]];if (urdfName) g1Reverse.set(urdfName, columnKeys[i]);}175 unmodified lines17617717817918018118224 unmodified lines2072082092102112122132142152162172182192202212222232242252268 unmodified lines235236237238239240241242175 unmodified linesreturn groups;}// Unitree G1 SDK column suffix → URDF joint name. Unitree's own datasets leave out the `.q`.const G1_SDK_TO_URDF: Record<string, string> = {"klefthippitch.q": "left_hip_pitch_joint","klefthiproll.q": "left_hip_roll_joint",24 unmodified lines"krightwristroll.q": "right_wrist_roll_joint","krightwristpitch.q": "right_wrist_pitch_joint","krightwristyaw.q": "right_wrist_yaw_joint","klefthandthumb0.q": "left_hand_thumb_0_joint","klefthandthumb1.q": "left_hand_thumb_1_joint","klefthandthumb2.q": "left_hand_thumb_2_joint","klefthandmiddle0.q": "left_hand_middle_0_joint","klefthandmiddle1.q": "left_hand_middle_1_joint","klefthandindex0.q": "left_hand_index_0_joint","klefthandindex1.q": "left_hand_index_1_joint","krighthandthumb0.q": "right_hand_thumb_0_joint","krighthandthumb1.q": "right_hand_thumb_1_joint","krighthandthumb2.q": "right_hand_thumb_2_joint","krighthandmiddle0.q": "right_hand_middle_0_joint","krighthandmiddle1.q": "right_hand_middle_1_joint","krighthandindex0.q": "right_hand_index_0_joint","krighthandindex1.q": "right_hand_index_1_joint",};function autoMatchJoints(8 unmodified lines// Build reverse lookup: URDF joint name → column key (for G1 SDK-style columns)const g1Reverse = new Map<string, string>();for (let i = 0; i < suffixes.length; i++) {const urdfName =G1_SDK_TO_URDF[suffixes[i]] ?? G1_SDK_TO_URDF[`${suffixes[i]}.q`];if (urdfName) g1Reverse.set(urdfName, columnKeys[i]);}
src/app/[org]/[dataset]/[episode]/fetch-data.ts+6-4
src/components/urdf-viewer.tsx+17-2