Skip to content

feat(designer,runtime,studio): declare communication domains, the domain of each compute unit and the bridges between them - #133

Draft
technolojin wants to merge 9 commits into
autowarefoundation:mainfrom
technolojin:feat/ros-domain-tracking
Draft

technolojin wants to merge 9 commits into
autowarefoundation:mainfrom
technolojin:feat/ros-domain-tracking

Conversation

@technolojin

@technolojin technolojin commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

A system design can declare communication domains and say which one each compute unit runs in. Units of one domain exchange topics directly; units of different domains exchange what a declared domain bridge carries.

communication_domains:
  - name: main
    description: Main driving stack.
    id: 1
  - name: mrm
    id: 3

compute_units:
  - name: main_ecu
    communication_domain: main
  - name: mrm_ecu
    communication_domain: mrm

domain_bridges:
  - name: mrm_bridge
    type: ros2_domain_bridge
    compute_unit: main_ecu
    domains: [main, mrm]

The format names no middleware. id is the identifier the middleware knows the domain by, a non-negative integer, distinct per domain. Both fields are optional: a unit in no domain, or in a domain without an id, runs in the domain of the environment it is launched in, as before. A unit in no domain is a participant of none, such as a unit of software that uses no middleware.

A domain bridge joins two domains, both with an id. It is declared like a node group: the design gives its type and compute unit, and the designer derives the rest. Every topic connection whose publisher and subscriber run in the two domains is assigned to the bridge, in either direction, under the topic's own name. The bridge process has no node design and no parameter set.

The fields belong to design format 0.5.0.

Designer

  • communication_domains on the system and communication_domain on a compute unit, in the schema, the parser and the variant/mode resolution.
  • Lint and the resolved-system check reject duplicate domain names, a shared id, and a unit naming an undeclared domain.
  • Each exported unit record carries communication_domain and the resolved domain_id, only when set. Exports of designs without domains are unchanged.
  • The ROS 2 launcher backend sets ROS_DOMAIN_ID in the launcher of a unit whose domain has an id, and rejects an id outside 0..232.
  • domain_bridges on the system, in the schema, the parser and the variant/mode resolution. Bridge types and their process are declared in config/domain_bridge_types.yaml; ros2_domain_bridge runs the domain_bridge package.
  • Lint and the resolved-system check reject an unknown type, an undeclared or offboard unit, undeclared or equal domains, a domain without an id, and a second bridge for one domain pair. A topic crossing one bridge in both directions is an error.
  • Each mode exports its bridges in metadata.domain_bridges with the topics they carry, and the bridge process as a node of its compute unit. The configuration of each bridge is generated to exports/<system>/domain_bridge/<mode>/<name>.yaml.
  • The build warns about a connection crossing two domains no bridge joins, a request/response connection across domains, and a unit in no domain that connects to a unit in one.

Runtime

  • The launcher sets the domain id for itself and its members, over the value of its environment. The variable name comes from domain_id_variable of the middleware configuration.
  • Units launched by one launcher share one domain; units of different domains are refused with a pointer to --compute-unit.
  • run.json records communication_domain and domain_id.
  • Replay keeps its own --domain-id.
  • A domain bridge is launched as a member of its compute unit. Arguments of a node resolve launch-time substitutions.

Studio

  • The node diagram shows the domain over each compute unit and marks a link between units of two domains. The link carries the name of its bridge; a link no bridge carries is drawn as an error.
  • The launch view shows the domain of each unit.
  • RViz started from the studio joins the domain of the launched units.

Demo

TypeAlpha runs a minimal risk maneuver unit in a domain of its own (mrm, 3) beside the driving stack (main, 1), joined by mrm_bridge on the vehicle_system unit. The kinematic state and the emergency request cross into mrm, the control command crosses back. The demo systems package depends on domain_bridge at run time, and the Docker image of the multi-unit demo installs it.

Not included

  • Renaming a topic across a bridge, request/response ports across domains, and QoS overrides of a bridged topic.

How was this PR tested?

  • pytest in autoware_system_designer, autoware_system_designer_runtime and autoware_system_designer_studio.
  • pre-commit on the changed files.
  • Node diagram checked in a browser on a packed two-domain fixture and on the packed TypeAlpha demo.
  • TypeAlpha launched as five autoware-system-designer-launch --compute-unit processes with the environment on another domain: the units ran in domains 1 and 3, /mrm/control_cmd arrived in 1, /localization/kinematic_state and /system/emergency_control_cmd arrived in 3.
  • Not run: the Docker multi-unit tests.

Notes for reviewers

domain_bridge has a binary release for Humble and none for Jazzy. A Jazzy image of the Docker multi-unit demo fails on ros-jazzy-domain-bridge until the package is built from source there.

Effects on system behavior

None for designs that declare no communication domains. The TypeAlpha demo runs in the domains 1 and 3 whatever the environment's domain is.

…domain of each compute unit

A system design lists communication_domains (name, description, id) and a compute unit names the one its nodes run in. Units of one domain exchange topics directly; units of different domains do not. The format names no middleware: the id is the identifier the middleware knows the domain by.

The generated launcher of a unit and the runtime hand the id to the nodes they start, on ROS 2 as ROS_DOMAIN_ID; the runtime reads the variable name from its middleware configuration. A runtime process launches units of one domain only. The studio shows the domain of each unit in the node diagram and the launch view, marks links between units of two domains, and starts RViz in the domain of the launched units.

The fields belong to design format 0.5.0.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.26752% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.03%. Comparing base (2ac2f75) to head (e8110d1).

Files with missing lines Patch % Lines
.../autoware_system_designer_runtime/system_runner.py 37.50% 5 Missing ⚠️
...oware_system_designer_runtime/_impl/core/domain.py 95.45% 1 Missing and 1 partial ⚠️
...io/autoware_system_designer_studio/serve/launch.py 77.77% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
+ Coverage   75.91%   76.03%   +0.12%     
==========================================
  Files         143      145       +2     
  Lines       19662    19815     +153     
  Branches     2737     2755      +18     
==========================================
+ Hits        14927    15067     +140     
- Misses       4168     4176       +8     
- Partials      567      572       +5     
Flag Coverage Δ
daily ?
full-suite 76.03% <94.26%> (+0.12%) ⬆️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@technolojin technolojin self-assigned this Dec 4, 2026
…ication domain of its own

TypeAlpha declares the domains main and mrm. The mrm unit hears the kinematic state and the emergency request and answers with a control command, through two dummy bridge nodes on the vehicle_system unit. A dummy node given input_domain_id or output_domain_id holds its subscribers or its publishers in that domain.

The studio makes a compute unit box as wide as its domain caption.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
…ared domain bridges

A system declares domain_bridges, each with a type, a compute unit and the two communication domains it joins. The designer assigns every topic connection between the two domains to the bridge, exports the bridge with its topics, generates its configuration file per mode and adds the bridge process to its compute unit in the launch files and the runtime. A connection crossing domains no bridge joins is reported at build time and marked in the studio node diagram.

A domain declared without an identifier is the one of the launch environment; the bridge takes it from the environment of its unit at launch.

The TypeAlpha demo joins its main and mrm domains with one declared bridge in place of the dummy bridge nodes.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
A domain bridge enters its two domains by their identifiers, so both need an id; the bridge takes none from its launch environment. The TypeAlpha demo gives its main domain the identifier 87.

A compute unit in no communication domain is reported once it connects to a unit in one.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
@technolojin technolojin changed the title feat(designer,runtime,studio): declare communication domains and the domain of each compute unit feat(designer,runtime,studio): declare communication domains, the domain of each compute unit and the bridges between them Dec 4, 2026
…gram

The node diagram draws a domain bridge as a cut-corner box, once per direction it carries topics in, with an input and an output per topic. A link between the two domains runs into the box and out of it, and chain highlighting follows it across.

The TypeAlpha demo runs its bridge on the mrm unit, and the Docker multi-unit demo defaults to the domain of the main units.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
A server/client connection between two bridged domains is listed in the
bridge configuration as a service, from the domain of its server to the
domain of its client.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
A connection crossing communication domains that no bridge joins, and a
bridge joining a domain where no node runs in a mode, fail a strict build
and are warnings otherwise.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
…nodes by domain

A topic or service crossing a domain bridge takes the prefix of its
communication domain on the far side; a bridge lists the names it carries
unchanged under shared_names. Node and port paths are unique within a
communication domain, so two domains can hold a node of one path.

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant