Skip to main content

ROS 2

Visualize your robot live

The best way to visualize your live ROS 2 robot in Foxglove is using the Foxglove Bridge. It's written using the Foxglove SDK in C++ and is designed for high performance with low overhead. We provide reasonable defaults to help get you up and running quickly, but it's also highly configurable.

We provide multiple ways to install Foxglove Bridge. The steps below assume you want to install from the official ROS package channels using the apt package manager.

1. Install the Foxglove bridge

Install and launch the Foxglove Bridge node:

sudo apt install ros-$ROS_DISTRO-foxglove-bridge
ros2 launch foxglove_bridge foxglove_bridge_launch.xml

The Foxglove Bridge will automatically subscribe to all topics in your ROS system and make them available for live visualization.

note

For ROS 2 distributions older than Humble, you will have to build from source.

2. Connect to your robot:

Ensure Foxglove Bridge is running.

Make sure you are on the same network as your robot. In Foxglove, select Open connection from the dashboard or left-hand menu.

Select open connection

Select Foxglove WebSocket in the Open a new connection dialog, then enter the URL of the server:

Foxglove WebSocket dialog

Click "Open" to connect.

note

Local development: Use ws://localhost:8765 when running the server on the same machine as Foxglove.

Robot connection: Use ws://ROBOT_IP:8765 when connecting to a server running on your robot, where ROBOT_IP is your robot's IP address on the network.

tip

While Foxglove does support rosbridge, we recommend always using the Foxglove Bridge for the best features, performance, and stability.

Explore your data

Your data is now available for exploring in Foxglove. Add some panels to begin visualizing what your robot is seeing and producing. Not sure where to start? Try adding a Raw Messages panel, Plot panel, or 3D panel.

Learn more