Visualization with Lichtblick
Besides RViz, the CPM Lab can be visualized and controlled with Lichtblick, an open-source robotics visualization tool. The CPM Lab provides extensions for Lichtblick that add the Control Center and show the vehicles and their commands in the 3D panel.
Note
Prerequisites: have ROS2 sourced (source /opt/ros/jazzy/setup.bash, see Supported Platforms) and the CPM Lab packages installed, see Install from Debian Packages.
CPM Lab Extensions
The extensions are packaged as .foxe files named <publisher>.<name>.foxe. Their version is the CPM Lab release
they belong to; the downloads below belong to the release this documentation describes (see Lichtblick Release and File Names):
Control Centeradds theCPM control dashboardpanel to start the infrastructure, deploy and run experiments, and follow the control flow.Vehicle State Schema Convertershows each vehicle as a box with ID, pose axes and velocity arrow in the 3D panel.Command Schema Convertershows the commanded path or trajectory of each vehicle in the 3D panel, split into the past and future part.
The matching CPM Lab layout arranges these panels for an experiment.
Lichtblick with the CPM Lab layout: the CPM control dashboard panel and the vehicles in the 3D panel
1. Start the Foxglove Bridge
Lichtblick connects to ROS2 through the Foxglove bridge. Launch it together with the control flow and map visualization nodes:
source /opt/ros/jazzy/setup.bash
export ROS_DOMAIN_ID=21
ros2 launch cpm_lab cpm_lab_foxglove.launch.xml
The bridge listens on ws://localhost:8765.
2. Open Lichtblick
You can either install Lichtblick on your computer and add the extensions yourself, or host the web visualization, which comes with all extensions and the CPM Lab layout preinstalled.
Option A: Lichtblick Desktop App
Tip
The desktop app, or RViz, is recommended for simulations and for local use on a computer with a display.
Download and install Lichtblick for your operating system from the Lichtblick releases. The extensions are tested with Lichtblick
v1.29.1.Download the three extensions listed in CPM Lab Extensions and drag and drop each
.foxefile into the Lichtblick window. The installed extensions are listed under Extensions in the app settings.Download the
CPM Lab layoutand import it from the layout menu.Click Open connection, select Foxglove WebSocket and connect to
ws://localhost:8765.
To update the extensions, download the new .foxe files and drag and drop them into Lichtblick again.
Option B: Web Visualization
Tip
The web visualization is recommended for lab installations with a headless deployment on the central workstation. The Foxglove bridge and the web visualization run on the central workstation, and everyone in the lab network opens Lichtblick in the browser without installing anything.
The web visualization runs Lichtblick and a small API serving the CPM Lab extensions and layouts as Docker containers. It requires Docker with the Compose plugin.
git clone git@git.rwth-aachen.de:CPM/Project/Lab/ros2/docker/lichtblick.git
cd lichtblick
cp .env.example .env
docker compose up -d
Open http://localhost:8080 in your browser. It connects to the Foxglove bridge and loads the
cpm workspace with the CPM Lab extensions and layouts.
To reach the web visualization from other computers in the lab network, replace localhost in .env with the
host name or IP address of the central workstation, for example <central-workstation>:
LICHTBLICK_API_URL=http://<central-workstation>:8766
LICHTBLICK_API_ALLOWED_ORIGINS=http://<central-workstation>:8080
DEFAULT_URI=/?ds=foxglove-websocket&ds.url=ws://<central-workstation>:8765&workspace=cpm
Then run docker compose up -d again and open http://<central-workstation>:8080 on any computer in the lab
network.
Note
docker compose up builds the images on your computer the first time; this takes a while. After updating the
repository with git pull, rebuild them with docker compose up -d --build. To use a specific release, check
out its tag first, e.g. git checkout 0.3.0.
The containers are configured through the .env file:
Variable |
Description |
Default |
|---|---|---|
|
URL the browser uses to reach the API |
|
|
Port of the API |
|
|
Origins allowed to access the API |
|
|
Data source and workspace opened on start |
|
Layouts saved in the web visualization are stored in workspaces/cpm/layouts of the cloned repository.
🎉 You’re Done! 🎉
You can now follow the experiments in Lichtblick instead of RViz. Use the CPM control dashboard panel in the same
way as the Control Center described in First Simulation.
If you run into issues, refer to our Troubleshooting Guide or see Getting Help and FAQ.