TL;DR
- Install Foxglove in 2 minutes via desktop, web, or Docker.
- Connect to ROS 2 with
ros2 topic listand Foxglove’s ROS bridge. - Visualize MCAP logs faster than ROS Bag files (use
mcap record). - Build dashboards with drag-and-drop panels for 3D, images, and plots.
- Debug live vs. recorded data with time-sync controls.
- Extend Foxglove with custom TypeScript panels for proprietary schemas.
1. Installing Foxglove and Connecting to ROS 2
Install Foxglove
Choose your method:
Desktop (Recommended for ROS 2)
# macOS (Homebrew)
brew install --cask foxglove-studio
# Linux (AppImage)
wget https://github.com/foxglove/studio/releases/download/v2.12.0/FoxgloveStudio-2.12.0.AppImage
chmod +x FoxgloveStudio-*.AppImage
./FoxgloveStudio-*.AppImage
# Windows (Winget)
winget install Foxglove.FoxgloveStudio
Web App (No Install)
Open https://app.foxglove.dev in Chrome/Firefox.
Docker (For CI/CD)
docker run -p 8080:8080 foxglove/studio
Connect to ROS 2
-
Verify ROS 2 is running:
ros2 topic listExample output:
/cmd_vel /scan /tf /odom -
Launch Foxglove and connect:
- Open Foxglove → Click "Connect" → Select "ROS 2".
- Enter your ROS 2 domain ID (default:
0):ros2 run foxglove_bridge foxglove_bridge --ros-domain-id 0 - In Foxglove, select the same domain ID.
-
Expected Output:
- Foxglove will list all ROS 2 topics. Click "Subscribe" to start streaming.
2. The MCAP Log Format
Why MCAP?
MCAP (Micro-Format for ROS Data) is faster and smaller than ROS Bag files Source: MCAP Spec. Use it for:
- Large robot datasets.
- Cloud storage (e.g., Foxglove Data Platform).
Record MCAP Data
# Install MCAP tools
pip install rosbags-mcap
# Record from ROS 2 topics
ros2 bag record -a --storage mcap -o my_robot_data.mcap
Playback in Foxglove
- Open Foxglove → Drag
my_robot_data.mcapinto the app. - Use the time slider to scrub through data.
3. Building Visualization Layouts
Create a Dashboard
-
Add Panels:
- Drag "3D Panel", "Image Panel", or "Plot Panel" from the left sidebar.
- Example: Visualize
/scan(LiDAR) in 3D and/image_rawas an image.
-
Save Layout:
# Export as JSON foxglove studio export-layout --output my_dashboard.jsonExample
my_dashboard.json:{ "panels": [ { "type": "3D", "topic": "/scan", "frame": "base_link" }, { "type": "Image", "topic": "/image_raw" } ] } -
Load Layout:
- Open Foxglove → "Load Layout" → Select
my_dashboard.json.
- Open Foxglove → "Load Layout" → Select
4. 3D, Image, and Plot Panels
3D Panel (LiDAR/URDF)
- Add a 3D Panel → Select
/scantopic. - Configure:
- Set
frametobase_link(from/tf). - Enable "Show TF Frames" to visualize robot pose.
- Set
Image Panel (Camera)
- Add an Image Panel → Select
/image_raw. - Adjust:
- Set
encodingtobgr8(common for ROS 2 cameras).
- Set
Plot Panel (Time-Series)
- Add a Plot Panel → Select
/odom/pose/pose/position/x. - Customize:
- Add a second series:
/twist/twist/linear/x. - Use "Auto-Scale" for dynamic ranges.
- Add a second series:
5. Live Debugging vs. Recorded Playback
Live Debugging
- Stream ROS 2 data in real-time:
ros2 run foxglove_bridge foxglove_bridge --ros-domain-id 0 - Pause/Resume playback with the time controls.
Recorded Playback
- Load an MCAP file:
foxglove studio open my_robot_data.mcap - Sync Time:
- Use "Time Sync" to align multiple logs.
6. Custom Extensions and Message Schemas
Add a Custom Panel
- Create a TypeScript extension:
npx @foxglove/create-extension my-custom-panel cd my-custom-panel - Edit
src/panel.ts:import { Panel } from '@foxglove/studio'; export class MyCustomPanel extends Panel { render() { return <div>Custom visualization for my_topic</div>; } } - Build and Load:
npm run build foxglove studio load-extension ./dist
Define Custom Message Schemas
- Add a schema in
foxglove.config.json:{ "schemas": { "my_namespace/MyMessage": { "fields": [ {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"} ] } } } - Use in Foxglove:
- Select the topic → Foxglove will parse the custom schema.
7. Team Workflows for Fleet Debugging
Share a Live Session
- Host a session:
foxglove studio share --port 8080 - Invite teammates to https://app.foxglove.dev with the link.
Cloud Storage (Foxglove Data Platform)
- Upload data:
foxglove data upload my_robot_data.mcap - Access in Foxglove:
- Sign in → Select "Cloud" → Load the dataset.
What’s Next?
- Record and analyze a full robot mission with
mcap record. - Build a custom dashboard for your robot’s key metrics.
- Extend Foxglove with a TypeScript panel for proprietary topics.
For Physical AI infrastructure and deployment, explore Hyperion’s tools for embodied VLA systems and edge runtimes. Contact us to discuss your project.
