Architecture
This page maps the CPM Lab from the repositories down to the nodes, domains and topics. The design pages describe the components in detail.
---
config:
layout: elk
startOnLoad: false
---
flowchart LR
subgraph UI["User interface"]
CC[Control Center<br/>RViz panel / Lichtblick]
end
subgraph D21["Lab domain (ROS_DOMAIN_ID=21), namespace /lab"]
CF[Control flow]
MS[Map server]
IPS[IPS]
REC[Experiment recorder]
VC["Vehicle controllers<br/>(muCars or simulated)"]
VIS[Map visualization]
end
subgraph D1["Planner domain (ROS_DOMAIN_ID=1), namespace /planner"]
BR[Bridge]
HLC[Motion planner]
end
CC -->|services| CF
CF -->|catalog, state, status| CC
CF -. starts .-> MS & IPS & REC & BR & HLC
CF -. starts simulated .-> VC
MS -->|map| BR & VIS & CF
IPS -->|vehicleObservation| VC
VC -->|vehicleState| BR & IPS & CF
BR -->|command| VC
BR <-->|vehicle_states, map, system_trigger, command| HLC
REC -. records .-> D21
Components of the CPM Lab and their ROS domains
The bridge is a single process with one node in each domain, so it appears in both.
Repositories and Packages
The workspace ros2-workspace-lab contains the meta package cpm_lab (launch files and RViz configuration) and
the component repositories as submodules in src/. ros2-workspace-vehicle builds the vehicle controller for the
muCars from the same components.
Repository |
Package |
Executables, launch files and role |
|---|---|---|
|
|
|
|
|
|
|
|
Messages and services, see Interface Reference and Changing Messages and Services. |
|
|
|
|
Converts the map into RViz markers ( |
|
|
Projection and message conversion of Lanelet2 maps for C++ and Python. |
|
|
|
|
|
|
The IPS, see Understanding the Indoor Positioning System. |
|
|
|
|
|
The vehicle controller and its simulation, see Understanding the Vehicle Controller. |
|
|
Motion planners, each with a |
|
|
The recorder and |
|
|
The Control Center and the RViz displays, see Design: Visualization. |
|
Lichtblick extensions |
The Control Center and displays for Lichtblick, see Visualization with Lichtblick. |
Launch Files
The meta package cpm_lab has three launch files. All start the control flow and the map visualization
(cpm_lab_headless.launch.xml); everything else is started by the control flow on request.
Launch file |
Adds |
|---|---|
|
RViz with the Control Center panel ( |
|
The Foxglove bridge on port 8765 for Lichtblick |
|
Nothing; meant to be included, e.g. on a headless central workstation |
Conventions
Domains and namespaces: nodes in the lab domain use
/lab, nodes in the planner domain/planner. Vehicle topics are/lab/vehicle_<id>/<topic>with IDs 1 to 20.Components: nodes are
rclcpp_componentswith adefault.launch.xmland their parameters inconfig/default.yaml; the parameters are validated at startup, see Style Guide.Processes: the control flow starts every component as its own process (
ros2 runorros2 launch) with the domain ID it needs, so a crash only affects that component.QoS: vehicle states, commands in the lab domain and observations are best effort; commands from the planner are reliable; the map and the control flow state are transient local, so late subscribers receive the last message.
User data: everything a user creates goes to
$CPM_LAB_HOME(default~/cpm_lab):experiments/,calibrations/,maps/andips/, see User Data Directory.