I'm trying to open and parse bag file. Using the code below.
window.setImmediate = window.setTimeout;
import { open } from 'rosbag';
const inputElement = document.getElementById("input");
inputElement.addEventListener("change", handleFiles, false);
function handleFiles() {
const fileList = this.files;
console.log(fileList[0]);
const bag = open(fileList[0]);
}
The file selection and the console.log(filelist[0]) seems Ok.
But then I get in the console:
index.ts:66 Uncaught (in promise)
Uint8Array(13) [35, 82, 79, 83, 66, 65, 71, 32, 86, 50, 46, 48, 10, buffer: ArrayBuffer(13), byteLength: 13, byteOffset: 0, length: 13, Symbol(Symbol.toStringTag): 'Uint8Array']
open @ index.ts:66
await in open (async)
handleFiles @ rosbag_load_example.js?t=1690294141697:59
Show 1 more frame