diff --git a/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/buildTimeline.ts b/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/buildTimeline.ts index 754c6865..536c6e89 100644 --- a/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/buildTimeline.ts +++ b/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/buildTimeline.ts @@ -21,10 +21,10 @@ export function buildTimeline(entries: LogEntry[]): TimelineData { yaw: pose.yaw ?? 0, pitch: pose.pitch ?? 0, roll: pose.roll ?? 0, - metadata: entry.key === "vehicle" ? { ...entry.data } : undefined, + metadata: entry.type === "VehicleState" ? { ...entry.data } : undefined, }; - if (entry.key === "vehicle") { + if (entry.type === "VehicleState") { vehicle.push(frame); } else if (entry.type === "PedestrianState") { const key = entry.key.trim(); diff --git a/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/parseLogFile.ts b/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/parseLogFile.ts index 80cf98f8..cd7887ae 100644 --- a/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/parseLogFile.ts +++ b/GEMstack/onboard/visualization/sr_viz/threeD/src/utils/parseLogFile.ts @@ -17,7 +17,7 @@ export async function parseLogFile(file: File): Promise { key === 'vehicle' && 'type' in value && 'data' in value && - (value as any).data?.pose?.frame === 2 + (value as any).type === "VehicleState" ) { entries.push({ key, @@ -35,7 +35,7 @@ export async function parseLogFile(file: File): Promise { typeof agentValue === 'object' && agentValue !== null && 'data' in agentValue && - (agentValue as any).data?.pose?.frame === 0 + (agentValue as any).type === 'AgentState' ) { const inferredType = getTypeFromKey(agentId); entries.push({