ROS 2 - Data display with Foxglove Studio
What is Foxglove Studio? #
Foxglove Studio is an open-source visualization and debugging tool designed for robotics development. It offers an intuitive interface to inspect sensor data such as camera images, point clouds, and transforms in real time.
With Foxglove, developers can monitor and interact with their robotics applications via ROS 2, making it a powerful tool for analyzing and tuning perception systems like those using Stereolabs ZED cameras. In this tutorial, we will go through how to visualize live or recorded ZED data in Foxglove Studio.
Installing and Launching Foxglove Studio #
To get started with Foxglove Studio:
- Download the app for your operating system from the Foxglove Studio Downloads page.
- Once installed, launch Foxglove Studio. You’ll be prompted to set up a data connection—this will be configured to connect to ROS 2 using the Foxglove Bridge.
Running the ZED ROS2 Wrapper #
Prerequisites #
- ZED ROS2 Wrapper installed in your ROS 2 workspace
- a connected ZED camera or SVO file
Launching the ZED node #
source /opt/ros/humble/setup.bash
source ~/your_ros2_ws/install/setup.bash
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=<camera model>
This will start the ZED ROS 2 Wrapper and begin publishing topics such as /zed/zed_node/rgb/image_rect_color, /zed/zed_node/point_cloud, and /tf.
Installing and Running the Foxglove ROS2 Bridge #
To connect ROS 2 to Foxglove Studio, you need to run the ROS Foxglove Bridge, which converts ROS and ROS 2 topics into a WebSocket stream that Foxglove Studio can read.
Installation #
Please take a look at Foxglove’s documentation to make sure the bridge is available in your ROS/ROS2 distribution.
sudo apt install ros-$ROS_DISTRO-foxglove-bridge
Running the bridge #
source /opt/ros/humble/setup.bash
source ~/your_ros2_ws/install/setup.bash
ros2 launch foxglove_bridge foxglove_bridge_launch.xml
By default, the bridge starts a WebSocket server on port 8765.
Connecting Foxglove Studio to ROS 2 #
In Foxglove Studio, click “Open Connection”.
Enter the URL: ws://localhost:8765 and click “Connect”
If you have not already, download Stereolabs’ Foxglove layout, and import it by clicking on “Import from file…” in the top right corner
You should now see your ZED topics available for visualization!
You can add panels like Image, 3D, or Raw Messages to inspect your sensor data in real time.