Load local and remote MCAP files containing ROS 2 data, or connect directly to a live ROS 2 stack.
Live data
Install ROS 2, and make sure you are on the same network as the robot.
In Foxglove, select "Open connection" in the "Open data source" dialog.
Foxglove WebSocket
We recommend Foxglove WebSocket as the easiest way to get connected – especially if you have a network firewall between ROS and Foxglove, as it requires your ROS host to have only one port open.
This option requires running an extra ROS node (foxglove_bridge
) – follow the installation directions here.
Connect
Select "Foxglove WebSocket" in the "Open data source" dialog, then enter the URL to your Foxglove bridge server:
Limitations
Foxglove WebSocket connections support publishing back to your ROS stack, as well as reading and setting ROS parameters.
Rosbridge
NOTE: For performance reasons, we recommend using the Foxglove WebSocket connection instead.
Limitations
Rosbridge connections support publishing back to your ROS stack, but not reading or setting ROS parameters.
Remote file
Remote ROS 2 .db3
files are not supported, but you can convert them into MCAP files for remote file support.
Select "Remote file" in the "Open data source" dialog, and enter the URL to your remote .mcap
file.
Local data
You must first convert ROS 2 (.db3
) files into the supported MCAP file format before loading in Foxglove.
Use the mcap
CLI tool to help with this conversion:
$ mcap convert ros2_input.db3 ros2_output.mcap
mcap
will search the path stored in your $AMENT_PREFIX_PATH
environment variable to locate the ROS message definitions on your hard drive. You can also specify a colon-separated list of directories for the CLI tool to search using the ament-prefix-path
flag:
$ mcap convert ros2_input.db3 ros2_output.mcap --ament-prefix-path=/your/first/directory;/your/second/directory
Once you have your MCAP (.mcap
) file, you're ready to load it for visualization.
Imported data
First convert your ROS 2 files to MCAP.