MCPcopy Create free account
hub / github.com/Hussain004/BAGEL

github.com/Hussain004/BAGEL @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,263 symbols 3,113 edges 156 files ⚖ MIT 145 documented · 11% ● updated 10d agov1.7.1 · 2026-10-13★ 571 open issues

Browse by type

⨍ Functions 995◇ Types & classes 268
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BAGEL Logo

BAGEL

BAG ExpLoration: ROS Bag File Web Visualizer

Explore ROS1 & ROS2 bag files in your browser. No installation required.

License: MIT TypeScript React Vite Version

→ Live Demo · Report Bug · Request Feature

https://github.com/user-attachments/assets/4c1ed742-f896-475b-acfb-61aa1adc062c

BAGEL in 25 seconds. The robot recording is the r2b_hallway sequence from the NVIDIA r2b dataset 2023 (CC BY 4.0). The Gaussian splat is "Knock Community Hall" by scbenoit (CC BY 4.0).

If BAGEL saves you a ROS install, a ⭐ helps other robotics folks find it.


What is BAGEL?

BAGEL is a fully static web application that lets you explore ROS bag files (.mcap, .db3, .bag), PX4 flight logs (.ulg), standalone point cloud files (.pcd, .ply, .las, .laz), and 3D Gaussian Splat scenes (.ply, .splat, .ksplat) entirely in your browser needing no server, no installation, no account. Just drag and drop!

Robotics engineers and researchers frequently generate bag files during experiments, SLAM runs, and sensor calibration. Inspecting these files currently requires a full ROS1 or ROS2 installation, Foxglove Studio (increasingly commercial), or writing custom Python scripts for every inspection task.

BAGEL eliminates this friction.

Why BAGEL?

Problem BAGEL Solution
Need ROS1/ROS2 installed to inspect bag files Works in any modern browser
Foxglove Studio going commercial 100% open source, MIT licensed
ros2 bag info gives text-only output Rich visual interface with search & filtering
Can't share bag contents easily Zero-install, you can send anyone the URL
Students struggle with ROS tooling No setup required, just drag and drop
Legacy ROS1 bags require old toolchains Drag the .bag straight in (no conversion needed)

Demo

Quick tour with the bundled sample bag

https://github.com/user-attachments/assets/a6078f92-e461-4a90-8af3-f3cedb521621

Data featured in this demo is from the excellent open-access M2DGR dataset provided by the SJTU-ViSYS team, which was instrumental in stress-testing this visualizer's spatial rendering capabilities.


Features

A condensed feature list is below. Detailed version-by-version release notes (with the design rationale behind every feature) live in FEATURES.md.

File formats and live sources

Format Notes
ROS2 .mcap Including zstd-compressed chunks (the new ROS2 default). Foxglove JSON-encoded channels (encoding: "json") supported from v1.6.1, and protobuf channels (encoding: "protobuf", decoded from the descriptor set in the file, so no .proto files are needed).
ROS2 .db3 SQLite via sql.js / WASM; past 48 MB from a URL or 1 GB from disk, BAGEL's own read-only SQLite page reader, which fetches only the pages it needs
ROS1 .bag Including bz2 and lz4 compressed chunks
Split recordings Pick or drop all the parts of a ros2 bag record --max-bag-size run (name_0.mcap, name_1.mcap, ...), a ROS1 --split recording, or the bag folder itself, and they open as one recording. Works for .mcap, .db3 and .bag.
Remote URLs HTTP Range requests, so only the chunks you scrub through hit the network. .mcap / .bag stream lazily. A .db3 past 48 MB streams too: opening reads the table's leaf pages (about one page per message), not the blobs, and each message is fetched when shown.
Foxglove annotations foxglove.ImageAnnotations (circles, polylines, points, text) draw over a camera image: pick the topic from the image panel's annotations dropdown. foxglove.SceneUpdate (cubes, spheres, cylinders, arrows, lines, triangles, text) draws in the 3D panel like a MarkerArray, with each entity replacing its previous self. Works in MCAP files and over a live bridge, whether the messages are JSON or protobuf.
Foxglove WebSocket (v1.5.0) Paste a ws:// or wss:// URL to connect to a live robot running foxglove_bridge or rosbridge_suite. All panels update in real time. Per-topic ring buffer holds the last 10,000 messages per topic; Follow/Pause button lets you scrub back into history without disconnecting. Auto-reconnect with exponential backoff.
.pcd point clouds (v1.6.0) All three PCD 0.7 encodings: ascii, binary, binary_compressed (LZF). All color modes (height, intensity, rgb, single). Feeds directly into the ThreeDScene panel via a synthetic sensor_msgs/PointCloud2 message.
.ply point clouds (v1.6.0) ASCII + binary_little_endian + binary_big_endian. RGB from red/green/blue uchar properties or packed rgb float. Drop a .ply and the cloud appears instantly in the 3D panel with all existing color, range-filter, and accumulator settings.
.las / .laz LiDAR tiles ASPRS LAS 1.0 to 1.4, point formats 0 to 10 (compressed .laz: 0 to 3 and 6 to 8, decoded by the laz-perf WASM build in the parser worker). Colour by height, intensity, RGB or ASPRS classification (ground, vegetation, buildings, water and so on). Survey coordinates are shifted to a local origin near the data, and tiles over 2 million points are thinned evenly at load. Cloud-optimized .copc.laz files are read node by node over HTTP Range (or from a local file), so a multi-GB tile opens without downloading it: whole octree levels load until about 600k points, and setting the 3D clip box spends that budget on deeper detail inside the box.
Gaussian Splats (v1.7.0) Splat-flavored .ply (detected by header, not extension - a plain colored-point-cloud .ply still opens in the regular 3D panel), plus .splat and .ksplat. Opens in a dedicated Splat panel with outlier-robust camera auto-fit, shift+click custom orbit pivot, keyboard fly-through and orbit controls (W/S/A/D/Q/E/R/F/Z/C), B/N/I/K/U/J shortcuts to spin the splat itself on all three axes instead of moving the camera, and a V shortcut to cycle up-axis orientation presets.

Visualization panels

  • TimeSeriesPlot: chart any numeric leaf field (linear.x, orientation.w, etc.) on uPlot. Math expressions as derived series: type field_a * 2 + field_b in the series editor to plot any arithmetic combination of fields from the same topic without writing code. (v1.4.1)
  • ImageViewer: sensor_msgs/Image (rgb8 / bgr8 / rgba8 / mono8 / mono16) and CompressedImage (jpeg / png) with lazy single-message reads. Foxglove equivalents (foxglove.RawImage, foxglove.CompressedImage) supported via JSON schema translation. (v1.6.1) H264/H265, VP9 and AV1 video via foxglove.CompressedVideo using the browser's WebCodecs VideoDecoder with a fast keyframe index for efficient seeking. (v1.6.2) Scroll to zoom (cursor-centered), drag to pan, double-click to reset; zoom percentage shown in the footer. (v1.6.3) Optional sensor_msgs/CameraInfo overlay (principal-point reticle + focal-length badge + calibration-likely-unfilled chip) toggles from the panel header. (v1.3.2) undistort button applies per-frame undistortion using the paired CameraInfo's D coefficients, for every ROS distortion model: plumb_bob (Brown-Conrady), rational_polynomial, and equidistant (Kannala-Brandt, also accepted as fisheye, the same model OpenCV and Kalibr use). The footer names the model in use, and LiDAR projection and detection boxes follow the same model. (v1.3.4)
  • ThreeDScene (Three.js): PointCloud2, LaserScan, MarkerArray (all twelve primitives: CUBE / SPHERE / CYLINDER / ARROW / LINE_STRIP / LINE_LIST / CUBE_LIST / SPHERE_LIST / POINTS / TEXT_VIEW_FACING / MESH_RESOURCE / TRIANGLE_LIST from v1.3.1), OccupancyGrid, pose markers, camera frustums for every sensor_msgs/CameraInfo topic with per-camera hide checkboxes on multi-camera rigs (v1.3.2 / v1.3.4). Custom orbit pivot, range filter, point accumulation, configurable up-axis.
  • Spatial topic layers (v1.7.1): Open any 3D panel, then use Display > Overlays > scene topics to add maps, point clouds, laser scans, and odometry or pose topics to the same TF-aligned scene. This supports workflows such as an OccupancyGrid base map with live LiDAR points and the robot odometry pose on top. Per-overlay point size and flat-color overrides keep stacked layers visually distinct. A top-down orthographic 2D projection mode (with a zoom slider synced to scroll/pinch) reads an overlaid scene like a floor plan instead of a 3D orbit.
  • SplatViewer (v1.7.0): dedicated 3D Gaussian Splat renderer for splat-flavored .ply / .splat / .ksplat / .spz files, built on @mkkellogg/gaussian-splats-3d. Outlier-robust camera auto-fit (ignores stray "floater" splats a naive bounding-box fit would get wrecked by), shift+click custom orbit pivot, and keyboard fly-through: W/S forward-back, A/D strafe, Q/E turn, R/F up-down, Z/C orbit around the pivot, active while hovering the panel. B/N, I/K, U/J spin the splat itself around the pivot on the Z/X/Y axes respectively, instead of moving the camera - useful for viewing it from a new angle or correcting a multi-axis tilt without the camera's perspective changing. V cycles up-axis orientation presets, since gaussian-splatting exports don't follow one universal up-axis convention.
  • TrajectoryPlot: Odometry / Pose / PoseWithCovariance / TransformStamped / NavSatFix as a 2D polyline, with an opt-in OpenStreetMap tile underlay for GPS traces.
  • TFTree: /tf + /tf_static hierarchy with current transforms at the playhead time.
  • DiagnosticArray: swimlane timeline + at-playhead inspector for diagnostic_msgs/DiagnosticArray. (v1.0)
  • Log (rosout): virtualised list for rcl_interfaces/Log and rosgraph_msgs/Log with severity, node-name, and full-text filters. (v1.0)
  • RawMessageInspector: collapsible JSON tree of the deserialized message at the playhead.

All panels resolve header.frame_id through /tf + /tf_static against a user-selected world frame.

Multi-bag overlay

  • Drop multiple bags into the same session; each gets a colour tint that flows through every panel.
  • Three time-alignment modes: wall-clock, bag-start, and anchor (with a "Set anchor" picker UI in v1.0 so you can lock runs to a physical sync event).
  • Per-bag parser Web Worker so parsing bag B doesn't queue behind bag A's decode.

Layout, sharing, and export

  • Drag-to-dock VSCode-style panel layout. Per-panel state (3D display settings, plot zoom, TF selection) survives docking.
  • Sharable URL hashes encode layout + playhead + bag URL + per-bag anchors. v0.5 / v0.7 / v0.9 hash forms still parse, so old links keep working.
  • Per-topic CSV / NDJSON export from every panel header.
  • Bag editing / MCAP clip export: trim the time range, drop topics you don't need, download a fresh indexed .mcap. Replaces the mcap filter CLI workflow for the common cuts. v1.2 extends the editor to ROS1 .bag and ROS2 .db3 inputs alongside MCAP - output is always MCAP regardless of input format. .db3 topics whose type isn't in BAGEL's bundled registry are flagged in the modal and excluded by default; opt them in to include them with a schema-less channel. (v1.1 / v1.2)
  • Paste-your-own .msg schema flow for ROS2 .db3 topics whose types aren't in the bundled registry. Persisted across sessions in localStorage.
  • Clip export: Export button in the Toolbar renders any open panel (Image, Plot, Trajectory, or 3D Scene) frame-by-frame to a PNG zip or MP4 video (WebM fallback on browsers that cannot record MP4). Uses a frame-sync protocol (seek playhead, 2x rAF + 250 ms settle, canvas.toBlob()) so every panel type captures correctly. PNG frames are zipped with fflate at level 0 (no re-compression of already-deflated PNGs); video uses a two-phase MediaRecorder + captureStream(0) + requestFrame() approach so video playback speed is always correct. (v1.4.2)
  • Timeline zoom: scroll over the bar (or pinch on a trackpad or touchscreen) to zoom in around the cursor, shift+scroll or two fingers to pan, and + / - / 0 with the bar focused (or the magnifier buttons) to zoom in, out and back to the whole recording. While zoomed, an overview strip above the bar shows which part you are looking at: drag its box to pan, drag its edges to resize, click elsewhere to jump. The density heatmap, bookmarks, ranges and per-topic lanes all follow the zoomed window, and playback scrolls it along to keep the playhead in view. Down to one millisecond across the bar; live connections are not zoomable.
  • Timeline bookmarks: drop named markers at any timestamp on the scrubber (double-click the bar, click the + button, or press M), click a tick to seek, hover to see the label. Bookmarks persist to localStorage per bag and are encoded in the URL hash (bm=) for sharing. (v1.4.3)

Robot model (URDF) overlay (v1.3.0)

  • Drop a .urdf and the robot appears in every 3D panel, anchored to its root link in world space via the bag's /tf stream. Joints animate from sensor_msgs/JointState (auto-detected) when the bag publishes it; static URDFs render at their rest pose. A toolbar "Robot" button opens the load modal; the Display card in

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 847
Interface 222
Method 148
Class 46

Languages

TypeScript100%

Modules by API surface

src/components/panels/ThreeDScene/index.tsx40 symbols
src/parsers/mcap.ts39 symbols
src/components/panels/ThreeDScene/markerObjects.ts37 symbols
src/parsers/urdf.ts35 symbols
tests/fixtures/synth.ts34 symbols
src/workers/parserClient.ts31 symbols
src/components/layout/Toolbar.tsx29 symbols
scripts/build-sample-bag.mjs27 symbols
src/parsers/db3.ts26 symbols
src/components/panels/ImageViewer/index.tsx26 symbols
src/parsers/source.ts24 symbols
src/workers/parser.worker.ts22 symbols

For agents

$ claude mcp add BAGEL \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page