Repository navigation
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
Conversation
…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 Report❌ Patch coverage is 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
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…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>
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
The format names no middleware.
idis 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 anid, 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_domainson the system andcommunication_domainon a compute unit, in the schema, the parser and the variant/mode resolution.id, and a unit naming an undeclared domain.communication_domainand the resolveddomain_id, only when set. Exports of designs without domains are unchanged.ROS_DOMAIN_IDin the launcher of a unit whose domain has anid, and rejects anidoutside 0..232.domain_bridgeson the system, in the schema, the parser and the variant/mode resolution. Bridge types and their process are declared inconfig/domain_bridge_types.yaml;ros2_domain_bridgeruns thedomain_bridgepackage.id, and a second bridge for one domain pair. A topic crossing one bridge in both directions is an error.metadata.domain_bridgeswith the topics they carry, and the bridge process as a node of its compute unit. The configuration of each bridge is generated toexports/<system>/domain_bridge/<mode>/<name>.yaml.Runtime
idfor itself and its members, over the value of its environment. The variable name comes fromdomain_id_variableof the middleware configuration.--compute-unit.run.jsonrecordscommunication_domainanddomain_id.--domain-id.Studio
Demo
TypeAlpha runs a minimal risk maneuver unit in a domain of its own (
mrm, 3) beside the driving stack (main, 1), joined bymrm_bridgeon thevehicle_systemunit. The kinematic state and the emergency request cross intomrm, the control command crosses back. The demo systems package depends ondomain_bridgeat run time, and the Docker image of the multi-unit demo installs it.Not included
How was this PR tested?
pytestinautoware_system_designer,autoware_system_designer_runtimeandautoware_system_designer_studio.pre-commiton the changed files.autoware-system-designer-launch --compute-unitprocesses with the environment on another domain: the units ran in domains 1 and 3,/mrm/control_cmdarrived in 1,/localization/kinematic_stateand/system/emergency_control_cmdarrived in 3.Notes for reviewers
domain_bridgehas a binary release for Humble and none for Jazzy. A Jazzy image of the Docker multi-unit demo fails onros-jazzy-domain-bridgeuntil 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.