Design: Visualization

The CPM Lab has two front ends with the same functions: RViz with the plugins of the visualization repository, and Lichtblick with the extensions of the lichtblick repository (see Visualization with Lichtblick). Neither contains experiment logic. They display topics and call the services of the control flow (see Design: Control Flow), so both can be used at the same time and a crash of the user interface never stops an experiment.

RViz and Lichtblick side by side showing the same experiment

The same experiment in RViz with the CPM Lab plugins (left) and in Lichtblick with the CPM Lab extensions (right)

RViz Plugins

Package

Plugin

Shows

cpm_lab_control_center

Panel ControlCenter

The Control Center: map server, IPS, simulation, deploy and experiment widgets, warnings and the status log (ControlCenter.cpp and one *Widget.cpp per step)

cpm_lab_vehicle_state_visualization

Display VehicleStateDisplay

Each vehicle with ID, pose and speed from /lab/vehicle_<id>/vehicleState

cpm_lab_path_visualization

Display PathDisplay

The path of PATH_TRACKING commands

cpm_lab_trajectory_visualization

Display TrajectoryDisplay

The trajectory of TRAJECTORY commands, selectable per vehicle

cpm_lab_lanelet2_visualization

Display LaneletMap

A Lanelet2 map rendered in RViz

cpm_lab_go_to_pose_tool

Tool (shortcut g)

Sends a goal pose for a selected vehicle on /lab/vehicleGoal

The map itself is usually shown as the MarkerArray of cpm_lab_map_server_visualization (see Design: Map Server). The layout of RViz is src/cpm_lab/rviz/default.rviz in the workspace; the desktop and simulation images contain a copy (/opt/cpm/default.rviz).

Displays are rviz_common::RosTopicDisplay subclasses; their topic, QoS and colors are properties in the RViz sidebar. The vehicles are drawn 18 times larger than the lab coordinates (the full-scale view), so the TF frames of the vehicles must not be used for lab data.

Lichtblick Extensions

Extension

Role

cpm_lab_control_center

Panel CPM control dashboard: the Control Center for Lichtblick

vehicle_state_schema_converter

Converts VehicleState into 3D scene entities (box, ID, pose axes, speed arrow)

command_shema_converter

Converts commands into the path or trajectory of each vehicle, split into past and future

Lichtblick connects through the Foxglove bridge (cpm_lab_foxglove.launch.xml, port 8765). The extensions are released with the CPM Lab, see Lichtblick Release and File Names.

Changing the User Interface

  • A new function of the Control Center needs the control flow service or field first, then both front ends. Keep RViz and Lichtblick at the same functionality.

  • Read the control flow topics with transient local QoS; they are only published on change.

  • Update the screenshots in this documentation when the panels change.